Invoke the hook 'hook_tmgmt_source_suggestions' to get all suggestions.
array $conditions: Conditions to pass only some and not all items to the hook.
array An array with all additional translation suggestions.
Overrides JobInterface::getSuggestions
public function getSuggestions(array $conditions = array()) {
$suggestions = \Drupal::moduleHandler()
->invokeAll('tmgmt_source_suggestions', array(
$this
->getItems($conditions),
$this,
));
// EachJob 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
->id();
$jobItem
->recalculateStatistics();
}
return $suggestions;
}