You are here

public function WorkflowTypeBase::hasTransitionFromStateToState in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/workflows/src/Plugin/WorkflowTypeBase.php \Drupal\workflows\Plugin\WorkflowTypeBase::hasTransitionFromStateToState()

Determines if a transition from state to state exists.

Parameters

string $from_state_id: The state ID to transition from.

string $to_state_id: The state ID to transition to.

Return value

bool TRUE if the transition exists, FALSE if not.

Overrides WorkflowTypeInterface::hasTransitionFromStateToState

1 call to WorkflowTypeBase::hasTransitionFromStateToState()
WorkflowTypeBase::setTransitionFromStates in core/modules/workflows/src/Plugin/WorkflowTypeBase.php
Sets a transition's from states.

File

core/modules/workflows/src/Plugin/WorkflowTypeBase.php, line 357

Class

WorkflowTypeBase
A base class for Workflow type plugins.

Namespace

Drupal\workflows\Plugin

Code

public function hasTransitionFromStateToState($from_state_id, $to_state_id) {
  return $this
    ->getTransitionIdFromStateToState($from_state_id, $to_state_id) !== NULL;
}