You are here

public static function UIkitComponents::setMenuStyle in UIkit Components 8.2

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

Sets the menu style.

Parameters

string $menu: The name of the menu.

string $value: The style value to set for the menu.

1 call to UIkitComponents::setMenuStyle()
MenuEditForm::submitForm in src/Form/MenuEditForm.php
This is the default entity object builder function. It is called before any other submit handler to build the new entity object to be used by the following submit handlers. At this point of the form workflow the entity is validated and the form state…

File

src/UIkitComponents.php, line 151

Class

UIkitComponents
Class UIkitComponents

Namespace

Drupal\uikit_components

Code

public static function setMenuStyle($menu, $value) {
  \Drupal::state()
    ->set($menu . '_menu_style', $value);
}