You are here

public function TMGMTJobItem::needsReview in Translation Management Tool 7

Sets the state of the job item to 'needs review'.

1 call to TMGMTJobItem::needsReview()
TMGMTJobItem::addTranslatedData in entity/tmgmt.entity.job_item.inc
Adds translated data to a job item.

File

entity/tmgmt.entity.job_item.inc, line 405

Class

TMGMTJobItem
Entity class for the tmgmt_job entity.

Code

public function needsReview($message = NULL, $variables = array(), $type = 'status') {
  if (!isset($message)) {
    $uri = $this
      ->getSourceUri();
    $message = 'The translation for !source needs to be reviewed.';
    $variables = array(
      '!source' => l($this
        ->getSourceLabel(), $uri['path']),
    );
  }
  $return = $this
    ->setState(TMGMT_JOB_ITEM_STATE_REVIEW, $message, $variables, $type);

  // Auto accept the trganslation if the translator is configured for it.
  if ($this
    ->getTranslator()
    ->getSetting('auto_accept')) {
    $this
      ->acceptTranslation();
  }
  return $return;
}