public function DbUpdateController::requirements in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/src/Controller/DbUpdateController.php \Drupal\system\Controller\DbUpdateController::requirements()
Renders a list of requirement errors or warnings.
Parameters
\Symfony\Component\HttpFoundation\Request $request: The current request.
Return value
array A render array.
1 call to DbUpdateController::requirements()
- DbUpdateController::handle in core/
modules/ system/ src/ Controller/ DbUpdateController.php - Returns a database update page.
File
- core/
modules/ system/ src/ Controller/ DbUpdateController.php, line 521 - Contains \Drupal\system\Controller\DbUpdateController.
Class
- DbUpdateController
- Controller routines for database update routes.
Namespace
Drupal\system\ControllerCode
public function requirements($severity, array $requirements, Request $request) {
$options = $severity == REQUIREMENT_WARNING ? array(
'continue' => 1,
) : array();
// @todo Revisit once https://www.drupal.org/node/2548095 is in. Something
// like Url::fromRoute('system.db_update')->setOptions() should then be
// possible.
$try_again_url = Url::fromUri($request
->getUriForPath(''))
->setOptions([
'query' => $options,
])
->toString(TRUE)
->getGeneratedUrl();
$build['status_report'] = array(
'#theme' => 'status_report',
'#requirements' => $requirements,
'#suffix' => $this
->t('Check the messages and <a href=":url">try again</a>.', array(
':url' => $try_again_url,
)),
);
$build['#title'] = $this
->t('Requirements problem');
return $build;
}