public function PopulateForm::submitForm in Bibliography & Citation 8
Same name and namespace in other branches
- 2.0.x modules/bibcite_import/src/Form/PopulateForm.php \Drupal\bibcite_import\Form\PopulateForm::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
- modules/
bibcite_import/ src/ Form/ PopulateForm.php, line 135
Class
- PopulateForm
- Populate values to Reference form.
Namespace
Drupal\bibcite_import\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$entity = $form_state
->getValue('entity');
if ($entity) {
$this->tempStore
->set(\Drupal::currentUser()
->id(), $entity);
$redirect_url = Url::fromRoute("entity.bibcite_reference.add_form", [
'bibcite_reference_type' => $entity
->bundle(),
]);
$form_state
->setRedirectUrl($redirect_url);
}
}