public function ImportForm::submitForm in Taxonomy Import 8
Same name and namespace in other branches
- 2.x src/Form/ImportForm.php \Drupal\taxonomy_import\Form\ImportForm::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
- src/
Form/ ImportForm.php, line 70 - Contains \Drupal\taxonomy_import\Form\ImportForm.
Class
- ImportForm
- Contribute form.
Namespace
Drupal\taxonomy_import\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
// Display result.
foreach ($form_state
->getValues() as $key => $value) {
if ($key == 'field_vocabulary_name') {
$voc_name = $value;
}
}
create_taxonomy($voc_name);
}