function entity_view_multiple

Returns the render array for the provided entities.

Parameters

array $entities: The entities to be rendered, must be of the same type.

string $view_mode: The view mode that should be used to display the entity.

string $langcode: (optional) For which language the entity should be rendered, defaults to the current content language.

Return value

array A render array for the entities, indexed by the same keys as the entities array passed in $entities.

9 calls to entity_view_multiple()
aggregator_categorize_items in drupal/core/modules/aggregator/aggregator.pages.inc
Form constructor to build the page list form.
aggregator_page_categories in drupal/core/modules/aggregator/aggregator.pages.inc
Page callback: Displays all the categories used by the Aggregator module.
comment_view_multiple in drupal/core/modules/comment/comment.module
Constructs render array from an array of loaded comments.
CustomBlockBuildContentTest::testCustomBlockRebuildContent in drupal/core/modules/block/custom_block/lib/Drupal/custom_block/Tests/CustomBlockBuildContentTest.php
Ensures that content is rebuilt in calls to custom_block_build_content().
EntityRow::pre_render in drupal/core/modules/views/lib/Drupal/views/Plugin/views/row/EntityRow.php
Overrides Drupal\views\Plugin\views\row\RowPluginBase::pre_render().

... See full list

File

drupal/core/includes/entity.inc, line 608
Entity API for handling entities like nodes or users.

Code

function entity_view_multiple(array $entities, $view_mode, $langcode = NULL) {
  return Drupal::entityManager()
    ->getRenderController(reset($entities)
    ->entityType())
    ->viewMultiple($entities, $view_mode, $langcode);
}