public function TableDragTestForm::submitForm in Drupal 8
Same name and namespace in other branches
- 9 core/modules/system/tests/modules/tabledrag_test/src/Form/TableDragTestForm.php \Drupal\tabledrag_test\Form\TableDragTestForm::submitForm()
- 10 core/modules/system/tests/modules/tabledrag_test/src/Form/TableDragTestForm.php \Drupal\tabledrag_test\Form\TableDragTestForm::submitForm()
Form submission handler.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Overrides FormInterface::submitForm
File
- core/
modules/ system/ tests/ modules/ tabledrag_test/ src/ Form/ TableDragTestForm.php, line 148
Class
- TableDragTestForm
- Provides a form for draggable table testing.
Namespace
Drupal\tabledrag_test\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$test_table = [];
foreach ($form_state
->getValue('table') as $row) {
$test_table[$row['id']] = $row;
}
$this->state
->set('tabledrag_test_table', $test_table);
}