You are here

public function MeanMenu::getJsSettings in Responsive Menus 8

Get Drupal Javscript settings array.

Return value

array The Javascript settings array.

Overrides ResponsiveMenusPluginBase::getJsSettings

File

src/Plugin/ResponsiveMenus/MeanMenu.php, line 160

Class

MeanMenu
Defines the "mean_menu" plugin.

Namespace

Drupal\responsive_menus\Plugin\ResponsiveMenus

Code

public function getJsSettings() {
  $js_settings = [
    'selectors' => $this
      ->getSetting('responsive_menus_mean_menu_css_selectors'),
    'container' => $this
      ->getSetting('responsive_menus_mean_menu_container'),
    'trigger_txt' => $this
      ->getSetting('responsive_menus_mean_menu_trigger_txt'),
    'close_txt' => $this
      ->getSetting('responsive_menus_mean_menu_close_txt'),
    'close_size' => $this
      ->getSetting('responsive_menus_mean_menu_close_size'),
    'position' => $this
      ->getSetting('responsive_menus_mean_menu_position'),
    'media_size' => $this
      ->getSetting('responsive_menus_mean_menu_media_size'),
    'show_children' => $this
      ->getSetting('responsive_menus_mean_menu_show_children'),
    'expand_children' => $this
      ->getSetting('responsive_menus_mean_menu_expand_children'),
    'expand_txt' => $this
      ->getSetting('responsive_menus_mean_menu_expand_txt'),
    'contract_txt' => $this
      ->getSetting('responsive_menus_mean_menu_contract_txt'),
    'remove_attrs' => $this
      ->getSetting('responsive_menus_mean_menu_remove_attrs'),
  ];
  return $js_settings;
}