You are here

function i18n_translation_set_load in Internationalization 7

Load single translation set.

Parameters

int $tsid: Translation set id.

string $type: (Optional) translation set type (bundle).

17 calls to i18n_translation_set_load()
i18n_menu_form_menu_edit_item_alter in i18n_menu/i18n_menu.module
Implements hook_form_FORM_ID_alter().
i18n_menu_item_translation_page in i18n_menu/i18n_menu.i18n.inc
Callback for menu item translation tab.
i18n_menu_menu_link_delete in i18n_menu/i18n_menu.module
Implements hook_menu_delete()
i18n_menu_menu_link_update in i18n_menu/i18n_menu.module
Implements hook_menu_link_update().
i18n_menu_menu_update in i18n_menu/i18n_menu.module
Implements hook_menu_update()

... See full list

File

i18n_translation/i18n_translation.module, line 276
Internationalization (i18n) module - Entity translations

Code

function i18n_translation_set_load($tsid, $type = NULL) {
  $conditions['tsid'] = $tsid;
  $list = entity_load('i18n_translation', array(
    $tsid,
  ));
  $entity = reset($list);
  if ($entity && $type && $entity->type != $type) {
    return NULL;
  }
  return $entity;
}