protected function DbUpdateController::helpfulLinks in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/src/Controller/DbUpdateController.php \Drupal\system\Controller\DbUpdateController::helpfulLinks()
Provides links to the homepage and administration pages.
Parameters
\Symfony\Component\HttpFoundation\Request $request: The current request.
Return value
array An array of links.
2 calls to DbUpdateController::helpfulLinks()
- DbUpdateController::results in core/
modules/ system/ src/ Controller/ DbUpdateController.php - Displays results of the update script with any accompanying errors.
- DbUpdateController::selection in core/
modules/ system/ src/ Controller/ DbUpdateController.php - Renders a list of available database updates.
File
- core/
modules/ system/ src/ Controller/ DbUpdateController.php, line 677 - Contains \Drupal\system\Controller\DbUpdateController.
Class
- DbUpdateController
- Controller routines for database update routes.
Namespace
Drupal\system\ControllerCode
protected function helpfulLinks(Request $request) {
// @todo Simplify with https://www.drupal.org/node/2548095
$base_url = str_replace('/update.php', '', $request
->getBaseUrl());
$links['front'] = array(
'title' => $this
->t('Front page'),
'url' => Url::fromRoute('<front>')
->setOption('base_url', $base_url),
);
if ($this->account
->hasPermission('access administration pages')) {
$links['admin-pages'] = array(
'title' => $this
->t('Administration pages'),
'url' => Url::fromRoute('system.admin')
->setOption('base_url', $base_url),
);
}
return $links;
}