function UpdateManager::__construct

Same name and namespace in other branches
  1. 10 core/modules/update/src/UpdateManager.php \Drupal\update\UpdateManager::__construct()
  2. 9 core/modules/update/src/UpdateManager.php \Drupal\update\UpdateManager::__construct()
  3. 8.9.x core/modules/update/src/UpdateManager.php \Drupal\update\UpdateManager::__construct()
  4. main core/modules/update/src/UpdateManager.php \Drupal\update\UpdateManager::__construct()

File

core/modules/update/src/UpdateManager.php, line 52

Class

UpdateManager
Default implementation of UpdateManagerInterface.

Namespace

Drupal\update

Code

public function __construct(ConfigFactoryInterface $config_factory, protected ModuleHandlerInterface $moduleHandler, protected UpdateProcessorInterface $updateProcessor, TranslationInterface $translation, #[Autowire(service: 'keyvalue.expirable')] KeyValueFactoryInterface $key_value_expirable_factory, protected ThemeHandlerInterface $themeHandler, protected ModuleExtensionList $moduleExtensionList, protected ThemeExtensionList $themeExtensionList, protected ?UpdateCalculator $updateCalculator = NULL) {
  $this->updateSettings = $config_factory->get('update.settings');
  $this->stringTranslation = $translation;
  $this->keyValueStore = $key_value_expirable_factory->get('update');
  $this->availableReleasesTempStore = $key_value_expirable_factory->get('update_available_releases');
  $this->projects = [];
  if (!$updateCalculator) {
    @trigger_error('Calling ' . __METHOD__ . '() without the $updateCalculator argument is deprecated in drupal:11.5.0 and it will be required in drupal:12.0.0. See https://www.drupal.org/node/3587768', E_USER_DEPRECATED);
    $this->updateCalculator = \Drupal::service(UpdateCalculator::class);
  }
}

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