diff --git a/core/lib/Drupal/Core/Entity/Display/EntityViewDisplayInterface.php b/core/lib/Drupal/Core/Entity/Display/EntityViewDisplayInterface.php index 0472a89..8d86a6b 100644 --- a/core/lib/Drupal/Core/Entity/Display/EntityViewDisplayInterface.php +++ b/core/lib/Drupal/Core/Entity/Display/EntityViewDisplayInterface.php @@ -7,7 +7,7 @@ namespace Drupal\Core\Entity\Display; -use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Entity\ContentEntityInterface; /** * Provides a common interface for entity view displays. @@ -19,7 +19,7 @@ * * See the buildMultiple() method for details. * - * @param \Drupal\Core\Entity\EntityInterface $entity + * @param \Drupal\Core\Entity\ContentEntityInterface $entity * The entity being displayed. * * @return array @@ -27,7 +27,7 @@ * * @see \Drupal\Core\Entity\Display\EntityViewDisplayInterface::buildMultiple() */ - public function build(EntityInterface $entity); + public function build(ContentEntityInterface $entity); /** * Returns a renderable array for the components of a set of entities. @@ -40,7 +40,7 @@ public function build(EntityInterface $entity); * hook_entity_display_build_alter() is invoked on each entity, allowing 3rd * party code to alter the render array. * - * @param \Drupal\Core\Entity\EntityInterface[] $entities + * @param \Drupal\Core\Entity\ContentEntityInterface[] $entities * The entities being displayed. * * @return array diff --git a/core/lib/Drupal/Core/Entity/EntityViewBuilderInterface.php b/core/lib/Drupal/Core/Entity/EntityViewBuilderInterface.php index 478e97c..14e4ba0 100644 --- a/core/lib/Drupal/Core/Entity/EntityViewBuilderInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityViewBuilderInterface.php @@ -16,7 +16,7 @@ * Build the structured $content property on the entity. * * @param \Drupal\Core\Entity\EntityInterface[] $entities - * The entities, implementing EntityInterface, whose content is being built. + * The entities whose content is being built. * @param \Drupal\Core\Entity\Display\EntityViewDisplayInterface[] $displays * The array of entity view displays holding the display options * configured for the entity components, keyed by bundle name. diff --git a/core/modules/entity/lib/Drupal/entity/Entity/EntityViewDisplay.php b/core/modules/entity/lib/Drupal/entity/Entity/EntityViewDisplay.php index c76234d..5ab421e 100644 --- a/core/modules/entity/lib/Drupal/entity/Entity/EntityViewDisplay.php +++ b/core/modules/entity/lib/Drupal/entity/Entity/EntityViewDisplay.php @@ -9,7 +9,7 @@ use Drupal\Component\Utility\NestedArray; use Drupal\Core\Entity\Display\EntityViewDisplayInterface; -use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Entity\ContentEntityInterface; use Drupal\entity\EntityDisplayBase; /** @@ -201,7 +201,7 @@ public function getRenderer($field_name) { /** * {@inheritdoc} */ - public function build(EntityInterface $entity) { + public function build(ContentEntityInterface $entity) { $build = $this->buildMultiple(array($entity)); return $build[0]; } diff --git a/core/modules/field/field.module b/core/modules/field/field.module index b3afd4e..6a8b941 100644 --- a/core/modules/field/field.module +++ b/core/modules/field/field.module @@ -5,7 +5,6 @@ */ use Drupal\Core\Entity\ContentEntityInterface; -use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Template\Attribute; use Drupal\entity\Entity\EntityViewDisplay; @@ -325,7 +324,7 @@ function _field_filter_xss_display_allowed_tags() { /** * Returns a renderable array for a single field value. * - * @param \Drupal\Core\Entity\EntityInterface $entity + * @param \Drupal\Core\Entity\ContentEntityInterface $entity * The entity containing the field to display. Must at least contain the ID * key and the field data to display. * @param $field_name @@ -342,7 +341,7 @@ function _field_filter_xss_display_allowed_tags() { * @return * A renderable array for the field value. */ -function field_view_value(EntityInterface $entity, $field_name, $item, $display = array(), $langcode = NULL) { +function field_view_value(ContentEntityInterface $entity, $field_name, $item, $display = array(), $langcode = NULL) { $output = array(); if ($entity->hasField($field_name)) { diff --git a/core/modules/text/lib/Drupal/text/Tests/Formatter/TextPlainUnitTest.php b/core/modules/text/lib/Drupal/text/Tests/Formatter/TextPlainUnitTest.php index d888084..2890f27 100644 --- a/core/modules/text/lib/Drupal/text/Tests/Formatter/TextPlainUnitTest.php +++ b/core/modules/text/lib/Drupal/text/Tests/Formatter/TextPlainUnitTest.php @@ -7,9 +7,9 @@ namespace Drupal\text\Tests\Formatter; -use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Language\Language; +use Drupal\Core\Entity\ContentEntityInterface; use Drupal\Core\Entity\Display\EntityViewDisplayInterface; +use Drupal\Core\Language\Language; use Drupal\simpletest\DrupalUnitTestBase; /** @@ -116,12 +116,12 @@ protected function createEntity($values = array()) { /** * Renders fields of a given entity with a given display. * - * @param \Drupal\Core\Entity\EntityInterface $entity + * @param \Drupal\Core\Entity\ContentEntityInterface $entity * The entity object with attached fields to render. * @param \Drupal\Core\Entity\Display\EntityViewDisplayInterface $display * The display to render the fields in. */ - protected function renderEntityFields(EntityInterface $entity, EntityViewDisplayInterface $display) { + protected function renderEntityFields(ContentEntityInterface $entity, EntityViewDisplayInterface $display) { $content = $display->build($entity); $this->content = drupal_render($content); return $this->content;