You are here

public function WorkflowTypeBase::hasTransition in Drupal 8

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

Determines if a transition exists.

Parameters

string $transition_id: The transition ID.

Return value

bool TRUE if the transition exists, FALSE if not.

Overrides WorkflowTypeInterface::hasTransition

6 calls to WorkflowTypeBase::hasTransition()
WorkflowTypeBase::addTransition in core/modules/workflows/src/Plugin/WorkflowTypeBase.php
Adds a transition to the workflow.
WorkflowTypeBase::deleteTransition in core/modules/workflows/src/Plugin/WorkflowTypeBase.php
Deletes a transition.
WorkflowTypeBase::getTransition in core/modules/workflows/src/Plugin/WorkflowTypeBase.php
Gets a transition object for the provided transition ID.
WorkflowTypeBase::setTransitionFromStates in core/modules/workflows/src/Plugin/WorkflowTypeBase.php
Sets a transition's from states.
WorkflowTypeBase::setTransitionLabel in core/modules/workflows/src/Plugin/WorkflowTypeBase.php
Sets a transition's label.

... See full list

File

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

Class

WorkflowTypeBase
A base class for Workflow type plugins.

Namespace

Drupal\workflows\Plugin

Code

public function hasTransition($transition_id) {
  return isset($this->configuration['transitions'][$transition_id]);
}