function entity_translation_entity_info in Entity Translation 7
Implements hook_entity_info().
File
- ./
entity_translation.module, line 74
Code
function entity_translation_entity_info() {
$info = array();
$info['node'] = array(
'translation' => array(
'entity_translation' => array(
'class' => 'EntityTranslationNodeHandler',
'access callback' => 'entity_translation_node_tab_access',
'access arguments' => array(
1,
),
'admin theme' => variable_get('node_admin_theme'),
'bundle callback' => 'entity_translation_node_supported_type',
'default settings' => array(
'default_language' => LANGUAGE_NONE,
'hide_language_selector' => FALSE,
),
),
),
);
if (module_exists('comment')) {
$info['comment'] = array(
'translation' => array(
'entity_translation' => array(
'class' => 'EntityTranslationCommentHandler',
'admin theme' => FALSE,
'bundle callback' => 'entity_translation_comment_supported_type',
'default settings' => array(
'default_language' => ENTITY_TRANSLATION_LANGUAGE_CURRENT,
'hide_language_selector' => TRUE,
),
),
),
);
}
if (module_exists('taxonomy')) {
$info['taxonomy_term'] = array(
'translation' => array(
'entity_translation' => array(
'class' => 'EntityTranslationTaxonomyTermHandler',
'access callback' => 'entity_translation_taxonomy_term_tab_access',
'access arguments' => array(
1,
),
'base path' => 'taxonomy/term/%taxonomy_term',
'edit form' => 'term',
'bundle callback' => 'entity_translation_taxonomy_term_enabled_vocabulary',
),
),
);
}
$info['user'] = array(
'translation' => array(
'entity_translation' => array(
'class' => 'EntityTranslationUserHandler',
'skip original values access' => TRUE,
'skip shared fields access' => TRUE,
),
),
);
return $info;
}