class TMGMTJobViewsController in Translation Management Tool 7
Views controller class for the job entity.
Hierarchy
- class \EntityDefaultViewsController
- class \TMGMTJobViewsController
Expanded class hierarchy of TMGMTJobViewsController
1 string reference to 'TMGMTJobViewsController'
- tmgmt_entity_info in ./
tmgmt.module - Implements hook_entity_info().
File
- views/
tmgmt.views.inc, line 67 - Contains Views controllers for the translation management module.
View source
class TMGMTJobViewsController extends EntityDefaultViewsController {
/**
* {@inheritdoc}
*/
public function views_data() {
$data = parent::views_data();
$data['tmgmt_job']['operations'] = array(
'title' => t('Operations'),
'help' => t('Displays a list of options which are available for a job.'),
'real field' => 'tjid',
'field' => array(
'handler' => 'tmgmt_handler_field_tmgmt_job_operations',
),
);
$data['tmgmt_job']['progress'] = array(
'title' => t('Progress'),
'help' => t('Displays the progress of a job.'),
'real field' => 'tjid',
'field' => array(
'handler' => 'tmgmt_handler_field_tmgmt_progress',
),
);
$data['tmgmt_job']['word_count'] = array(
'title' => t('Word count'),
'help' => t('Displays the word count of a job.'),
'real field' => 'tjid',
'field' => array(
'handler' => 'tmgmt_handler_field_tmgmt_wordcount',
),
);
$data['tmgmt_job']['label']['field']['handler'] = 'tmgmt_handler_field_tmgmt_entity_label';
$data['tmgmt_job']['translator']['field']['handler'] = 'tmgmt_handler_field_tmgmt_translator';
$data['tmgmt_job']['job_item'] = array(
'title' => t('Job items'),
'help' => t('Get the job items of the job'),
'relationship' => array(
'base' => 'tmgmt_job_item',
'base field' => 'tjid',
'real field' => 'tjid',
'label' => t('Job items'),
),
);
$data['tmgmt_job']['item_count'] = array(
'title' => t('Job item count'),
'help' => t('Show the amount of job items per job (per job item status)'),
'real field' => 'tjid',
'field' => array(
'handler' => 'tmgmt_handler_field_tmgmt_job_item_count',
),
);
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 | ||
TMGMTJobViewsController:: |
public | function |
Defines the result for hook_views_data(). Overrides EntityDefaultViewsController:: |