public function WishlistSearchForm::submitForm in UC Wish List 8
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/ WishlistSearchForm.php, line 92
Class
Namespace
Drupal\uc_wishlist\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
if (empty($form_state->getValue['keywords'])) {
$form_state
->setRedirect('wishlist/search');
}
else {
$form_state
->setRedirect('wishlist/search/') . UrlHelper::encodePath($form_state->getValue['keywords']);
}
}