public function EntityDisplayFormBase::__construct in Drupal 8
Same name and namespace in other branches
- 9 core/modules/field_ui/src/Form/EntityDisplayFormBase.php \Drupal\field_ui\Form\EntityDisplayFormBase::__construct()
- 10 core/modules/field_ui/src/Form/EntityDisplayFormBase.php \Drupal\field_ui\Form\EntityDisplayFormBase::__construct()
Constructs a new EntityDisplayFormBase.
Parameters
\Drupal\Core\Field\FieldTypePluginManagerInterface $field_type_manager: The field type manager.
\Drupal\Component\Plugin\PluginManagerBase $plugin_manager: The widget or formatter plugin manager.
\Drupal\Core\Entity\EntityDisplayRepositoryInterface|null $entity_display_repository: (optional) The entity display_repository.
\Drupal\Core\Entity\EntityFieldManagerInterface|null $entity_field_manager: (optional) The entity field manager.
2 calls to EntityDisplayFormBase::__construct()
- FieldLayoutEntityFormDisplayEditForm::__construct in core/
modules/ field_layout/ src/ Form/ FieldLayoutEntityFormDisplayEditForm.php - FieldLayoutEntityFormDisplayEditForm constructor.
- FieldLayoutEntityViewDisplayEditForm::__construct in core/
modules/ field_layout/ src/ Form/ FieldLayoutEntityViewDisplayEditForm.php - FieldLayoutEntityViewDisplayEditForm constructor.
2 methods override EntityDisplayFormBase::__construct()
- FieldLayoutEntityFormDisplayEditForm::__construct in core/
modules/ field_layout/ src/ Form/ FieldLayoutEntityFormDisplayEditForm.php - FieldLayoutEntityFormDisplayEditForm constructor.
- FieldLayoutEntityViewDisplayEditForm::__construct in core/
modules/ field_layout/ src/ Form/ FieldLayoutEntityViewDisplayEditForm.php - FieldLayoutEntityViewDisplayEditForm constructor.
File
- core/
modules/ field_ui/ src/ Form/ EntityDisplayFormBase.php, line 80
Class
- EntityDisplayFormBase
- Base class for EntityDisplay edit forms.
Namespace
Drupal\field_ui\FormCode
public function __construct(FieldTypePluginManagerInterface $field_type_manager, PluginManagerBase $plugin_manager, EntityDisplayRepositoryInterface $entity_display_repository = NULL, EntityFieldManagerInterface $entity_field_manager = NULL) {
$this->fieldTypes = $field_type_manager
->getDefinitions();
$this->pluginManager = $plugin_manager;
if (!$entity_display_repository) {
@trigger_error('Calling EntityDisplayFormBase::__construct() with the $entity_display_repository argument is supported in Drupal 8.7.0 and will be required before Drupal 9.0.0. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
$entity_display_repository = \Drupal::service('entity_display.repository');
}
$this->entityDisplayRepository = $entity_display_repository;
if (!$entity_field_manager) {
@trigger_error('Calling EntityDisplayFormBase::__construct() with the $entity_field_manager argument is supported in Drupal 8.7.0 and will be required before Drupal 9.0.0. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
$entity_field_manager = \Drupal::service('entity_field.manager');
}
$this->entityFieldManager = $entity_field_manager;
}