You are here

protected function ControllerBase::entityTypeManager in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Controller/ControllerBase.php \Drupal\Core\Controller\ControllerBase::entityTypeManager()

Retrieves the entity type manager.

Return value

\Drupal\Core\Entity\EntityTypeManagerInterface The entity type manager.

File

core/lib/Drupal/Core/Controller/ControllerBase.php, line 145
Contains \Drupal\Core\Controller\ControllerBase.

Class

ControllerBase
Utility base class for thin controllers.

Namespace

Drupal\Core\Controller

Code

protected function entityTypeManager() {
  if (!isset($this->entityTypeManager)) {
    $this->entityTypeManager = $this
      ->container()
      ->get('entity_type.manager');
  }
  return $this->entityTypeManager;
}