You are here

public function WorkflowTransitionForm::save in Workflow 8

This is called from submitForm().

Overrides EntityForm::save

File

src/Form/WorkflowTransitionForm.php, line 164

Class

WorkflowTransitionForm
Provides a Transition Form to be used in the Workflow Widget.

Namespace

Drupal\workflow\Form

Code

public function save(array $form, FormStateInterface $form_state) {

  // Execute transition and update the attached entity.

  /** @var \Drupal\workflow\Entity\WorkflowTransitionInterface $transition */
  $transition = $this
    ->getEntity();
  return $transition
    ->executeAndUpdateEntity();
}