public function Job::isAbortable

Checks whether a job is abortable.

Return value

bool TRUE if the job can be aborted, FALSE otherwise.

Overrides JobInterface::isAbortable

1 call to Job::isAbortable()
Job::abortTranslation in src/Entity/Job.php
Attempts to abort the translation job.

File

src/Entity/Job.php, line 651

Class

Job
Entity class for the tmgmt_job entity.

Namespace

Drupal\tmgmt\Entity

Code

public function isAbortable() {

  // Only non-submitted translation jobs can be aborted.
  if ($this
    ->isContinuous()) {
    return FALSE;
  }
  else {
    return $this
      ->isActive();
  }
}