FieldUninstallValidator::__construct

public FieldUninstallValidator::__construct(EntityTypeManagerInterface $entity_type_manager, TranslationInterface $string_translation, FieldTypePluginManagerInterface $field_type_manager)

Constructs a new FieldUninstallValidator.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity manager.

\Drupal\Core\StringTranslation\TranslationInterface $string_translation: The string translation service.

\Drupal\Core\Field\FieldTypePluginManagerInterface $field_type_manager: The field type plugin manager.

File

core/modules/field/src/FieldUninstallValidator.php, line 42

Class

FieldUninstallValidator
Prevents uninstallation of modules providing active field storage.

Namespace

Drupal\field

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, TranslationInterface $string_translation, FieldTypePluginManagerInterface $field_type_manager) {
  $this->fieldStorageConfigStorage = $entity_type_manager->getStorage('field_storage_config');
  $this->stringTranslation = $string_translation;
  $this->fieldTypeManager = $field_type_manager;
}
doc_Drupal
2016-10-29 09:12:57
Comments
Leave a Comment

Please login to continue.