function UpdateHookRegistry::__construct

Same name in other branches
  1. 9 core/lib/Drupal/Core/Update/UpdateHookRegistry.php \Drupal\Core\Update\UpdateHookRegistry::__construct()
  2. 10 core/lib/Drupal/Core/Update/UpdateHookRegistry.php \Drupal\Core\Update\UpdateHookRegistry::__construct()

Constructs a new UpdateHookRegistry.

Parameters

array $module_list: An associative array whose keys are the names of installed modules.

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

File

core/lib/Drupal/Core/Update/UpdateHookRegistry.php, line 82

Class

UpdateHookRegistry
Provides module updates versions handling.

Namespace

Drupal\Core\Update

Code

public function __construct(array $module_list, KeyValueFactoryInterface $key_value_factory) {
    $this->enabledModules = array_keys($module_list);
    $this->keyValue = $key_value_factory->get('system.schema');
    $this->equivalentUpdates = $key_value_factory->get('core.equivalent_updates');
}

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