You are here

function _site_map_faq in Site map 8

Same name and namespace in other branches
  1. 5 site_map.module \_site_map_faq()
  2. 6.2 site_map.module \_site_map_faq()
  3. 6 site_map.module \_site_map_faq()
  4. 7 site_map.module \_site_map_faq()

Render the latest maps for faq.

Return value

string Returns HTML string of site map for faq.

File

./site_map.module, line 432
Provides a site map functionality.

Code

function _site_map_faq() {
  $output = '';
  $options = array();
  if (\Drupal::service('module_handler')
    ->moduleExists('faq')) {
    $title = \Drupal::config('faq.settings')
      ->get('faq_title');
    $attributes = array(
      'class' => array(
        'site-map-box-faq',
      ),
    );
    $output = faq_get_faq_list();
    \Drupal::service('site_map.helper')
      ->setOption($options, 'show_titles', 1, 'show_titles', TRUE);
    $site_map_box = array(
      '#theme' => 'site_map_box',
      '#title' => $title,
      '#content' => $output,
      '#attributes' => $attributes,
      '#options' => $options,
    );
    $output = drupal_render($site_map_box);
  }
  return $output;
}