You are here

public function LayoutParagraphsBehavior::validateBehaviorForm in Layout Paragraphs 2.0.x

File

src/Plugin/paragraphs/Behavior/LayoutParagraphsBehavior.php, line 163

Class

LayoutParagraphsBehavior
Provides a way to define grid based layouts.

Namespace

Drupal\layout_paragraphs\Plugin\paragraphs\Behavior

Code

public function validateBehaviorForm(ParagraphInterface $paragraph, array &$form, FormStateInterface $form_state) {
  $plugin_instance = $this->layoutPluginManager
    ->createInstance($form_state
    ->getValue('layout'), $form_state
    ->getValue('config'));
  if ($plugin_form = $this
    ->getLayoutPluginForm($plugin_instance)) {
    $plugin_form
      ->validateConfigurationForm($form, $form_state);
  }
}