You are here

public function WorkflowTransitionInterface::setTargetEntity in Workflow 8

Sets the Entity, that is added to the Transition.

Also sets all dependent fields, that will be saved in tables {workflow_transition_*}.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The Entity ID or the Entity object, to add to the Transition.

Return value

object The Entity, that is added to the Transition.

1 method overrides WorkflowTransitionInterface::setTargetEntity()
WorkflowTransition::setTargetEntity in src/Entity/WorkflowTransition.php
Sets the Entity, that is added to the Transition.

File

src/Entity/WorkflowTransitionInterface.php, line 140

Class

WorkflowTransitionInterface
Defines a common interface for Workflow*Transition* objects.

Namespace

Drupal\workflow\Entity

Code

public function setTargetEntity(EntityInterface $entity);