protected function FieldableEntityNormalizerTrait::getEntityFieldManager in Drupal 8
Same name and namespace in other branches
- 9 core/modules/serialization/src/Normalizer/FieldableEntityNormalizerTrait.php \Drupal\serialization\Normalizer\FieldableEntityNormalizerTrait::getEntityFieldManager()
- 10 core/modules/serialization/src/Normalizer/FieldableEntityNormalizerTrait.php \Drupal\serialization\Normalizer\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;
}