You are here

public function TestProcessor::setConfiguration in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/aggregator/tests/modules/aggregator_test/src/Plugin/aggregator/processor/TestProcessor.php \Drupal\aggregator_test\Plugin\aggregator\processor\TestProcessor::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 TestProcessor::setConfiguration()
TestProcessor::submitConfigurationForm in core/modules/aggregator/tests/modules/aggregator_test/src/Plugin/aggregator/processor/TestProcessor.php
Form submission handler.

File

core/modules/aggregator/tests/modules/aggregator_test/src/Plugin/aggregator/processor/TestProcessor.php, line 140

Class

TestProcessor
Defines a default processor implementation.

Namespace

Drupal\aggregator_test\Plugin\aggregator\processor

Code

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