You are here

public function Webform::submitConfigurationForm in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Plugin/Condition/Webform.php \Drupal\webform\Plugin\Condition\Webform::submitConfigurationForm()

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 ConditionPluginBase::submitConfigurationForm

File

src/Plugin/Condition/Webform.php, line 101

Class

Webform
Provides a 'Webform' condition.

Namespace

Drupal\webform\Plugin\Condition

Code

public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
  $values = $form_state
    ->getValue('webforms') ?: [];
  $values = array_filter($values);
  $this->configuration['webforms'] = array_combine($values, $values);
  parent::submitConfigurationForm($form, $form_state);
}