You are here

function tmgmt_rules_job_accept_translation in Translation Management Tool 7

Rules callback to accept a translation of a job.

File

./tmgmt.rules.inc, line 156
Rules integration.

Code

function tmgmt_rules_job_accept_translation(TMGMTJob $job, $message) {
  foreach ($job
    ->getItems() as $item) {
    if ($item
      ->isNeedsReview()) {
      $item
        ->acceptTranslation();
    }
  }
}