function dashboards_form_dashboard_form_alter in Dashboards with Layout Builder 2.0.x
Implements hook_form_FORM_ID_alter() for the entity view display edit form.
File
- ./
dashboards.module, line 107 - Contains dashboards.module.
Code
function dashboards_form_dashboard_form_alter(&$form, FormStateInterface $form_state, $form_id) {
if (!\Drupal::service('module_handler')
->moduleExists('layout_builder_restrictions')) {
return;
}
\Drupal::classResolver(FormAlter::class)
->alterEntityViewDisplayFormAllowedBlockCategories($form, $form_state, $form_id);
\Drupal::classResolver(FormAlter::class)
->alterEntityViewDisplayForm($form, $form_state, $form_id);
}