function Workflow::getStates in Workflow 7
Same name and namespace in other branches
- 7.2 includes/Entity/Workflow.php \Workflow::getStates()
Parameters
bool $all: Indicates to return all (TRUE) or only active (FALSE) states of a workflow.
Return value
An array of WorkflowState objects.
3 calls to Workflow::getStates()
- Workflow::delete in includes/
Entity/ Workflow.php - Given a wid, delete the workflow and its data.
- Workflow::getOptions in includes/
Entity/ Workflow.php - Workflow::validate in includes/
Entity/ Workflow.php - Validate the workflow. Generate a message if not correct. This function is used on the settings page of
File
- includes/
Entity/ Workflow.php, line 279 - Contains workflow\includes\Entity\Workflow.
Class
- Workflow
- @file Contains workflow\includes\Entity\Workflow.
Code
function getStates($all = FALSE) {
$states = WorkflowState::getStates(0, $this->wid);
if (!$all) {
foreach ($states as $state) {
if (!$state
->isActive() && !$state
->isCreationState()) {
unset($states[$state->sid]);
}
}
}
return $states;
}