You are here

public static function WorkflowManagerInterface::executeTransitionsOfEntity in Workflow 8

Execute a single transition for the given entity.

Implements hook_entity insert(), hook_entity_update().

When inserting an entity with workflow field, the initial Transition is saved without reference to the proper entity, since Id is not yet known. So, we cannot save Transition in the Widget, but only(?) in a hook. To keep things simple, this is done for both insert() and update().

This is referenced in from WorkflowDefaultWidget::massageFormValues().

Parameters

\Drupal\Core\Entity\EntityInterface $entity:

1 method overrides WorkflowManagerInterface::executeTransitionsOfEntity()
WorkflowManager::executeTransitionsOfEntity in src/Entity/WorkflowManager.php
Execute a single transition for the given entity.

File

src/Entity/WorkflowManagerInterface.php, line 39

Class

WorkflowManagerInterface
Provides an interface for workflow manager.

Namespace

Drupal\workflow\Entity

Code

public static function executeTransitionsOfEntity(EntityInterface $entity);