You are here

public function ParagraphsViewmodeBehavior::submitConfigurationForm in Paragraphs View Modes 8

Form submission handler.

Parameters

array $form: An associative array containing the structure of the plugin form as built by static::buildConfigurationForm().

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Calling code should pass on a subform state created through \Drupal\Core\Form\SubformState::createForSubform().

Overrides ParagraphsBehaviorBase::submitConfigurationForm

File

src/Plugin/paragraphs/Behavior/ParagraphsViewmodeBehavior.php, line 120

Class

ParagraphsViewmodeBehavior
Class ParagraphsViewmodeBehavior.

Namespace

Drupal\paragraphs_viewmode\Plugin\paragraphs\Behavior

Code

public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
  $override_mode = $form_state
    ->getValue('override_mode');
  $override_available = $form_state
    ->getValue('override_available');
  $override_default = $form_state
    ->getValue('override_default');
  $this->configuration['override_mode'] = $override_mode;
  $this->configuration['override_available'] = array_filter($override_available);
  $this->configuration['override_default'] = $override_default;
  parent::submitConfigurationForm($form, $form_state);
}