You are here

public function StateTransitionForm::setEntity in State Machine 8

Sets the form entity.

When the form is submitted, a transition will be applied to the entity, and the entity will be saved.

Parameters

\Drupal\Core\Entity\ContentEntityInterface $entity: The form entity.

Return value

$this

Overrides StateTransitionFormInterface::setEntity

File

src/Form/StateTransitionForm.php, line 36

Class

StateTransitionForm

Namespace

Drupal\state_machine\Form

Code

public function setEntity(ContentEntityInterface $entity) {
  $this->entity = $entity;
  return $this;
}