function mmenu_effect_list in Mobile sliding menu 8
Same name and namespace in other branches
- 7 mmenu.module \mmenu_effect_list()
- 7.2 mmenu.module \mmenu_effect_list()
Gets a list of available mmenu effects.
Parameters
string $effect_name: A effect name if you just want to get a particular mmenu effect. Leaves empty if you want to get all available mmenu effects.
Return value
array Particular mmenu effect if the 'effect_name' is given. All available mmenu effects otherwise.
1 call to mmenu_effect_list()
- mmenu_add_libraries in ./
mmenu.module - Generates the mmenu css list and adds to Drupal.
File
- ./
mmenu.module, line 523 - Primarily Drupal hooks and global API functions to manipulate mmenus.
Code
function mmenu_effect_list($effect_name = '') {
// Get mmenu effects from hook.
$effects = Drupal::moduleHandler()
->invokeAll('mmenu_effect');
// Invoke hook_mmenu_effect_alter().
// To allow all modules to alter the mmenu effect.
Drupal::moduleHandler()
->alter('mmenu_effect', $effects);
if (!empty($effect_name)) {
if (isset($effects[$effect_name])) {
return $effects[$effect_name];
}
else {
return array();
}
}
return $effects;
}