function WorkflowTypeBase::hasState

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

Overrides WorkflowTypeInterface::hasState

6 calls to WorkflowTypeBase::hasState()
WorkflowTypeBase::addState in core/modules/workflows/src/Plugin/WorkflowTypeBase.php
Adds a state to the workflow.
WorkflowTypeBase::addTransition in core/modules/workflows/src/Plugin/WorkflowTypeBase.php
Adds a transition to the workflow.
WorkflowTypeBase::deleteState in core/modules/workflows/src/Plugin/WorkflowTypeBase.php
Deletes a state from the workflow.
WorkflowTypeBase::setStateLabel in core/modules/workflows/src/Plugin/WorkflowTypeBase.php
Sets a state's label.
WorkflowTypeBase::setStateWeight in core/modules/workflows/src/Plugin/WorkflowTypeBase.php
Sets a state's weight value.

... See full list

1 method overrides WorkflowTypeBase::hasState()
PredefinedStatesWorkflowTestType::hasState in core/modules/workflows/tests/modules/workflow_type_test/src/Plugin/WorkflowType/PredefinedStatesWorkflowTestType.php
Determines if the workflow has a state with the provided ID.

File

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

Class

WorkflowTypeBase
A base class for Workflow type plugins.

Namespace

Drupal\workflows\Plugin

Code

public function hasState($state_id) {
    return isset($this->configuration['states'][$state_id]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.