function DbUpdateController::__construct
Same name and namespace in other branches
- 11.x core/modules/system/src/Controller/DbUpdateController.php \Drupal\system\Controller\DbUpdateController::__construct()
- 10 core/modules/system/src/Controller/DbUpdateController.php \Drupal\system\Controller\DbUpdateController::__construct()
- 9 core/modules/system/src/Controller/DbUpdateController.php \Drupal\system\Controller\DbUpdateController::__construct()
- 8.9.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 $keyValueExpirableFactory: 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 $bareHtmlPageRenderer: The bare HTML page renderer.
\Drupal\Core\Update\UpdateRegistry $postUpdateRegistry: The post update registry.
\Drupal\Core\Asset\AssetQueryStringInterface $assetQueryString: The asset query string.
\Drupal\Core\Update\DatabaseUpdate|null $databaseUpdate: The database update service.
\Drupal\Core\Update\UpdateHookRegistry|null $updateHookRegistry: The update hook registry.
File
-
core/
modules/ system/ src/ Controller/ DbUpdateController.php, line 62
Class
- DbUpdateController
- Controller routines for database update routes.
Namespace
Drupal\system\ControllerCode
public function __construct(protected $root, protected KeyValueExpirableFactoryInterface $keyValueExpirableFactory, protected CacheBackendInterface $cache, protected StateInterface $state, ModuleHandlerInterface $module_handler, protected AccountInterface $account, protected BareHtmlPageRendererInterface $bareHtmlPageRenderer, protected UpdateRegistry $postUpdateRegistry, protected AssetQueryStringInterface $assetQueryString, protected ?DatabaseUpdate $databaseUpdate = NULL, protected ?UpdateHookRegistry $updateHookRegistry = NULL) {
$this->moduleHandler = $module_handler;
if ($this->databaseUpdate === NULL) {
@trigger_error('Calling ' . __METHOD__ . ' without the $databaseUpdate argument is deprecated in drupal:11.5.0 and it will be required in drupal:13.0.0. See https://www.drupal.org/node/3013060', E_USER_DEPRECATED);
$this->databaseUpdate = \Drupal::service(DatabaseUpdate::class);
}
if ($this->updateHookRegistry === NULL) {
@trigger_error('Calling ' . __METHOD__ . ' without the $updateHookRegistry argument is deprecated in drupal:11.5.0 and it will be required in drupal:13.0.0. See https://www.drupal.org/node/3013060', E_USER_DEPRECATED);
$this->updateHookRegistry = \Drupal::service('update.update_hook_registry');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.