/** * {@inheritdoc} * * This is called from submitForm(). */ public function save(array $form, FormStateInterface $form_state) { // Execute transition and update the attached entity. $entity = $this->getEntity(); return Workflow::workflowManager()->executeTransition($entity); }