class TMGMTLocalTaskViewsController in Translation Management Tool 7
Views controller class for the local task entity.
Hierarchy
Expanded class hierarchy of TMGMTLocalTaskViewsController
1 string reference to 'TMGMTLocalTaskViewsController'
- tmgmt_local_entity_info in translators/
tmgmt_local/ tmgmt_local.module - Implements hook_entity_info().
File
- translators/
tmgmt_local/ views/ tmgmt_local.views.inc, line 11 - Contains Views controllers for the translation management local task module.
View source
class TMGMTLocalTaskViewsController extends EntityDefaultViewsController {
/**
* {@inheritdoc}
*/
public function views_data() {
$data = parent::views_data();
$data['tmgmt_local_task']['operations'] = array(
'title' => t('Operations'),
'help' => t('Displays a list of operations which are available for a task.'),
'real field' => 'tltid',
'field' => array(
'handler' => 'tmgmt_local_task_handler_field_operations',
),
);
$data['tmgmt_local_task']['progress'] = array(
'title' => t('Progress'),
'help' => t('Displays the progress of a job.'),
'real field' => 'tltid',
'field' => array(
'handler' => 'tmgmt_local_task_handler_field_progress',
),
);
$data['tmgmt_local_task']['word_count'] = array(
'title' => t('Word count'),
'help' => t('Displays the word count of a job.'),
'real field' => 'tltid',
'field' => array(
'handler' => 'tmgmt_local_task_handler_field_wordcount',
),
);
$data['tmgmt_local_task']['item_count'] = array(
'title' => t('Job item count'),
'help' => t('Show the amount of job items per task (per job item status)'),
'real field' => 'tltid',
'field' => array(
'handler' => 'tmgmt_local_task_handler_field_job_item_count',
),
);
$data['tmgmt_job']['eligible'] = array(
'title' => t('Eligible'),
'help' => t('Limit translation tasks to those that the user can translate'),
'real field' => 'tltid',
'filter' => array(
'handler' => 'tmgmt_local_task_handler_filter_eligible',
),
);
// Manager handlers.
$data['tmgmt_job']['task'] = array(
'title' => t('Translation task'),
'help' => t('Get the translation task of the job'),
'relationship' => array(
'base' => 'tmgmt_local_task',
'base field' => 'tjid',
'real field' => 'tjid',
'label' => t('Job'),
),
);
return $data;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityDefaultViewsController:: |
protected | property | ||
EntityDefaultViewsController:: |
public | function | Determines the handler to use for a relationship to an entity type. | |
EntityDefaultViewsController:: |
protected | function | Comes up with views information based on the given schema and property info. | |
EntityDefaultViewsController:: |
public static | function | A callback returning property options, suitable to be used as views options callback. | |
EntityDefaultViewsController:: |
protected | function | Try to come up with some views fields with the help of the schema and the entity property information. | |
EntityDefaultViewsController:: |
protected | function | Try to come up with some views fields with the help of the revision schema and the entity property information. | |
EntityDefaultViewsController:: |
public | function | ||
TMGMTLocalTaskViewsController:: |
public | function |
Defines the result for hook_views_data(). Overrides EntityDefaultViewsController:: |