protected function DbUpdateController::info in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/system/src/Controller/DbUpdateController.php \Drupal\system\Controller\DbUpdateController::info()
Returns the info database update page.
Parameters
\Symfony\Component\HttpFoundation\Request $request: The current request.
Return value
array A render array.
1 call to DbUpdateController::info()
- DbUpdateController::handle in core/
modules/ system/ src/ Controller/ DbUpdateController.php - Returns a database update page.
File
- core/
modules/ system/ src/ Controller/ DbUpdateController.php, line 213 - Contains \Drupal\system\Controller\DbUpdateController.
Class
- DbUpdateController
- Controller routines for database update routes.
Namespace
Drupal\system\ControllerCode
protected function info(Request $request) {
// Change query-strings on css/js files to enforce reload for all users.
_drupal_flush_css_js();
// Flush the cache of all data for the update status module.
$this->keyValueExpirableFactory
->get('update')
->deleteAll();
$this->keyValueExpirableFactory
->get('update_available_release')
->deleteAll();
$build['info_header'] = array(
'#markup' => '<p>' . $this
->t('Use this utility to update your database whenever a new release of Drupal or a module is installed.') . '</p><p>' . $this
->t('For more detailed information, see the <a href="https://www.drupal.org/upgrade">upgrading handbook</a>. If you are unsure what these terms mean you should probably contact your hosting provider.') . '</p>',
);
$info[] = $this
->t("<strong>Back up your code</strong>. Hint: when backing up module code, do not leave that backup in the 'modules' or 'sites/*/modules' directories as this may confuse Drupal's auto-discovery mechanism.");
$info[] = $this
->t('Put your site into <a href=":url">maintenance mode</a>.', array(
':url' => Url::fromRoute('system.site_maintenance_mode')
->toString(TRUE)
->getGeneratedUrl(),
));
$info[] = $this
->t('<strong>Back up your database</strong>. This process will change your database values and in case of emergency you may need to revert to a backup.');
$info[] = $this
->t('Install your new files in the appropriate location, as described in the handbook.');
$build['info'] = array(
'#theme' => 'item_list',
'#list_type' => 'ol',
'#items' => $info,
);
$build['info_footer'] = array(
'#markup' => '<p>' . $this
->t('When you have performed the steps above, you may proceed.') . '</p>',
);
$build['link'] = array(
'#type' => 'link',
'#title' => $this
->t('Continue'),
'#attributes' => array(
'class' => array(
'button',
'button--primary',
),
),
// @todo Revisit once https://www.drupal.org/node/2548095 is in.
'#url' => Url::fromUri('base://selection'),
);
return $build;
}