function UpdateProcessor::__construct
Same name in other branches
- 9 core/modules/update/src/UpdateProcessor.php \Drupal\update\UpdateProcessor::__construct()
- 8.9.x core/modules/update/src/UpdateProcessor.php \Drupal\update\UpdateProcessor::__construct()
- 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.
\Drupal\Component\Datetime\TimeInterface|null $time: The time service.
File
-
core/
modules/ update/ src/ UpdateProcessor.php, line 107
Class
- UpdateProcessor
- Process project update information.
Namespace
Drupal\updateCode
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, ?TimeInterface $time = NULL) {
$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;
if (!$time) {
@trigger_error('Calling ' . __METHOD__ . '() without the $time argument is deprecated in drupal:10.3.0 and it will be required in drupal:11.0.0. See https://www.drupal.org/node/3387233', E_USER_DEPRECATED);
$this->time = \Drupal::service(TimeInterface::class);
}
$this->fetchTasks = [];
$this->failed = [];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.