You are here

public function OpignoAnswerForm::backToTraining in Opigno module 8

Same name and namespace in other branches
  1. 3.x src/Form/OpignoAnswerForm.php \Drupal\opigno_module\Form\OpignoAnswerForm::backToTraining()

File

src/Form/OpignoAnswerForm.php, line 538

Class

OpignoAnswerForm
Form controller for Answer edit forms.

Namespace

Drupal\opigno_module\Form

Code

public function backToTraining(array $form, FormStateInterface $form_state) {
  $group = \Drupal::routeMatch()
    ->getParameter('group');
  $form_state
    ->setRedirect('entity.group.canonical', [
    'group' => $group
      ->id(),
  ]);
}