function ImageItem::getEntityManager
Gets the entity manager.
Return value
\Drupal\Core\Entity\EntityManagerInterface
Deprecated
in drupal:8.8.0 and is removed from 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.
See also
https://www.drupal.org/node/2549139
File
-
core/
modules/ image/ src/ Plugin/ Field/ FieldType/ ImageItem.php, line 515
Class
- ImageItem
- Plugin implementation of the 'image' field type.
Namespace
Drupal\image\Plugin\Field\FieldTypeCode
protected function getEntityManager() {
@trigger_error(__METHOD__ . ' is deprecated in drupal:8.8.0 and is removed in 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. See https://www.drupal.org/node/2549139', E_USER_DEPRECATED);
if (!isset($this->entityManager)) {
$this->entityManager = \Drupal::entityManager();
}
return $this->entityManager;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.