You are here

function menu_link_field_info in Menu Link (Field) 7

Implements hook_field_info().

Field settings:

  • link_path_field: Boolean whether or not the link path field is available

to users. If set to FALSE enity_uri() is used to determine the link path. Instance settings:

  • menu_options: The menus available to place links in for this field.

File

./menu_link.field.inc, line 17
Defines a menu link field type.

Code

function menu_link_field_info() {
  return array(
    'menu_link' => array(
      'label' => t('Menu link'),
      'description' => t('This field stores a reference to a menu link in the database.'),
      'settings' => array(
        'link_path_field' => FALSE,
      ),
      'instance_settings' => array(
        'menu_options' => array(
          'main-menu',
        ),
      ),
      'default_widget' => 'menu_link_default',
      'default_formatter' => 'menu_link_link',
    ),
  );
}