function field_layout_form_alter
Same name in other branches
- 9 core/modules/field_layout/field_layout.module \field_layout_form_alter()
- 8.9.x core/modules/field_layout/field_layout.module \field_layout_form_alter()
- 11.x core/modules/field_layout/field_layout.module \field_layout_form_alter()
Implements hook_form_alter().
File
-
core/
modules/ field_layout/ field_layout.module, line 60
Code
function field_layout_form_alter(&$form, FormStateInterface $form_state, $form_id) {
$form_object = $form_state->getFormObject();
if ($form_object instanceof ContentEntityFormInterface && ($display = $form_object->getFormDisplay($form_state))) {
if ($display instanceof EntityDisplayWithLayoutInterface) {
\Drupal::classResolver(FieldLayoutBuilder::class)->buildForm($form, $display);
}
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.