You are here

public function LayoutParagraphsPlugin::validateConfigurationForm in Layout Paragraphs 1.0.x

File

src/Plugin/paragraphs/Behavior/LayoutParagraphsPlugin.php, line 99

Class

LayoutParagraphsPlugin
Provides a way to define grid based layouts.

Namespace

Drupal\layout_paragraphs\Plugin\paragraphs\Behavior

Code

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.'));
  }
}