public function Job::rejected

Sets the state of the job to 'rejected'.

Parameters

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 error.

Return value

\Drupal\tmgmt\JobInterface The job entity.

Overrides JobInterface::rejected

See also

Job::addMessage()

File

src/Entity/Job.php, line 724

Class

Job
Entity class for the tmgmt_job entity.

Namespace

Drupal\tmgmt\Entity

Code

public function rejected($message = NULL, $variables = array(), $type = 'error') {
  if (!isset($message)) {
    $message = 'The translation job has been rejected by the translation provider.';
  }
  return $this
    ->setState(static::STATE_REJECTED, $message, $variables, $type);
}