You are here

public static function UIkitComponents::getNavWidthClasses in UIkit Components 8.2

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

Returns the menu nav width classes.

Parameters

string $menu: The name of the menu.

Return value

bool Returns TRUE if the nav width classes are set, FALSE otherwise.

4 calls to UIkitComponents::getNavWidthClasses()
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.

File

src/UIkitComponents.php, line 164

Class

UIkitComponents
Class UIkitComponents

Namespace

Drupal\uikit_components

Code

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