function layout_builder_entity_form_display_alter
Same name in other branches
- 9 core/modules/layout_builder/tests/modules/layout_builder_test/layout_builder_test.module \layout_builder_entity_form_display_alter()
- 8.9.x core/modules/layout_builder/tests/modules/layout_builder_test/layout_builder_test.module \layout_builder_entity_form_display_alter()
- 11.x core/modules/layout_builder/tests/modules/layout_builder_test/layout_builder_test.module \layout_builder_entity_form_display_alter()
Implements hook_entity_form_display_alter().
File
-
core/
modules/ layout_builder/ tests/ modules/ layout_builder_test/ layout_builder_test.module, line 124
Code
function layout_builder_entity_form_display_alter(EntityFormDisplayInterface $form_display, array $context) {
if ($context['form_mode'] === 'layout_builder') {
$form_display->setComponent('status', [
'type' => 'boolean_checkbox',
'settings' => [
'display_label' => TRUE,
],
]);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.