You are here

function _power_menu_call_handler_function in Power Menu 7.2

Helper function to call a function in all registred handler objects.

Parameters

$function: Function to call in handler object

$args: The parameters to be passed to the callback, as an indexed array.

$only_enabled: When TRUE, call only enabled handlers

3 calls to _power_menu_call_handler_function()
power_menu_form_menu_edit_item_handlers_submit in ./power_menu.module
Attached menu form submit callback.
power_menu_form_menu_edit_item_handlers_validate in ./power_menu.module
Attached menu form validate callback.
power_menu_menu_link_delete in ./power_menu.module
Implements hook_menu_link_delete().

File

./power_menu.module, line 679

Code

function _power_menu_call_handler_function($function, &$args, $only_enabled = FALSE) {
  $handlers = power_menu_get_menu_handlers($only_enabled);
  foreach ($handlers as $handler) {
    $instance = power_menu_plugin_get_handler_instance($handler);
    if ($instance) {
      call_user_func_array(array(
        &$instance,
        $function,
      ), $args);
    }
  }
}