You are here

public static function Workflow::load in Workflow 7

Loads a Workflow object from table {workflows} Implements a 'Factory' pattern to get Workflow data from the database, and return objects. The execution of the query instantiates objects and saves them in a static array.

$param string $wid The ID of the new Workflow

$return Workflow $workflow A new Workflow object

18 calls to Workflow::load()
Workflow::save in includes/Entity/Workflow.php
Given information, update or insert a new workflow.
Workflow::__construct in includes/Entity/Workflow.php
CRUD functions.
WorkflowDefaultWidget::formElement in includes/Field/WorkflowDefaultWidget.php
Implements hook_field_widget_form --> WidgetInterface::formElement().
WorkflowExampleTestCase::testWorkflow in includes/Test/WorkflowUnitTest.test
workflowfield_field_widget_form_alter in workflow_field/workflowfield.widget.inc
Implements hook_field_widget_form_alter().

... See full list

File

includes/Entity/Workflow.php, line 78
Contains workflow\includes\Entity\Workflow.

Class

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

Code

public static function load($wid, $reset = FALSE) {
  $workflows = self::getWorkflows($wid, $reset);
  $workflow = isset($workflows[$wid]) ? $workflows[$wid] : NULL;
  return $workflow;
}