You are here

public function DefaultProcessor::setConfiguration in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/aggregator/src/Plugin/aggregator/processor/DefaultProcessor.php \Drupal\aggregator\Plugin\aggregator\processor\DefaultProcessor::setConfiguration()

Sets the configuration for this plugin instance.

Parameters

array $configuration: An associative array containing the plugin's configuration.

Overrides ConfigurableInterface::setConfiguration

1 call to DefaultProcessor::setConfiguration()
DefaultProcessor::submitConfigurationForm in core/modules/aggregator/src/Plugin/aggregator/processor/DefaultProcessor.php
Form submission handler.

File

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

Class

DefaultProcessor
Defines a default processor implementation.

Namespace

Drupal\aggregator\Plugin\aggregator\processor

Code

public function setConfiguration(array $configuration) {
  $config = $this
    ->config('aggregator.settings');
  foreach ($configuration as $key => $value) {
    $config
      ->set($key, $value);
  }
  $config
    ->save();
}