public function LayoutParagraphsBehavior::validateConfigurationForm in Layout Paragraphs 2.0.x
File
- src/
Plugin/ paragraphs/ Behavior/ LayoutParagraphsBehavior.php, line 241
Class
- LayoutParagraphsBehavior
- Provides a way to define grid based layouts.
Namespace
Drupal\layout_paragraphs\Plugin\paragraphs\BehaviorCode
public function validateConfigurationForm(array &$form, FormStateInterface $form_state) {
if (empty($form_state
->getValue('available_layouts'))) {
$form_state
->setErrorByName('available_layouts', $this
->t('You must select at least one layout.'));
}
}