public function SitemapController::buildPage in Sitemap 8
Controller for /sitemap.
Return value
array Renderable string.
1 string reference to 'SitemapController::buildPage'
File
- src/
Controller/ SitemapController.php, line 46
Class
- SitemapController
- Controller routines for update routes.
Namespace
Drupal\sitemap\ControllerCode
public function buildPage() {
$sitemap = [
'#theme' => 'sitemap',
];
// Check whether to include the default CSS.
$config = \Drupal::config('sitemap.settings');
if ($config
->get('css') == 1) {
$sitemap['#attached']['library'] = [
'sitemap/sitemap.theme',
];
}
return $sitemap;
}