ControllerBase::entityTypeManager

protected 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 142

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;
}
doc_Drupal
2016-10-29 08:58:57
Comments
Leave a Comment

Please login to continue.