diff --git a/core/modules/entity/lib/Drupal/entity/Entity/EntityFormDisplay.php b/core/modules/entity/lib/Drupal/entity/Entity/EntityFormDisplay.php index 3222af7..bbd9df1 100644 --- a/core/modules/entity/lib/Drupal/entity/Entity/EntityFormDisplay.php +++ b/core/modules/entity/lib/Drupal/entity/Entity/EntityFormDisplay.php @@ -8,6 +8,7 @@ namespace Drupal\entity\Entity; use Drupal\Core\Entity\Display\EntityFormDisplayInterface; +use Drupal\Core\Entity\ContentEntityInterface; use Drupal\entity\EntityDisplayBase; /** @@ -53,7 +54,7 @@ class EntityFormDisplay extends EntityDisplayBase implements EntityFormDisplayIn * party code to alter the display options held in the display before they are * used to generate render arrays. * - * @param \Drupal\Core\Entity\EntityInterface $entity + * @param \Drupal\Core\Entity\ContentEntityInterface $entity * The entity for which the form is being built. * @param string $form_mode * The form mode. @@ -64,7 +65,7 @@ class EntityFormDisplay extends EntityDisplayBase implements EntityFormDisplayIn * @see entity_get_form_display() * @see hook_entity_form_display_alter() */ - public static function collectRenderDisplay($entity, $form_mode) { + public static function collectRenderDisplay(ContentEntityInterface $entity, $form_mode) { $entity_type = $entity->getEntityTypeId(); $bundle = $entity->bundle(); diff --git a/core/modules/entity/lib/Drupal/entity/Entity/EntityViewDisplay.php b/core/modules/entity/lib/Drupal/entity/Entity/EntityViewDisplay.php index b34259b..12e1717 100644 --- a/core/modules/entity/lib/Drupal/entity/Entity/EntityViewDisplay.php +++ b/core/modules/entity/lib/Drupal/entity/Entity/EntityViewDisplay.php @@ -9,6 +9,7 @@ use Drupal\Component\Utility\NestedArray; use Drupal\Core\Entity\Display\EntityViewDisplayInterface; +use Drupal\Core\Entity\ContentEntityInterface; use Drupal\entity\EntityDisplayBase; /** @@ -146,7 +147,7 @@ public static function collectRenderDisplays($entities, $view_mode) { * * See the collectRenderDisplays() method for details. * - * @param \Drupal\Core\Entity\EntityInterface $entity + * @param \Drupal\Core\Entity\ContentEntityInterface $entity * The entity being rendered. * @param string $view_mode * The view mode. @@ -156,7 +157,7 @@ public static function collectRenderDisplays($entities, $view_mode) { * * @see \Drupal\entity\Entity\EntityDisplay::collectRenderDisplays() */ - public static function collectRenderDisplay($entity, $view_mode) { + public static function collectRenderDisplay(ContentEntityInterface $entity, $view_mode) { $displays = static::collectRenderDisplays(array($entity), $view_mode); return $displays[$entity->bundle()]; }