You are here

function tmgmt_ui_entity_info in Translation Management Tool 7

Implements hook_entity_info().

File

ui/tmgmt_ui.module, line 11
Common Translation managment UI.

Code

function tmgmt_ui_entity_info() {
  $info['tmgmt_translator'] = array(
    'admin ui' => array(
      'controller class' => 'TMGMTTranslatorUIController',
      'path' => 'admin/config/regional/tmgmt_translator',
    ),
  );
  $info['tmgmt_job'] = array(
    'admin ui' => array(
      'controller class' => 'TMGMTJobUIController',
      'path' => 'admin/tmgmt/jobs',
    ),
  );
  $info['tmgmt_job_item'] = array(
    'admin ui' => array(
      'controller class' => 'TMGMTJobItemUIController',
      'path' => 'admin/tmgmt/items',
    ),
  );
  foreach ($info as $key => $item) {

    // Entity API defaults to the path that implements the entity type, but
    // since this happens in the TMGMT core module, we need to manually
    // define the path here.
    $info[$key]['admin ui']['file path'] = drupal_get_path('module', 'tmgmt_ui');
    $info[$key]['admin ui']['file'] = 'includes/tmgmt_ui.pages.inc';
  }
  return $info;
}