You are here

protected function FieldAPIHandlerTrait::getEntityManager in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/views/src/FieldAPIHandlerTrait.php \Drupal\views\FieldAPIHandlerTrait::getEntityManager()

Returns the entity manager.

Return value

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

1 method overrides FieldAPIHandlerTrait::getEntityManager()
Field::getEntityManager in core/modules/views/src/Plugin/views/field/Field.php
Returns the entity manager.

File

core/modules/views/src/FieldAPIHandlerTrait.php, line 72
Contains \Drupal\views\FieldAPIHandlerTrait.

Class

FieldAPIHandlerTrait
A trait containing helper methods for field definitions.

Namespace

Drupal\views

Code

protected function getEntityManager() {
  if (!isset($this->entityManager)) {
    $this->entityManager = \Drupal::entityManager();
  }
  return $this->entityManager;
}