8.3.x Entity.php protected Entity::entityManager()
8.0.x Entity.php protected Entity::entityManager()
8.1.x Entity.php protected Entity::entityManager()
8.2.x Entity.php protected Entity::entityManager()
8.4.x Entity.php protected Entity::entityManager()

Gets the entity manager.

Return value

\Drupal\Core\Entity\EntityManagerInterface

Deprecated

in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal::entityTypeManager() instead in most cases. If the needed method is not on \Drupal\Core\Entity\EntityTypeManagerInterface, see the deprecated \Drupal\Core\Entity\EntityManager to find the correct interface or service.

21 calls to Entity::entityManager()
BaseFieldOverride::getBaseFieldDefinition in core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php
Gets the base field definition.
BaseFieldOverride::preSave in core/lib/Drupal/Core/Field/Entity/BaseFieldOverride.php
ConfigEntityBundleBase::deleteDisplays in core/lib/Drupal/Core/Config/Entity/ConfigEntityBundleBase.php
Deletes display if a bundle is deleted.
ConfigEntityBundleBase::loadDisplays in core/lib/Drupal/Core/Config/Entity/ConfigEntityBundleBase.php
Returns view or form displays for this bundle.
ConfigEntityBundleBase::postSave in core/lib/Drupal/Core/Config/Entity/ConfigEntityBundleBase.php
Acts on a saved entity before the insert or update hook is invoked.

... See full list

File

core/lib/Drupal/Core/Entity/Entity.php, line 77

Class

Entity
Defines a base entity class.

Namespace

Drupal\Core\Entity

Code

protected function entityManager() {
  return \Drupal::entityManager();
}