You are here

public function EntityTypeManager::getViewBuilder in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Entity/EntityTypeManager.php \Drupal\Core\Entity\EntityTypeManager::getViewBuilder()

Creates a new view builder instance.

Parameters

string $entity_type_id: The entity type ID for this view builder.

Return value

\Drupal\Core\Entity\EntityViewBuilderInterface A view builder instance.

Overrides EntityTypeManagerInterface::getViewBuilder

File

core/lib/Drupal/Core/Entity/EntityTypeManager.php, line 253

Class

EntityTypeManager
Manages entity type plugin definitions.

Namespace

Drupal\Core\Entity

Code

public function getViewBuilder($entity_type_id) {
  return $this
    ->getHandler($entity_type_id, 'view_builder');
}