You are here

function hook_menu_attribute_info in Menu Attributes 6

Same name and namespace in other branches
  1. 8 menu_attributes.api.php \hook_menu_attribute_info()
  2. 6.2 menu_attributes.api.php \hook_menu_attribute_info()
  3. 7 menu_attributes.api.php \hook_menu_attribute_info()

Inform the menu_attributes module about custom attributes.

Return value

An array of attributes to be controlled by Menu Attributes, keyed by attribute name. Each attribute record should be an array with the following key/value pairs:

  • label: The human-readable name of the attribute.
  • description: The attribute description.
  • form: A Form API array. Some default values for this array are provided in menu_attributes_get_menu_attribute_info().

See also

menu_attributes_menu_attribute_info()

menu_attributes_get_menu_attribute_info()

2 functions implement hook_menu_attribute_info()

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

menu_attributes_get_menu_attribute_info in ./menu_attributes.module
Fetch an array of menu attributes.
menu_attributes_menu_attribute_info in ./menu_attributes.module
Implements hook_menu_attribute_info().
1 invocation of hook_menu_attribute_info()
menu_attributes_get_menu_attribute_info in ./menu_attributes.module
Fetch an array of menu attributes.

File

./menu_attributes.api.php, line 23
Documentation for Menu Attributes API.

Code

function hook_menu_attribute_info() {

  // Add a Tabindex attribute.
  $info['tabindex'] = array(
    'label' => t('Tabindex'),
    'description' => t('Specifies the tab order for the link.'),
    'form' => array(
      '#maxlength' => 3,
      '#size' => 2,
    ),
  );
  return $info;
}