You are here

public function DefaultProcessor::submitConfigurationForm in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/aggregator/src/Plugin/aggregator/processor/DefaultProcessor.php \Drupal\aggregator\Plugin\aggregator\processor\DefaultProcessor::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 PluginFormInterface::submitConfigurationForm

File

core/modules/aggregator/src/Plugin/aggregator/processor/DefaultProcessor.php, line 174

Class

DefaultProcessor
Defines a default processor implementation.

Namespace

Drupal\aggregator\Plugin\aggregator\processor

Code

public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
  $this->configuration['items']['expire'] = $form_state
    ->getValue('aggregator_clear');
  $this->configuration['items']['teaser_length'] = $form_state
    ->getValue('aggregator_teaser_length');
  $this->configuration['source']['list_max'] = $form_state
    ->getValue('aggregator_summary_items');

  // @todo Refactor aggregator plugins to ConfigEntity so this is not needed.
  $this
    ->setConfiguration($this->configuration);
}