You are here

function hook_menu_item_target_types_alter in Content Menu 7

Same name and namespace in other branches
  1. 8 content_menu.api.php \hook_menu_item_target_types_alter()

Extend the target types for a new menu item.

Parameters

$target_types Array: Array of menu item target types that you can extend. The key is a machine name of a target type (alphanumerical char, _) The value is an array containing the following entries:

  • label => translated label to display in the interface
  • handler => full name of a handler function to use, with the signature ...(&$form, &$form_state, &$item [, $arg_1, ..., $arg_n])
  • arguments => array of arg_name=>arg_value (optional), each argument is passed to handler callback function.
  • clean_menu_save_message => flag whether the existing message "Your configuration has been saved" should be removed (TRUE) or not (FALSE).

$context Array: Array with context information. Currently the following key is used: 'menu_name' => machine name of the menu the target types are assembled.

1 function implements hook_menu_item_target_types_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

content_menu_menu_item_target_types_alter in ./content_menu.module
Implements hook_menu_item_target_types_alter().
1 invocation of hook_menu_item_target_types_alter()
content_menu_get_target_types in ./content_menu.menu_admin.inc
Retrieve all supported menu add item operations.

File

./content_menu.api.php, line 65

Code

function hook_menu_item_target_types_alter(&$target_types, &$context) {
  $target_types['url'] = array(
    'label' => t('URL'),
    'handler' => 'content_menu_menu_form_handler_url',
    'clean_menu_save_message' => TRUE,
  );
}