public static function Workflow::postLoad in Workflow 8
Acts on loaded entities.
Parameters
\Drupal\Core\Entity\EntityStorageInterface $storage: The entity storage object.
\Drupal\Core\Entity\EntityInterface[] $entities: An array of entities.
Overrides EntityBase::postLoad
File
- src/
Entity/ Workflow.php, line 150
Class
- Workflow
- Workflow configuration entity to persistently store configuration.
Namespace
Drupal\workflow\EntityCode
public static function postLoad(EntityStorageInterface $storage, array &$entities) {
/** @var \Drupal\workflow\Entity\Workflow $workflow */
foreach ($entities as &$workflow) {
// Better performance, together with Annotation static_cache = TRUE.
// Load the states, and set the creation state.
$workflow
->getStates();
$workflow
->getCreationState();
}
}