public function TMGMTJob::aborted in Translation Management Tool 7
Sets the state of the job to 'aborted'.
Parameters
$message: The log message to be saved along with the state change.
$variables: (Optional) An array of variables to replace in the message on display.
Use TMGMTJob::abortTranslation() to abort a translation.
Return value
TMGMTJob The job entity.
See also
File
- entity/
tmgmt.entity.job.inc, line 593
Class
- TMGMTJob
- Entity class for the tmgmt_job entity.
Code
public function aborted($message = NULL, $variables = array(), $type = 'status') {
if (!isset($message)) {
$message = 'The translation job has been aborted.';
}
/** @var TMGMTJobItem $item */
foreach ($this
->getItems() as $item) {
$item
->setState(TMGMT_JOB_ITEM_STATE_ABORTED);
}
return $this
->setState(TMGMT_JOB_STATE_ABORTED, $message, $variables, $type);
}