Drupal::entityManager

public static 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.

File

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

Class

Drupal
Static Service Container wrapper.

Code

public static function entityManager() {
  return static::getContainer()->get('entity.manager');
}
doc_Drupal
2016-10-29 09:02:44
Comments
Leave a Comment

Please login to continue.