FieldLayoutEntityDisplayFormTrait
trait FieldLayoutEntityDisplayFormTrait (View source)
Provides shared code for entity display forms.
Both EntityViewDisplayEditForm and EntityFormDisplayEditForm must maintain their parent hierarchy, while being identically enhanced by Field Layout. This trait contains the code they both share.
Properties
| protected LayoutPluginManagerInterface | $layoutPluginManager | The field layout plugin manager. |
Methods
Overrides \Drupal\field_ui\Form\EntityDisplayFormBase::getRegions().
Overrides \Drupal\field_ui\Form\EntityDisplayFormBase::form().
Gets the layout plugin for the currently selected field layout.
Ajax callback for the field layout settings form.
Overrides \Drupal\field_ui\Form\EntityDisplayFormBase::validateForm().
Overrides \Drupal\field_ui\Form\EntityDisplayFormBase::submitForm().
Gets the form entity.
Details
getRegions()
Overrides \Drupal\field_ui\Form\EntityDisplayFormBase::getRegions().
form(array $form, FormStateInterface $form_state)
Overrides \Drupal\field_ui\Form\EntityDisplayFormBase::form().
protected LayoutInterface
getLayout(EntityDisplayWithLayoutInterface $entity, FormStateInterface $form_state)
Gets the layout plugin for the currently selected field layout.
static
settingsAjax($form, FormStateInterface $form_state)
Ajax callback for the field layout settings form.
settingsAjaxSubmit($form, FormStateInterface $form_state)
Submit handler for the non-JS case.
validateForm(array $form, FormStateInterface $form_state)
Overrides \Drupal\field_ui\Form\EntityDisplayFormBase::validateForm().
submitForm(array $form, FormStateInterface $form_state)
Overrides \Drupal\field_ui\Form\EntityDisplayFormBase::submitForm().
abstract EntityDisplayWithLayoutInterface
getEntity()
Gets the form entity.