Returns a specific statistic of a task.
$task: The translation task entity.
$key: One of word_count, loop_count, count_pending, count_accepted and count_translated.
The requested information as an integer.
function tmgmt_local_task_statistic(LocalTask $task, $key) {
$statistics = tmgmt_local_task_statistics_load(array(
$task
->id(),
));
if (isset($statistics[$task
->id()]->{$key})) {
return $statistics[$task
->id()]->{$key};
}
return 0;
}