public static function Workflow::getWorkflowByName in Workflow 7
A Factory function to get Workflow data from the database, and return objects. This is only called by CRUD functions in workflow.features.inc More than likely in prep for an import / export action. Therefore we don't want to fiddle with the response. @deprecated: workflow_get_workflows_by_name() --> Workflow::getWorkflowByName($name)
5 calls to Workflow::getWorkflowByName()
- workflow_access_features_export_render in workflow_access/
workflow_access.features.inc - Implements hook_features_export_render().
- workflow_access_features_rebuild in workflow_access/
workflow_access.features.inc - Implements hook_features_rebuild().
- workflow_get_workflows_by_name in ./
workflow.deprecated.inc - Get a specific workflow, name is a unique ID. @deprecated: workflow_get_workflows_by_name() --> Workflow::getWorkflowByName($name)
- workflow_get_workflows_full_object in ./
workflow.features.inc - For use by CRUD only, gather everything into the CRUD formed object.
- workflow_update_workflows_full_object in ./
workflow.features.inc - For use by CRUD only, save everything from the CRUD formed object.
File
- includes/
Entity/ Workflow.php, line 91 - Contains workflow\includes\Entity\Workflow.
Class
- Workflow
- @file Contains workflow\includes\Entity\Workflow.
Code
public static function getWorkflowByName($name, $unserialize_options = FALSE) {
foreach ($workflows = self::getWorkflows() as $workflow) {
if ($name == $workflow
->getName()) {
if (!$unserialize_options) {
$workflow->options = serialize($workflow->options);
}
return $workflow;
}
}
return NULL;
}