function EntityDisplayModeFormBase::init
Same name in other branches
- 9 core/modules/field_ui/src/Form/EntityDisplayModeFormBase.php \Drupal\field_ui\Form\EntityDisplayModeFormBase::init()
- 8.9.x core/modules/field_ui/src/Form/EntityDisplayModeFormBase.php \Drupal\field_ui\Form\EntityDisplayModeFormBase::init()
- 10 core/modules/field_ui/src/Form/EntityDisplayModeFormBase.php \Drupal\field_ui\Form\EntityDisplayModeFormBase::init()
Overrides EntityForm::init
File
-
core/
modules/ field_ui/ src/ Form/ EntityDisplayModeFormBase.php, line 44
Class
- EntityDisplayModeFormBase
- Provides the generic base class for entity display mode forms.
Namespace
Drupal\field_ui\FormCode
protected function init(FormStateInterface $form_state) {
parent::init($form_state);
$this->entityType = $this->entityTypeManager
->getDefinition($this->entity
->getEntityTypeId());
$this->displayContext = str_replace([
'entity_',
'_mode',
], '', $this->entityType
->id());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.