8.5.x Drupal.php Drupal::entityManager()
8.0.x Drupal.php Drupal::entityManager()
8.1.x Drupal.php Drupal::entityManager()
8.2.x Drupal.php Drupal::entityManager()
8.3.x Drupal.php Drupal::entityManager()
8.4.x Drupal.php Drupal::entityManager()
8.6.x Drupal.php Drupal::entityManager()

Retrieves the entity manager service.

Return value

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

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.

2 calls to Drupal::entityManager()
entity_render_cache_clear in core/includes/entity.inc
Clears the entity render cache for all entity types.
_content_translation_form_language_content_settings_form_alter in core/modules/content_translation/content_translation.admin.inc
(proxied) Implements hook_form_FORM_ID_alter().

File

core/lib/Drupal.php, line 272
Contains \Drupal.

Class

Drupal
Static Service Container wrapper.

Code

public static function entityManager() {
  return static::getContainer()
    ->get('entity.manager');
}