function NavigationHooks::theme

Implements hook_theme().

Attributes

#[Hook('theme')]

File

core/modules/navigation/src/Hook/NavigationHooks.php, line 96

Class

NavigationHooks
Hook implementations for navigation.

Namespace

Drupal\navigation\Hook

Code

public function theme($existing, $type, $theme, $path) : array {
  $items['top_bar'] = [
    'render element' => 'element',
  ];
  $items['top_bar_page_actions'] = [
    'variables' => [
      'page_actions' => [],
      'featured_page_actions' => [],
    ],
  ];
  $items['top_bar_page_action'] = [
    'variables' => [
      'link' => [],
    ],
  ];
  $items['block__navigation'] = [
    'render element' => 'elements',
    'base hook' => 'block',
  ];
  $items['navigation_menu'] = [
    'base hook' => 'menu',
    'variables' => [
      'menu_name' => NULL,
      'title' => NULL,
      'items' => [],
      'attributes' => [],
    ],
  ];
  $items['navigation_content_top'] = [
    'variables' => [
      'items' => [],
    ],
  ];
  $items['navigation__messages'] = [
    'variables' => [
      'message_list' => NULL,
    ],
  ];
  $items['navigation__message'] = [
    'variables' => [
      'attributes' => [],
      'url' => NULL,
      'content' => NULL,
      'type' => 'status',
    ],
  ];
  return $items;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.