You are here

function tmgmt_entity_tmgmt_source_plugin_info in Translation Management Tool 7

Implements hook_tmgmt_source_plugin_info().

File

sources/entity/tmgmt_entity.module, line 11
Source plugin for the Translation Management system that handles entities.

Code

function tmgmt_entity_tmgmt_source_plugin_info() {
  $info['entity'] = array(
    'label' => t('Entity'),
    'description' => t('Source handler for entities.'),
    'plugin controller class' => 'TMGMTEntitySourcePluginController',
    'item types' => array(),
  );
  $entity_types = array_filter(variable_get('entity_translation_entity_types', array()));
  foreach ($entity_types as $entity_key) {
    $entity_info = entity_get_info($entity_key);
    $info['entity']['item types'][$entity_key] = $entity_info['label'];
  }
  return $info;
}