You are here

function tmgmt_entity_ui_page_alter in Translation Management Tool 7

Implements hook_page_alter().

File

sources/entity/ui/tmgmt_entity_ui.module, line 12
Main module file for the translation management entity source plugin user interface.

Code

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']);
    }
  }
}