You are here

public function WorkflowTypeBase::getRequiredStates in Drupal 8

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

Gets the required states of workflow type.

This is usually specified in the workflow type annotation.

Return value

string[] The required states.

Overrides WorkflowTypeInterface::getRequiredStates

See also

\Drupal\workflows\Annotation\WorkflowType

1 method overrides WorkflowTypeBase::getRequiredStates()
TestType::getRequiredStates in core/modules/workflows/tests/modules/workflow_type_test/src/Plugin/WorkflowType/TestType.php
Gets the required states of workflow type.

File

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

Class

WorkflowTypeBase
A base class for Workflow type plugins.

Namespace

Drupal\workflows\Plugin

Code

public function getRequiredStates() {
  return $this
    ->getPluginDefinition()['required_states'];
}