function layout_builder_at_validate_form_display in Layout Builder Asymmetric Translation 8.2
Validation callback for the manage form display screen.
Parameters
$form:
\Drupal\Core\Form\FormStateInterface $form_state:
1 string reference to 'layout_builder_at_validate_form_display'
File
- ./
layout_builder_at.module, line 71 - Provides hook implementations for Layout Builder Asymmetric Translation.
Code
function layout_builder_at_validate_form_display($form, FormStateInterface $form_state) {
$values = $form_state
->getValues();
if (isset($values['fields'][OverridesSectionStorage::FIELD_NAME])) {
if ($values['fields'][OverridesSectionStorage::FIELD_NAME]['type'] == 'layout_builder_widget') {
$form_state
->setErrorByName('fields][' . OverridesSectionStorage::FIELD_NAME, t('You can not select the Layout Builder Widget, please select a different widget.'));
}
}
}