public function WorkflowTypeBase::getInitialState in Drupal 8
Same name and namespace in other branches
- 9 core/modules/workflows/src/Plugin/WorkflowTypeBase.php \Drupal\workflows\Plugin\WorkflowTypeBase::getInitialState()
Gets the initial state for the workflow.
Return value
\Drupal\workflows\StateInterface The initial state.
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\PluginCode
public function getInitialState() {
$ordered_states = $this
->getStates();
return reset($ordered_states);
}