function LayoutBuilderTestHooks::layoutBuilderEntityFormDisplayAlter
Implements hook_entity_form_display_alter().
File
-
core/
modules/ layout_builder/ tests/ modules/ layout_builder_test/ src/ Hook/ LayoutBuilderTestHooks.php, line 108
Class
- LayoutBuilderTestHooks
- Hook implementations for layout_builder_test.
Namespace
Drupal\layout_builder_test\HookCode
public function layoutBuilderEntityFormDisplayAlter(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.