function UpdateRegistry::__construct

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

Constructs a new UpdateRegistry.

Parameters

string $root: The app root.

string $site_path: The site path.

string[] $enabled_modules: A list of enabled modules.

\Drupal\Core\KeyValueStore\KeyValueStoreInterface $key_value: The key value store.

bool|null $include_tests: (optional) A flag whether to include tests in the scanning of modules.

File

core/lib/Drupal/Core/Update/UpdateRegistry.php, line 81

Class

UpdateRegistry
Provides all and missing update implementations.

Namespace

Drupal\Core\Update

Code

public function __construct($root, $site_path, array $enabled_modules, KeyValueStoreInterface $key_value, $include_tests = NULL) {
    $this->root = $root;
    $this->sitePath = $site_path;
    $this->enabledModules = $enabled_modules;
    $this->keyValue = $key_value;
    $this->includeTests = $include_tests;
}

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