function FieldableEntityNormalizerTrait::getEntityFieldManager
Returns the entity field manager.
Return value
\Drupal\Core\Entity\EntityFieldManagerInterface The entity field manager.
File
-
core/
modules/ serialization/ src/ Normalizer/ FieldableEntityNormalizerTrait.php, line 176
Class
- FieldableEntityNormalizerTrait
- A trait for providing fieldable entity normalization/denormalization methods.
Namespace
Drupal\serialization\NormalizerCode
protected function getEntityFieldManager() {
if (!$this->entityFieldManager) {
@trigger_error('The entityFieldManager property must be set on the FieldEntityNormalizerTrait, it is required before Drupal 9.0.0. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
$this->entityFieldManager = \Drupal::service('entity_field.manager');
}
return $this->entityFieldManager;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.