You are here

function cheeseburger_menu_theme in Cheeseburger Menu 5.0.x

Same name and namespace in other branches
  1. 8.4 cheeseburger_menu.module \cheeseburger_menu_theme()
  2. 8 cheeseburger_menu.module \cheeseburger_menu_theme()
  3. 8.2 cheeseburger_menu.module \cheeseburger_menu_theme()
  4. 8.3 cheeseburger_menu.module \cheeseburger_menu_theme()

Implements hook_theme().

File

./cheeseburger_menu.module, line 33
Contains cheeseburger_menu.module.

Code

function cheeseburger_menu_theme($existing, $type, $theme, $path) {
  return [
    'cheeseburger_menu' => [
      'variables' => [
        'tree' => [],
        'show_navigation' => TRUE,
        'side_navigation_menu_attribute' => new Attribute([
          'class' => [
            'cheeseburger-menu__side-menu',
          ],
        ]),
        'side_navigation_trigger_attribute' => new Attribute([
          'class' => [
            'cheeseburger-menu__side-trigger',
          ],
          'data-cheeseburger-close' => 'true',
        ]),
        'main_navigation_attribute' => new Attribute([
          'class' => [
            'cheeseburger-menu__main-navigation-area',
          ],
        ]),
        'trigger_icon' => '<div class="cheeseburger-menu__submenu-trigger-icon dropdown"></div>',
        'close_icon' => file_get_contents(drupal_get_path('module', 'cheeseburger_menu') . '/images/trigger-close.svg'),
      ],
    ],
    'cheeseburger_menu_trigger' => [
      'variables' => [
        'menu_id' => NULL,
      ],
    ],
  ];
}