protected 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.
File
- core/lib/Drupal/Core/Controller/ControllerBase.php, line 129
Class
- ControllerBase
- Utility base class for thin controllers.
Namespace
Drupal\Core\Controller
Code
1 2 3 4 5 6 | protected function entityManager() { if (! $this ->entityManager) { $this ->entityManager = $this ->container()->get( 'entity.manager' ); } return $this ->entityManager; } |
Please login to continue.