You are here

public function WorkflowTransition::schedule in Workflow 8

Sets the Transition to be scheduled or not.

Parameters

bool $schedule:

Return value

WorkflowTransitionInterface

Overrides WorkflowTransitionInterface::schedule

File

src/Entity/WorkflowTransition.php, line 826

Class

WorkflowTransition
Implements an actual, executed, Transition.

Namespace

Drupal\workflow\Entity

Code

public function schedule($schedule = TRUE) {

  // We do a tricky thing here. The id of the entity is altered, so
  // all functions of another subclass are called.
  // $this->entityTypeId = ($schedule) ? 'workflow_scheduled_transition' : 'workflow_transition';
  //
  $this->isScheduled = $schedule;
  return $this;
}