function DefaultProcessor::__construct

Same name in other branches
  1. 9 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.

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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.