public function WorkflowInterface::createState in Workflow 8
Create a new state for this workflow.
Parameters
string $sid:
bool $save: Indicator if the new state must be saved. Normally, the new State is saved directly in the database. This is because you can use States only with Transitions, and they rely on State IDs which are generated magically when saving the State. But you may need a temporary state.
Return value
\Drupal\workflow\Entity\WorkflowState The new state.
1 method overrides WorkflowInterface::createState()
- Workflow::createState in src/
Entity/ Workflow.php - Create a new state for this workflow.
File
- src/
Entity/ WorkflowInterface.php, line 57
Class
- WorkflowInterface
- Defines a common interface for Workflow*Transition* objects.
Namespace
Drupal\workflow\EntityCode
public function createState($sid, $save = TRUE);