function DbUpdateController::__construct

Same name in other branches
  1. 9 core/modules/system/src/Controller/DbUpdateController.php \Drupal\system\Controller\DbUpdateController::__construct()
  2. 8.9.x core/modules/system/src/Controller/DbUpdateController.php \Drupal\system\Controller\DbUpdateController::__construct()
  3. 11.x core/modules/system/src/Controller/DbUpdateController.php \Drupal\system\Controller\DbUpdateController::__construct()

Constructs a new UpdateController.

Parameters

string $root: The app root.

\Drupal\Core\KeyValueStore\KeyValueExpirableFactoryInterface $key_value_expirable_factory: The keyvalue expirable factory.

\Drupal\Core\Cache\CacheBackendInterface $cache: A cache backend interface.

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

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

\Drupal\Core\Session\AccountInterface $account: The current user.

\Drupal\Core\Render\BareHtmlPageRendererInterface $bare_html_page_renderer: The bare HTML page renderer.

\Drupal\Core\Update\UpdateRegistry $post_update_registry: The post update registry.

\Drupal\Core\Asset\AssetQueryStringInterface $assetQueryString: The asset query string.

File

core/modules/system/src/Controller/DbUpdateController.php, line 104

Class

DbUpdateController
Controller routines for database update routes.

Namespace

Drupal\system\Controller

Code

public function __construct($root, KeyValueExpirableFactoryInterface $key_value_expirable_factory, CacheBackendInterface $cache, StateInterface $state, ModuleHandlerInterface $module_handler, AccountInterface $account, BareHtmlPageRendererInterface $bare_html_page_renderer, UpdateRegistry $post_update_registry, ?AssetQueryStringInterface $assetQueryString = NULL) {
    $this->root = $root;
    $this->keyValueExpirableFactory = $key_value_expirable_factory;
    $this->cache = $cache;
    $this->state = $state;
    $this->moduleHandler = $module_handler;
    $this->account = $account;
    $this->bareHtmlPageRenderer = $bare_html_page_renderer;
    $this->postUpdateRegistry = $post_update_registry;
    if ($this->assetQueryString === NULL) {
        $this->assetQueryString = \Drupal::service('asset.query_string');
        @trigger_error('Calling' . __METHOD__ . '() without the $assetQueryString argument is deprecated in drupal:10.2.0 and is required in drupal:11.0.0. See https://www.drupal.org/node/3358337', E_USER_DEPRECATED);
    }
}

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