You are here

function i18n_menu_mode in Internationalization 7

Get menu mode or compare with given one

8 calls to i18n_menu_mode()
i18n_menu_block_view_alter in i18n_menu/i18n_menu.module
Implements hook_block_view().
i18n_menu_form_menu_edit_item_alter in i18n_menu/i18n_menu.module
Implements hook_form_FORM_ID_alter().
i18n_menu_form_menu_overview_form_alter in i18n_menu/i18n_menu.module
Implements hook_form_FORM_ID_alter(). FORM_ID = menu-overview-form. Add a "translate" link in operations column for each menu item.
i18n_menu_link::get_translate_mode in i18n_menu/i18n_menu.inc
Translation mode for object
i18n_menu_menu_link_update in i18n_menu/i18n_menu.module
Implements hook_menu_link_update().

... See full list

1 string reference to 'i18n_menu_mode'
i18n_menu_update_7001 in i18n_menu/i18n_menu.install
Set alter property for menu items with language.

File

i18n_menu/i18n_menu.module, line 304
Internationalization (i18n) submodule: Menu translation.

Code

function i18n_menu_mode($name, $mode = NULL) {
  $menu = menu_load($name);
  if (!$menu || !isset($menu['i18n_mode'])) {
    return isset($mode) ? FALSE : I18N_MODE_NONE;
  }
  else {
    return isset($mode) ? $menu['i18n_mode'] & $mode : $menu['i18n_mode'];
  }
}