public function WorkflowInterface::createState in Workflow 7.2
Create a new state for this workflow.
Parameters
string $name: The untranslated human readable label of the state.
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 includes/
Entity/ Workflow.php - Create a new state for this workflow.
File
- includes/
Entity/ WorkflowInterface.php, line 70 - Contains Drupal\workflow\Entity\WorkflowInterface.
Class
- WorkflowInterface
- Defines a common interface for Workflow*Transition* objects.
Code
public function createState($sid, $save = TRUE);