You are here

public function QuizEntityForm::save in Quiz 8.6

Same name and namespace in other branches
  1. 8.5 src/Entity/QuizEntityForm.php \Drupal\quiz\Entity\QuizEntityForm::save()

Redirect to the questions form after quiz creation.

Overrides EntityForm::save

File

src/Entity/QuizEntityForm.php, line 17

Class

QuizEntityForm

Namespace

Drupal\quiz\Entity

Code

public function save(array $form, FormStateInterface $form_state) {
  parent::save($form, $form_state);
  $form_state
    ->setRedirect('quiz.questions', [
    'quiz' => $this->entity
      ->id(),
  ]);
}