tmgmt_entity_ui.module in Translation Management Tool 7
Main module file for the translation management entity source plugin user interface.
File
sources/entity/ui/tmgmt_entity_ui.moduleView source
<?php
/**
* @file
* Main module file for the translation management entity source plugin user
* interface.
*/
/**
* Implements hook_page_alter().
*/
function tmgmt_entity_ui_page_alter(&$page) {
if (entity_access('create', 'tmgmt_job')) {
// Translation tabs for nodes.
if (isset($page['content']['system_main']['entity_translation_overview'])) {
module_load_include('inc', 'tmgmt_entity_ui', 'tmgmt_entity_ui.pages');
$page['content']['system_main']['entity_translation_overview'] = drupal_get_form('tmgmt_entity_ui_translate_form', $page['content']['system_main']);
}
elseif (isset($page['content']['system_main']['content']['entity_translation_overview'])) {
module_load_include('inc', 'tmgmt_entity_ui', 'tmgmt_entity_ui.pages');
$page['content']['system_main']['content']['entity_translation_overview'] = drupal_get_form('tmgmt_entity_ui_translate_form', $page['content']['system_main']['content']);
}
}
}
/**
* Implements tmgmt_entity_tmgmt_source_plugin_info_alter().
*/
function tmgmt_entity_ui_tmgmt_source_plugin_info_alter(&$info) {
// Define ui controller class to handle Drupal entities.
$info['entity']['ui controller class'] = 'TMGMTEntitySourceUIController';
// Alter file and file path info so that tmgmt_entity_ui module is targeted
// for page callback.
$info['entity']['file'] = 'tmgmt_entity_ui.pages.inc';
$info['entity']['file path'] = drupal_get_path('module', 'tmgmt_entity_ui');
}
Functions
Name | Description |
---|---|
tmgmt_entity_ui_page_alter | Implements hook_page_alter(). |
tmgmt_entity_ui_tmgmt_source_plugin_info_alter | Implements tmgmt_entity_tmgmt_source_plugin_info_alter(). |