You are here

public static function UIkitComponents::getNavCenterModifier in UIkit Components 8.3

Returns the nav center modifier setting.

Parameters

string $menu: The name of the menu.

Return value

bool Returns TRUE if nav center modifier is set, FALSE otherwise.

2 calls to UIkitComponents::getNavCenterModifier()
MenuEditForm::form in src/Form/MenuEditForm.php
Gets the actual form array to be built.
template_preprocess_menu__uikit_nav in includes/preprocess.inc
Implements template_preprocess_HOOK() for menu--uikit-nav.html.twig.

File

src/UIkitComponents.php, line 266

Class

UIkitComponents
Provides helper functions for the UIkit Components module.

Namespace

Drupal\uikit_components

Code

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