You are here

public static function UIkitComponents::getMenuStyle in UIkit Components 8.2

Same name and namespace in other branches
  1. 8.3 src/UIkitComponents.php \Drupal\uikit_components\UIkitComponents::getMenuStyle()

Returns the menu style.

Parameters

string $menu: The name of the menu.

Return value

bool Returns menu style, FALSE otherwise.

5 calls to UIkitComponents::getMenuStyle()
MenuEditForm::form in src/Form/MenuEditForm.php
Gets the actual form array to be built.
template_preprocess_menu__uk_list in includes/preprocess.inc
Implements template_preprocess_HOOK() for menu--uk-list.html.twig.
template_preprocess_menu__uk_nav in includes/preprocess.inc
Implements template_preprocess_HOOK() for menu--uk-nav.html.twig.
template_preprocess_menu__uk_subnav in includes/preprocess.inc
Implements template_preprocess_HOOK() for menu--uk-subnav.html.twig.
uikit_components_theme_suggestions_menu_alter in includes/alter.inc
Implements hook_theme_suggestions_HOOK_alter().

File

src/UIkitComponents.php, line 138

Class

UIkitComponents
Class UIkitComponents

Namespace

Drupal\uikit_components

Code

public static function getMenuStyle($menu) {
  return \Drupal::state()
    ->get($menu . '_menu_style') ?: 0;
}