You are here

protected function ControllerBase::entityManager 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::entityManager()

Retrieves the entity manager service.

Return value

\Drupal\Core\Entity\EntityManagerInterface The entity manager service.

Deprecated

in Drupal 8.0.0, will be removed before Drupal 9.0.0. Most of the time static::entityTypeManager() is supposed to be used instead.

1 call to ControllerBase::entityManager()
AggregatorController::adminOverview in core/modules/aggregator/src/Controller/AggregatorController.php
Displays the aggregator administration page.

File

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

Class

ControllerBase
Utility base class for thin controllers.

Namespace

Drupal\Core\Controller

Code

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