public static function DefaultsEntityForm::layoutBuilderElementGetKeys in Drupal 10
Same name and namespace in other branches
- 8 core/modules/layout_builder/src/Form/DefaultsEntityForm.php \Drupal\layout_builder\Form\DefaultsEntityForm::layoutBuilderElementGetKeys()
- 9 core/modules/layout_builder/src/Form/DefaultsEntityForm.php \Drupal\layout_builder\Form\DefaultsEntityForm::layoutBuilderElementGetKeys()
Form element #process callback.
Save the layout builder element array parents as a property on the top form element so that they can be used to access the element within the whole render array later.
See also
\Drupal\layout_builder\Controller\LayoutBuilderHtmlEntityFormController
File
- core/
modules/ layout_builder/ src/ Form/ DefaultsEntityForm.php, line 100
Class
- DefaultsEntityForm
- Provides a form containing the Layout Builder UI for defaults.
Namespace
Drupal\layout_builder\FormCode
public static function layoutBuilderElementGetKeys(array $element, FormStateInterface $form_state, &$form) {
$form['#layout_builder_element_keys'] = $element['#array_parents'];
return $element;
}