You are here

function emfield_provider_menus in Embedded Media Field 6.2

Same name and namespace in other branches
  1. 6.3 deprecated/emfield-deprecated.inc \emfield_provider_menus()
  2. 6 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

./emfield.module, line 786
Embedded Media Field is a CCK-based framework for 3rd party media files.

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;
}