You are here

public function DefaultProcessor::__construct 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::__construct()

Constructs a DefaultProcessor object.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Config\ConfigFactoryInterface $config: The configuration factory object.

\Drupal\aggregator\ItemStorageInterface $item_storage: The entity storage for feed items.

\Drupal\Core\Datetime\DateFormatterInterface $date_formatter: The date formatter service.

\Drupal\Core\Messenger\MessengerInterface $messenger: The messenger.

Overrides PluginBase::__construct

File

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

Class

DefaultProcessor
Defines a default processor implementation.

Namespace

Drupal\aggregator\Plugin\aggregator\processor

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, ConfigFactoryInterface $config, ItemStorageInterface $item_storage, DateFormatterInterface $date_formatter, MessengerInterface $messenger) {
  $this->configFactory = $config;
  $this->itemStorage = $item_storage;
  $this->dateFormatter = $date_formatter;
  $this->messenger = $messenger;

  // @todo Refactor aggregator plugins to ConfigEntity so merging
  //   the configuration here is not needed.
  parent::__construct($configuration + $this
    ->getConfiguration(), $plugin_id, $plugin_definition);
}