You are here

public function TableDragExampleNestedForm::cancel in Examples for Developers 8

Same name and namespace in other branches
  1. 3.x modules/tabledrag_example/src/Form/TableDragExampleNestedForm.php \Drupal\tabledrag_example\Form\TableDragExampleNestedForm::cancel()

Form submission handler for the 'Return to' action.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

File

tabledrag_example/src/Form/TableDragExampleNestedForm.php, line 203

Class

TableDragExampleNestedForm
Table drag example nested form.

Namespace

Drupal\tabledrag_example\Form

Code

public function cancel(array &$form, FormStateInterface $form_state) {
  $form_state
    ->setRedirect('tabledrag_example.description');
}