You are here

function mmenu_get_default_options in Mobile sliding menu 7

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

Gets default options of the mmenu.

Return value

array Default mmenu options.

1 call to mmenu_get_default_options()
mmenu_list in ./mmenu.module
Gets a list of available mmenus.

File

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

Code

function mmenu_get_default_options() {

  // $logo = theme_get_setting('logo');
  $site_name = variable_get('site_name', t('Drupal'));
  $site_name = $site_name;
  return array(
    'isMenu' => TRUE,
    // The position of the menu relative to the page.
    // Possible values: "top", "right", "bottom" or "left".
    'position' => 'left',
    // The z-position of the menu relative to the page.
    // Possible values: "back", "front" or "next".
    'zposition' => 'back',
    // Whether or not the submenus should come sliding in from the right.
    // If false, the submenus expand below their parent.
    'slidingSubmenus' => TRUE,
    // Whether or not the page should inherit the background of the body
    // when the menu opens.
    'moveBackground' => TRUE,
    // A collection of space-separated classnames to add to both the menu
    // and the HTML.
    'classes' => 'mm-basic',
    // Whether or not the menu should be opened as a "modal".
    // Basically, this means the user has no default way of closing the menu.
    // You'll have to provide a close-button yourself.
    'modal' => FALSE,
    // A map of the "counters" options.
    'counters' => array(
      // Whether or not to automatically append a counter
      // to each menu item that has a submenu.
      'add' => TRUE,
      // Whether or not to automatically count the number of items
      // in the submenu, updates when typing in the search field.
      'update' => TRUE,
    ),
    // A map of the "dragOpen" options.
    'dragOpen' => array(
      // Whether or not the menu should open when dragging the page.
      'open' => TRUE,
      // The node on which the user can drag to open the menu.
      // If omitted, the entire page is used.
      'pageNode' => "body",
      // The minimum amount of pixels to drag before actually opening the menu,
      // less than 50 is not advised.
      'threshold' => 100,
      // The maximum x-position to start dragging the page.For a menu with a
      // position set to "top" or "bottom", the default value is 50.
      'maxStartPos' => 50,
    ),
    // A map of the "header" options.
    'labels' => array(
      'add' => FALSE,
    ),
    'header' => array(
      // Whether or not to automatically prepend a fixed header to the menu.
      'add' => TRUE,
      // The contents of the header.
      // If omitted, the plugin will add a fully styled and functional
      // header with, title and back- (and next-) button.
      // 'content' => '<img src="' . $logo . '" /> ' . $site_name,
      // Whether or not to automatically update the header text
      // and back- (and next-) button when opening sub-menus.
      'update' => TRUE,
      // The text above the mainmenu.
      'title' => $site_name,
    ),
    // A map of the "search" options.
    'searchfield' => array(
      // Whether or not to automatically prepend a search field to the menu.
      'add' => FALSE,
      // Whether or not to automatically search when typing.
      'search' => FALSE,
      // The placeholder text in the search field.
      'placeholder' => t('Search'),
      // The text to show when no results are found.
      // If false no message will be shown.
      'noResults' => t('No results found.'),
      // Whether or not to only show links (A elements) in the search results.
      // If false, also SPAN elements will be shown.
      'showLinksOnly' => TRUE,
    ),
    // A map of the "onClick" options.
    'onClick' => array(
      // Whether or not the clicked link should be visibly "selected".
      'setSelected' => TRUE,
      // Whether or not to prevent the default behavior for the clicked link.
      // The default value varies per link: true if its href is equal to
      // or starts with a hash (#), false otherwise.
      'preventDefault' => FALSE,
      // Whether or not the menu should close after clicking a link inside it.
      // The default value varies per link: true if the default behavior for
      // the clicked link is prevented, false otherwise.
      'close' => FALSE,
      // Whether or not to block the user interface while loading the new page.
      // The default value varies per link: false if the default behavior for
      // the clicked link is prevented, true otherwise.
      'blockUI' => FALSE,
    ),
  );
}