function UpdateProcessor::__construct

Same name in other branches
  1. 8.9.x core/modules/update/src/UpdateProcessor.php \Drupal\update\UpdateProcessor::__construct()
  2. 10 core/modules/update/src/UpdateProcessor.php \Drupal\update\UpdateProcessor::__construct()
  3. 11.x core/modules/update/src/UpdateProcessor.php \Drupal\update\UpdateProcessor::__construct()

Constructs an UpdateProcessor.

Parameters

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.

\Drupal\Core\Queue\QueueFactory $queue_factory: The queue factory

\Drupal\update\UpdateFetcherInterface $update_fetcher: The update fetcher service

\Drupal\Core\State\StateInterface $state_store: The state service.

\Drupal\Core\PrivateKey $private_key: The private key factory service.

\Drupal\Core\KeyValueStore\KeyValueFactoryInterface $key_value_factory: The key/value factory.

\Drupal\Core\KeyValueStore\KeyValueExpirableFactoryInterface $key_value_expirable_factory: The expirable key/value factory.

File

core/modules/update/src/UpdateProcessor.php, line 104

Class

UpdateProcessor
Process project update information.

Namespace

Drupal\update

Code

public function __construct(ConfigFactoryInterface $config_factory, QueueFactory $queue_factory, UpdateFetcherInterface $update_fetcher, StateInterface $state_store, PrivateKey $private_key, KeyValueFactoryInterface $key_value_factory, KeyValueExpirableFactoryInterface $key_value_expirable_factory) {
    $this->updateFetcher = $update_fetcher;
    $this->updateSettings = $config_factory->get('update.settings');
    $this->fetchQueue = $queue_factory->get('update_fetch_tasks');
    $this->tempStore = $key_value_expirable_factory->get('update');
    $this->fetchTaskStore = $key_value_factory->get('update_fetch_task');
    $this->availableReleasesTempStore = $key_value_expirable_factory->get('update_available_releases');
    $this->stateStore = $state_store;
    $this->privateKey = $private_key;
    $this->fetchTasks = [];
    $this->failed = [];
}

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