public function LicenseTypeBase::submitConfigurationForm in Commerce License 8.2
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 PluginFormInterface::submitConfigurationForm
1 method overrides LicenseTypeBase::submitConfigurationForm()
- Role::submitConfigurationForm in src/
Plugin/ Commerce/ LicenseType/ Role.php - Form submission handler.
File
- src/
Plugin/ Commerce/ LicenseType/ LicenseTypeBase.php, line 61
Class
- LicenseTypeBase
- Provides the base license type class.
Namespace
Drupal\commerce_license\Plugin\Commerce\LicenseTypeCode
public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
// This assumes that for each property defined in defaultConfiguration(),
// there is a form element of the same name, and saves its value into
// that configuration property.
$values = $form_state
->getValue($form['#parents']);
$property_names = array_keys($this
->defaultConfiguration());
foreach ($property_names as $property) {
$this->configuration[$property] = $values[$property];
}
}