function mmenu_class_list in Mobile sliding menu 7
Gets a list of available mmenu classes.
Parameters
string $class_name: A class name if you just want to get a particular mmenu class. Leaves empty if you want to get all available mmenu classes.
Return value
array Particular mmenu class if the 'class_name' is given. All available mmenu classes otherwise.
2 calls to mmenu_class_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.
File
- ./
mmenu.module, line 430 - Primarily Drupal hooks and global API functions to manipulate mmenus.
Code
function mmenu_class_list($class_name = '') {
// Get mmenu classes from hook.
$classes = module_invoke_all('mmenu_class');
// Invoke hook_mmenu_class_alter().
// To allow all modules to alter the mmenu class.
drupal_alter('mmenu_class', $classes);
if (!empty($class_name)) {
if (isset($classes[$class_name])) {
return $classes[$class_name];
}
else {
return array();
}
}
return $classes;
}