You are here

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

File

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

Class

LayoutParagraphsBehavior
Provides a way to define grid based layouts.

Namespace

Drupal\layout_paragraphs\Plugin\paragraphs\Behavior

Code

public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
  $available_layouts = array_filter($form_state
    ->getValue('available_layouts'));
  foreach ($available_layouts as $layout_name) {
    $layout = $this->layoutPluginManager
      ->getDefinition($layout_name);
    $this->configuration['available_layouts'][$layout_name] = $layout
      ->getLabel();
  }
}