public static EntityViewDisplay::collectRenderDisplay(FieldableEntityInterface $entity, $view_mode)
Returns the display object used to render an entity.
See the collectRenderDisplays() method for details.
\Drupal\Core\Entity\FieldableEntityInterface $entity: The entity being rendered.
string $view_mode: The view mode.
\Drupal\Core\Entity\Display\EntityViewDisplayInterface The display object that should be used to render the entity.
\Drupal\Core\Entity\Entity\EntityViewDisplay::collectRenderDisplays()
public static function collectRenderDisplay(FieldableEntityInterface $entity, $view_mode) { $displays = static::collectRenderDisplays(array($entity), $view_mode); return $displays[$entity->bundle()]; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!Entity!EntityViewDisplay.php/function/EntityViewDisplay::collectRenderDisplay/8.1.x