public function FieldUninstallValidator::__construct in Zircon Profile 8
Same name in this branch
- 8 core/modules/field/src/FieldUninstallValidator.php \Drupal\field\FieldUninstallValidator::__construct()
- 8 core/modules/field/src/ProxyClass/FieldUninstallValidator.php \Drupal\field\ProxyClass\FieldUninstallValidator::__construct()
Same name and namespace in other branches
- 8.0 core/modules/field/src/FieldUninstallValidator.php \Drupal\field\FieldUninstallValidator::__construct()
Constructs a new FieldUninstallValidator.
Parameters
\Drupal\Core\Entity\EntityManagerInterface $entity_manager: The entity manager.
\Drupal\Core\StringTranslation\TranslationInterface $string_translation: The string translation service.
File
- core/
modules/ field/ src/ FieldUninstallValidator.php, line 37 - Contains \Drupal\field\FieldUninstallValidator.
Class
- FieldUninstallValidator
- Prevents uninstallation of modules providing active field storage.
Namespace
Drupal\fieldCode
public function __construct(EntityManagerInterface $entity_manager, TranslationInterface $string_translation) {
$this->fieldStorageConfigStorage = $entity_manager
->getStorage('field_storage_config');
$this->stringTranslation = $string_translation;
}