You are here

public function ResponsiveMenusSimple::getJsSettings in Responsive Menus 8

Get Drupal Javscript settings array.

Return value

array The Javascript settings array.

Overrides ResponsiveMenusPluginBase::getJsSettings

File

src/Plugin/ResponsiveMenus/ResponsiveMenusSimple.php, line 106

Class

ResponsiveMenusSimple
Defines the "responsive_menus_simple" plugin.

Namespace

Drupal\responsive_menus\Plugin\ResponsiveMenus

Code

public function getJsSettings() {
  $js_settings = [
    'toggler_text' => $this
      ->getSetting('responsive_menus_simple_text'),
    'selectors' => $this
      ->getSettingArray('responsive_menus_css_selectors'),
    'media_size' => $this
      ->getSetting('responsive_menus_media_size'),
    'media_unit' => $this
      ->getSetting('responsive_menus_media_unit'),
    'absolute' => $this
      ->getSetting('responsive_menus_simple_absolute'),
    'disable_mouse_events' => $this
      ->getSetting('responsive_menus_disable_mouse_events'),
    'remove_attributes' => $this
      ->getSetting('responsive_menus_remove_attributes'),
  ];
  return $js_settings;
}