Issue #2090509 follow-up by yched, andypost: Fix some type-hinting.
parent
ecca161f3c
commit
b673b60b95
|
@ -52,7 +52,7 @@ class EntityViewDisplay extends EntityDisplayBase implements EntityViewDisplayIn
|
||||||
* party code to alter the display options held in the display before they are
|
* party code to alter the display options held in the display before they are
|
||||||
* used to generate render arrays.
|
* used to generate render arrays.
|
||||||
*
|
*
|
||||||
* @param \Drupal\Core\Entity\EntityInterface[] $entities
|
* @param \Drupal\Core\Entity\ContentEntityInterface[] $entities
|
||||||
* The entities being rendered. They should all be of the same entity type.
|
* The entities being rendered. They should all be of the same entity type.
|
||||||
* @param string $view_mode
|
* @param string $view_mode
|
||||||
* The view mode being rendered.
|
* The view mode being rendered.
|
||||||
|
@ -144,7 +144,7 @@ class EntityViewDisplay extends EntityDisplayBase implements EntityViewDisplayIn
|
||||||
*
|
*
|
||||||
* See the collectRenderDisplays() method for details.
|
* See the collectRenderDisplays() method for details.
|
||||||
*
|
*
|
||||||
* @param \Drupal\Core\Entity\EntityInterface $entity
|
* @param \Drupal\Core\Entity\ContentEntityInterface $entity
|
||||||
* The entity being rendered.
|
* The entity being rendered.
|
||||||
* @param string $view_mode
|
* @param string $view_mode
|
||||||
* The view mode.
|
* The view mode.
|
||||||
|
@ -154,7 +154,7 @@ class EntityViewDisplay extends EntityDisplayBase implements EntityViewDisplayIn
|
||||||
*
|
*
|
||||||
* @see \Drupal\entity\Entity\EntityDisplay::collectRenderDisplays()
|
* @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);
|
$displays = static::collectRenderDisplays(array($entity), $view_mode);
|
||||||
return $displays[$entity->bundle()];
|
return $displays[$entity->bundle()];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue