You are here

protected function PanelizerEntityViewBuilder::collectRenderDisplays in Panelizer 8.3

Same name and namespace in other branches
  1. 8.5 src/PanelizerEntityViewBuilder.php \Drupal\panelizer\PanelizerEntityViewBuilder::collectRenderDisplays()
  2. 8.4 src/PanelizerEntityViewBuilder.php \Drupal\panelizer\PanelizerEntityViewBuilder::collectRenderDisplays()

Returns the display objects used to render a set of entities.

Wraps EntityViewDisplay::collectRenderDisplays() so we can mock it in tests.

Parameters

\Drupal\Core\Entity\FieldableEntityInterface[] $entities: The entities being rendered. They should all be of the same entity type.

string $view_mode: The view mode being rendered.

Return value

\Drupal\Core\Entity\Display\EntityViewDisplayInterface[] The display objects to use to render the entities, keyed by entity bundle.

See also

EntityViewDisplay::collectRenderDisplays()

2 calls to PanelizerEntityViewBuilder::collectRenderDisplays()
PanelizerEntityViewBuilder::view in src/PanelizerEntityViewBuilder.php
Builds the render array for the provided entity.
PanelizerEntityViewBuilder::viewMultiple in src/PanelizerEntityViewBuilder.php
Builds the render array for the provided entities.

File

src/PanelizerEntityViewBuilder.php, line 197

Class

PanelizerEntityViewBuilder
Entity view builder for entities that can be panelized.

Namespace

Drupal\panelizer

Code

protected function collectRenderDisplays($entities, $view_mode) {
  return EntityViewDisplay::collectRenderDisplays($entities, $view_mode);
}