function ControllerBase::entityTypeManager

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Controller/ControllerBase.php \Drupal\Core\Controller\ControllerBase::entityTypeManager()
  2. 10 core/lib/Drupal/Core/Controller/ControllerBase.php \Drupal\Core\Controller\ControllerBase::entityTypeManager()
  3. 11.x 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.

2 calls to ControllerBase::entityTypeManager()
AggregatorController::adminOverview in core/modules/aggregator/src/Controller/AggregatorController.php
Displays the aggregator administration page.
NodeController::revisionShow in core/modules/node/src/Controller/NodeController.php
Displays a node revision.

File

core/lib/Drupal/Core/Controller/ControllerBase.php, line 118

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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.