Returns a specific statistic of a job.
$job: The translation job entity.
$key: One of word_count, tags_count, count_pending, count_accepted, count_reviewed and count_translated.
The requested information as an integer.
function tmgmt_job_statistic(JobInterface $job, $key) {
$statistics = tmgmt_job_statistics_load(array(
$job
->id(),
));
if (isset($statistics[$job
->id()]->{$key})) {
return $statistics[$job
->id()]->{$key};
}
return 0;
}