You are here

function mmenu_extension_list in Mobile sliding menu 7.3

Gets a list of available mmenu extensions.

Parameters

string $extension_name: A extension name if you just want to get a particular mmenu extension. Leaves empty if you want to get all available mmenu extensions.

Return value

array Particular mmenu extension if the 'extension_name' is given. All available mmenu extensions otherwise.

4 calls to mmenu_extension_list()
mmenu_add_css in ./mmenu.module
Generates the mmenu css list and adds to Drupal.
mmenu_admin_settings_form in ./mmenu.admin.inc
Form constructor for the Mmenu settings form.
mmenu_admin_settings_form_submit in ./mmenu.admin.inc
Form submission handler for mmenu_admin_settings_form().
mmenu_page_build in ./mmenu.module
Implements hook_page_build().

File

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

Code

function mmenu_extension_list($extension_name = '') {

  // Get mmenu effects from hook.
  $extensions = module_invoke_all('mmenu_extension');

  // Invoke hook_mmenu_extension_alter().
  // To allow all modules to alter the mmenu extension.
  drupal_alter('mmenu_extension', $extensions);
  if (!empty($extension_name)) {
    if (isset($extensions[$extension_name])) {
      return $extensions[$extension_name];
    }
    else {
      return array();
    }
  }
  return $extensions;
}