public function EntityTypeManager::getViewBuilder

public EntityTypeManager::getViewBuilder($entity_type)

Creates a new view builder instance.

Parameters

string $entity_type: The entity type 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 209

Class

EntityTypeManager
Manages entity type plugin definitions.

Namespace

Drupal\Core\Entity

Code

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

© 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!EntityTypeManager.php/function/EntityTypeManager::getViewBuilder/8.1.x