You are here

public static function WorkflowState::getStatesByName in Workflow 7

1 call to WorkflowState::getStatesByName()
workflow_access_features_rebuild in workflow_access/workflow_access.features.inc
Implements hook_features_rebuild().

File

includes/Entity/WorkflowState.php, line 130
Contains workflow\includes\Entity\WorkflowState.

Class

WorkflowState
@file Contains workflow\includes\Entity\WorkflowState.

Code

public static function getStatesByName($name, $wid) {
  foreach ($states = WorkflowState::getStates(0, $wid) as $state) {
    if ($name != $state
      ->getName()) {
      unset($states[$state->sid]);
    }
  }
  return $states;
}