function emfield_provider_menus in Embedded Media Field 6.3
Same name and namespace in other branches
- 6 emfield.module \emfield_provider_menus()
- 6.2 emfield.module \emfield_provider_menus()
Allow providers to create their own menus.
@TODO: Remove this once we've moved all providers outside emfield, as their wrapping modules can use standard Drupal hooks.
1 call to emfield_provider_menus()
- emvideo_menu in contrib/
emvideo/ emvideo.module - Implementation of hook_menu().
File
- deprecated/
emfield-deprecated.inc, line 737 - Functionality to be deprecated from earlier versions of Embedded Media Field.
Code
function emfield_provider_menus($module, $provider = NULL) {
$menus = array();
if ($provider && ($submenus = emfield_include_invoke($module, $provider, 'submenu'))) {
$menus = $submenus;
}
$providers = emfield_system_list($module);
foreach ($providers as $provider) {
if ($submenus = emfield_include_invoke($module, $provider->name, 'emfield_submenu')) {
$menus = array_merge($menus, (array) $submenus);
}
}
return $menus;
}