You are here

public function WorkflowTransition::hasStateChange in Workflow 8

Determines if the State changes by this Transition.

Return value

bool

Overrides WorkflowConfigTransitionInterface::hasStateChange

1 call to WorkflowTransition::hasStateChange()
WorkflowTransition::execute in src/Entity/WorkflowTransition.php
Execute a transition (change state of an entity).

File

src/Entity/WorkflowTransition.php, line 426

Class

WorkflowTransition
Implements an actual, executed, Transition.

Namespace

Drupal\workflow\Entity

Code

public function hasStateChange() {
  if ($this->from_sid->target_id == $this->to_sid->target_id) {
    return FALSE;
  }
  return TRUE;
}