You are here

public static function WorkflowScheduledTransition::load in Workflow 7

Same name and namespace in other branches
  1. 7.2 includes/Entity/WorkflowScheduledTransition.php \WorkflowScheduledTransition::load()

Given a node, get all scheduled transitions for it.

@deprecated: workflow_get_workflow_scheduled_transition_by_nid() --> WorkflowScheduledTransition::load()

Parameters

$nid: The node ID.

Return value

An array of WorkflowScheduledTransitions

4 calls to WorkflowScheduledTransition::load()
WorkflowDefaultWidget::formElement in includes/Field/WorkflowDefaultWidget.php
Implements hook_field_widget_form --> WidgetInterface::formElement().
WorkflowTransition::execute in includes/Entity/WorkflowTransition.php
Execute a transition (change state of a node). @deprecated: workflow_execute_transition() --> WorkflowTransition::execute().
workflow_get_workflow_scheduled_transition_by_nid in ./workflow.deprecated.inc
Given a node, get all scheduled transitions for it. @deprecated: workflow_get_workflow_scheduled_transition_by_nid() --> WorkflowScheduledTransition::load()
workflow_node_load in ./workflow.node.inc
Implements hook_node_load(). @TODO: Consider replacing with hook_entity_load().

File

includes/Entity/WorkflowScheduledTransition.php, line 65
Contains workflow\includes\Entity\WorkflowScheduledTransition.

Class

WorkflowScheduledTransition

Code

public static function load($entity_type, $entity_id, $field_name = '') {
  $results = db_query('SELECT * ' . 'FROM {workflow_scheduled_transition} ' . 'WHERE entity_type = :entity_type ' . 'AND   nid = :nid ' . 'ORDER BY scheduled ASC ', array(
    ':nid' => $entity_id,
    ':entity_type' => $entity_type,
  ));
  $result = $results
    ->fetchAll(PDO::FETCH_CLASS, 'WorkflowScheduledTransition');
  return $result;
}