diff --git a/core/lib/Drupal.php b/core/lib/Drupal.php index d1e4a05..de931a5 100644 --- a/core/lib/Drupal.php +++ b/core/lib/Drupal.php @@ -254,6 +254,8 @@ public static function currentUser() { * The entity manager service. * * @deprecated in Drupal 8.0.0, will be removed before Drupal 9.0.0. + * Most of the time \Drupal::entityTypeManager() is supposed to be used + * instead. */ public static function entityManager() { return static::getContainer()->get('entity.manager'); diff --git a/core/lib/Drupal/Core/Controller/ControllerBase.php b/core/lib/Drupal/Core/Controller/ControllerBase.php index 9ac6791..544e247 100644 --- a/core/lib/Drupal/Core/Controller/ControllerBase.php +++ b/core/lib/Drupal/Core/Controller/ControllerBase.php @@ -126,6 +126,8 @@ public static function create(ContainerInterface $container) { * 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. */ protected function entityManager() { if (!$this->entityManager) { diff --git a/core/lib/Drupal/Core/Entity/Entity.php b/core/lib/Drupal/Core/Entity/Entity.php index bebfeb8..0798823 100644 --- a/core/lib/Drupal/Core/Entity/Entity.php +++ b/core/lib/Drupal/Core/Entity/Entity.php @@ -74,6 +74,8 @@ public function __construct(array $values, $entity_type) { * @return \Drupal\Core\Entity\EntityManagerInterface * * @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. */ protected function entityManager() { return \Drupal::entityManager();