You are here

public function TMGMTJobItem::acceptTranslation in Translation Management Tool 7

Propagates the returned job item translations to the sources.

Return value

boolean TRUE if we were able to propagate the translated data and the item could be saved, FALSE otherwise.

1 call to TMGMTJobItem::acceptTranslation()
TMGMTJobItem::needsReview in entity/tmgmt.entity.job_item.inc
Sets the state of the job item to 'needs review'.

File

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

Class

TMGMTJobItem
Entity class for the tmgmt_job entity.

Code

public function acceptTranslation() {
  if (!$this
    ->isNeedsReview() || !($controller = $this
    ->getSourceController())) {
    return FALSE;
  }

  // We don't know if the source plugin was able to save the translation after
  // this point. That means that the plugin has to set the 'accepted' states
  // on its own.
  $controller
    ->saveTranslation($this);
}