You are here

function mmenu_mmenu in Mobile sliding menu 8

Same name and namespace in other branches
  1. 7.3 mmenu.module \mmenu_mmenu()
  2. 7 mmenu.module \mmenu_mmenu()
  3. 7.2 mmenu.module \mmenu_mmenu()

Implements hook_mmenu().

File

./mmenu.module, line 16
Primarily Drupal hooks and global API functions to manipulate mmenus.

Code

function mmenu_mmenu() {
  return [
    'mmenu_left' => [
      'enabled' => TRUE,
      'name' => 'mmenu_left',
      'title' => t('Left menu'),
      'blocks' => [
        [
          'title' => t('Main menu'),
          'plugin_id' => 'mmenu:primary_navigation',
          //'plugin_id' => 'system_menu_block:main',
          'collapsed' => FALSE,
          'wrap' => FALSE,
        ],
        [
          'title' => t('Admin menu'),
          'plugin_id' => 'system_menu_block:admin',
          'collapsed' => FALSE,
          'wrap' => FALSE,
        ],
      ],
      'options' => [
        'extensions' => [
          'position-left',
          'theme-black',
          'border-full',
          'fx-menu-fade',
          'fx-panels-none',
          'fx-listitems-slide',
        ],
        'drag' => [
          'menu' => [
            'open' => TRUE,
            'node' => 'body',
          ],
        ],
        'clickOpen' => [
          'open' => TRUE,
          'selector' => '#logo',
        ],
        'navbars' => [
          [
            'position' => 'top',
            'content' => [
              'breadcrumbs',
              'close',
            ],
          ],
        ],
        'counters' => TRUE,
        'offCanvas' => TRUE,
      ],
      'configurations' => [
        'drag' => [
          'menu' => [
            'width' => [
              'perc' => 0.8,
              'min' => 140,
              'max' => 440,
            ],
            'height' => [
              'perc' => 0.8,
              'min' => 140,
              'max' => 880,
            ],
          ],
        ],
      ],
    ],
    'mmenu_right' => [
      'enabled' => FALSE,
      'name' => 'mmenu_right',
      'title' => t('Right menu'),
      'blocks' => [
        [
          'title' => t('Search'),
          'plugin_id' => 'mmenu:search',
          'collapsed' => FALSE,
          'wrap' => TRUE,
        ],
        [
          'title' => t('Admin menu'),
          'plugin_id' => 'system_menu_block:admin',
          'collapsed' => FALSE,
          'wrap' => FALSE,
        ],
      ],
      'options' => [
        'extensions' => [
          'position-right',
        ],
        'drag' => [
          'menu' => [
            'open' => TRUE,
            'node' => 'body',
          ],
        ],
        'clickOpen' => [
          'open' => TRUE,
          'selector' => '.header-logo',
        ],
        'counters' => TRUE,
      ],
      'configurations' => [],
    ],
    'mmenu_top' => [
      'enabled' => FALSE,
      'name' => 'mmenu_top',
      'title' => t('Top menu'),
      'blocks' => [
        [
          'title' => t('Log in'),
          'plugin_id' => 'mmenu:search',
          'collapsed' => FALSE,
          'wrap' => TRUE,
        ],
      ],
      'options' => [
        'extensions' => [
          'position-top',
        ],
      ],
      'configurations' => [],
    ],
    'mmenu_bottom' => [
      'enabled' => FALSE,
      'name' => 'mmenu_bottom',
      'title' => t('Bottom menu'),
      'blocks' => [
        [
          'title' => t('Administration'),
          'plugin_id' => 'mmenu:search',
          'collapsed' => FALSE,
          'wrap' => TRUE,
          'menu_parameters' => [
            'min_depth' => 2,
          ],
        ],
      ],
      'options' => [
        'extensions' => [
          'position-bottom',
        ],
      ],
      'configurations' => [],
    ],
  ];
}