Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  *
  * @return Workflow|null
  *   The entity object or NULL if there is no entity with the given ID.
  */
 public static function load($id)
 {
     $entity = parent::load($id);
     if ($entity) {
         // Load the states, so they are already present on the next (cached) load.
         // N.B. commented out, since it doesn't work. Workflow is loaded 4x per
         // Node form. Use lazy loading.
         // $entity->states = $entity->getStates($all = TRUE);
         // $entity->transitions = $entity->getTransitions(NULL);
     }
     return $entity;
 }