You are here

public function AdvancedHelpController::moduleIndex in Advanced Help 8

1 string reference to 'AdvancedHelpController::moduleIndex'
advanced_help.routing.yml in ./advanced_help.routing.yml
advanced_help.routing.yml

File

src/Controller/AdvancedHelpController.php, line 195

Class

AdvancedHelpController
Class AdvancedHelpController.

Namespace

Drupal\advanced_help\Controller

Code

public function moduleIndex($module) {
  $topics = $this->advanced_help
    ->getTopics();
  if (empty($topics[$module])) {
    throw new NotFoundHttpException();
  }
  $topics = $this
    ->getTopicHierarchy($topics);
  $items = $this
    ->getTree($topics, $topics[$module]['']['children']);
  return [
    'index' => [
      '#theme' => 'item_list',
      '#items' => $items,
    ],
  ];
}