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
Namespace
Drupal\state_machine\FormCode
public function setEntity(ContentEntityInterface $entity) {
$this->entity = $entity;
return $this;
}