public function ConfigPagesValueAccess::submitConfigurationForm in Config Pages 8.3
Same name and namespace in other branches
- 8.2 src/Plugin/Condition/ConfigPagesValueAccess.php \Drupal\config_pages\Plugin\Condition\ConfigPagesValueAccess::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/ ConfigPagesValueAccess.php, line 195
Class
- ConfigPagesValueAccess
- Provides a 'Access by ConfigPage field value' condition.
Namespace
Drupal\config_pages\Plugin\ConditionCode
public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
parent::submitConfigurationForm($form, $form_state);
$field = $form_state
->getValue('config_page_field');
if ($field == '_none') {
$this->configuration = [];
}
else {
$this->configuration['config_page_field'] = $field;
$this->configuration['operator'] = $form_state
->getValue('operator');
$this->configuration['condition_value'] = $form_state
->getValue('condition_value');
}
}