You are here

public function SitemapController::buildPage in Site map 8

Controller for /sitemap.

Return value

array Renderable string.

1 string reference to 'SitemapController::buildPage'
site_map.routing.yml in ./site_map.routing.yml
site_map.routing.yml

File

src/Controller/SitemapController.php, line 46

Class

SitemapController
Controller routines for update routes.

Namespace

Drupal\site_map\Controller

Code

public function buildPage() {
  $site_map = array(
    '#theme' => 'site_map',
  );
  $config = \Drupal::config('site_map.settings');
  if ($config
    ->get('css') != 1) {
    $site_map['#attached']['library'] = array(
      'site_map/site_map.theme',
    );
  }
  return $site_map;
}