Sets the state of the job to 'aborted'.
string $message: The log message to be saved along with the state change.
array $variables: (Optional) An array of variables to replace in the message on display.
string $type: Statically set to status.
Use Job::abortTranslation() to abort a translation.
\Drupal\tmgmt\JobInterface The job entity.
Overrides JobInterface::aborted
public function aborted($message = NULL, $variables = array(), $type = 'status') {
if (!isset($message)) {
$message = 'The translation job has been aborted.';
}
/** @var \Drupal\tmgmt\JobItemInterface $item */
foreach ($this
->getItems() as $item) {
$item
->setState(JobItem::STATE_ABORTED);
}
return $this
->setState(static::STATE_ABORTED, $message, $variables, $type);
}