function WorkflowTypeBase::getInitialState

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

Overrides WorkflowTypeInterface::getInitialState

1 method overrides WorkflowTypeBase::getInitialState()
ContentModeration::getInitialState in core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php
Gets the initial state for the workflow.

File

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

Class

WorkflowTypeBase
A base class for Workflow type plugins.

Namespace

Drupal\workflows\Plugin

Code

public function getInitialState() {
    $ordered_states = $this->getStates();
    return reset($ordered_states);
}

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