Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to add these just to EntityReferenceFormatterBase but that doesn't seem to work.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

namespace Drupal\Core\Field\Plugin\Field\FieldFormatter;

use Drupal\Core\Field\FieldItemListInterface;

class EntityReferenceEntityFormatter extends EntityReferenceFormatterBase {

/**
* @param \Drupal\Core\Field\EntityReferenceFieldItemListInterface<\Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItemInterface> $items
*/
public function viewElements(FieldItemListInterface $items, $langcode) {
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

namespace Drupal\Core\Field\Plugin\Field\FieldFormatter;

use Drupal\Core\Field\FieldItemListInterface;

class EntityReferenceIdFormatter extends EntityReferenceFormatterBase {

/**
* @param \Drupal\Core\Field\EntityReferenceFieldItemListInterface<\Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItemInterface> $items
*/
public function viewElements(FieldItemListInterface $items, $langcode) {
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

namespace Drupal\Core\Field\Plugin\Field\FieldFormatter;

use Drupal\Core\Field\FieldItemListInterface;

class EntityReferenceLabelFormatter extends EntityReferenceFormatterBase {

/**
* @param \Drupal\Core\Field\EntityReferenceFieldItemListInterface<\Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItemInterface> $items
*/
public function viewElements(FieldItemListInterface $items, $langcode) {
}

}
Loading