diff -u b/src/WebformSubmissionStorage.php b/src/WebformSubmissionStorage.php --- b/src/WebformSubmissionStorage.php +++ b/src/WebformSubmissionStorage.php @@ -57,16 +57,6 @@ protected $accessRulesManager; /** - * The entity field manager. - * - * @var \Drupal\Core\Entity\EntityFieldManagerInterface - * - * @todo Remove past drupal:8.6.x support, as from drupal:8.7 on, this is - * supplied by ContentEntityStorageBase. - */ - protected $entityFieldManager; - - /** * The entity type manager. * * @var \Drupal\Core\Entity\EntityTypeManagerInterface @@ -89,7 +79,6 @@ $this->currentUser = $current_user; $this->accessRulesManager = $access_rules_manager; $this->time = $time ?: \Drupal::time(); - $this->entityFieldManager = \Drupal::service('entity_field.manager'); $this->entityTypeManager = \Drupal::service('entity_type.manager'); } @@ -113,8 +102,9 @@ * {@inheritdoc} */ public function getFieldDefinitions() { - /** @var \Drupal\Core\Field\BaseFieldDefinition[] $definitions */ - $field_definitions = $this->entityFieldManager->getBaseFieldDefinitions('webform_submission'); + // @todo: Replace by entityFieldManager's getActiveFieldStorageDefinitions() + // once drupal:8.6.x is not supported anymore. + $field_definitions = $this->getFieldStorageDefinitions(); // For now never let any see or export the serialize YAML data field. unset($field_definitions['data']); @@ -360,8 +350,8 @@ $options = []; $source_entities = $this->getSourceEntities($webform); foreach ($source_entities as $entity_type => $entity_ids) { - $optgroup = (string) $this->entityFieldManager->getDefinition($entity_type)->getCollectionLabel(); - $entities = $this->entityFieldManager->getStorage($entity_type)->loadMultiple($entity_ids); + $optgroup = (string) $this->entityTypeManager->getDefinition($entity_type)->getCollectionLabel(); + $entities = $this->entityTypeManager->getStorage($entity_type)->loadMultiple($entity_ids); foreach ($entities as $entity_id => $entity) { if ($entity instanceof TranslatableInterface && $entity->hasTranslation($this->languageManager->getCurrentLanguage()->getId())) { $entity = $entity->getTranslation($this->languageManager->getCurrentLanguage()->getId());