protected function WorkflowController::attachLoad in Workflow 7.2
Overrides DrupalDefaultEntityController::attachLoad().
Overrides EntityAPIControllerExportable::attachLoad
File
- includes/
Entity/ Workflow.php, line 802  - Contains workflow\includes\Entity\Workflow. Contains workflow\includes\Entity\WorkflowController.
 
Class
- WorkflowController
 - Implements a controller class for Workflow.
 
Code
protected function attachLoad(&$queried_entities, $revision_id = FALSE) {
  foreach ($queried_entities as $entity) {
    // Load the states, so they are already present on the next (cached) load.
    $entity->states = $entity
      ->getStates($all = TRUE);
    $entity->transitions = $entity
      ->getTransitions(FALSE);
    $entity->typeMap = $entity
      ->getTypeMap();
  }
  parent::attachLoad($queried_entities, $revision_id);
}