public function TMGMTJob::getSuggestions in Translation Management Tool 7
Invoke the hook 'hook_tmgmt_source_suggestions' to get all suggestions.
Parameters
arary $conditions: Conditions to pass only some and not all items to the hook.
Return value
array An array with all additional translation suggestions.
- job_item: A TMGMTJobItem instance.
- referenced: A string which indicates where this suggestion comes from.
- from_job: The main TMGMTJob-ID which suggests this translation.
File
- entity/
tmgmt.entity.job.inc, line 831
Class
- TMGMTJob
- Entity class for the tmgmt_job entity.
Code
public function getSuggestions(array $conditions = array()) {
$suggestions = module_invoke_all('tmgmt_source_suggestions', $this
->getItems($conditions), $this);
// Each TMGMTJob needs a job id to be able to count the words, because the
// source-language is stored in the job and not the item.
foreach ($suggestions as &$suggestion) {
$jobItem = $suggestion['job_item'];
$jobItem->tjid = $this->tjid;
$jobItem
->recalculateStatistics();
}
return $suggestions;
}