function tmgmt_job_statistic in Translation Management Tool 7
Same name and namespace in other branches
- 8 tmgmt.module \tmgmt_job_statistic()
Returns a specific statistic of a job.
Parameters
$job: The translation job entity.
$key: One of word_count, count_pending, count_accepted, count_reviewed and count_translated.
Return value
The requested information as an integer.
Related topics
5 calls to tmgmt_job_statistic()
- TMGMTJob::getCountAccepted in entity/
tmgmt.entity.job.inc - Sums up all accepted counts of this jobs job items.
- TMGMTJob::getCountPending in entity/
tmgmt.entity.job.inc - Sums up all pending counts of this jobs job items.
- TMGMTJob::getCountReviewed in entity/
tmgmt.entity.job.inc - Sums up all accepted counts of this jobs job items.
- TMGMTJob::getCountTranslated in entity/
tmgmt.entity.job.inc - Sums up all translated counts of this jobs job items.
- TMGMTJob::getWordCount in entity/
tmgmt.entity.job.inc - Sums up all word counts of this jobs job items.
File
- ./
tmgmt.module, line 619 - Main module file for the Translation Management module.
Code
function tmgmt_job_statistic(TMGMTJob $job, $key) {
$statistics = tmgmt_job_statistics_load(array(
$job->tjid,
));
if (isset($statistics[$job->tjid]->{$key})) {
return $statistics[$job->tjid]->{$key};
}
return 0;
}