public DbUpdateController::requirements($severity, array $requirements, Request $request)
Renders a list of requirement errors or warnings.
Parameters
\Symfony\Component\HttpFoundation\Request $request: The current request.
Return value
array A render array.
File
- core/modules/system/src/Controller/DbUpdateController.php, line 517
Class
- DbUpdateController
- Controller routines for database update routes.
Namespace
Drupal\system\Controller
Code
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; }
Please login to continue.