public static EntityViewDisplay::collectRenderDisplay(FieldableEntityInterface $entity, $view_mode)
Returns the display object used to render an entity.
See the collectRenderDisplays() method for details.
Parameters
\Drupal\Core\Entity\FieldableEntityInterface $entity: The entity being rendered.
string $view_mode: The view mode.
Return value
\Drupal\Core\Entity\Display\EntityViewDisplayInterface The display object that should be used to render the entity.
See also
\Drupal\Core\Entity\Entity\EntityViewDisplay::collectRenderDisplays()
File
- core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php, line 161
Class
- EntityViewDisplay
- Configuration entity that contains display options for all components of a rendered entity in a given view mode.
Namespace
Drupal\Core\Entity\Entity
Code
public static function collectRenderDisplay(FieldableEntityInterface $entity, $view_mode) { $displays = static::collectRenderDisplays(array($entity), $view_mode); return $displays[$entity->bundle()]; }
Please login to continue.