protected function BatchWatermarkForm::searchRedirect in Media watermark 8
Submit callback for search button.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: An associative array containing the current state of the form.
File
- src/
Form/ BatchWatermarkForm.php, line 184
Class
- BatchWatermarkForm
- Class BatchWatermarkForm.
Namespace
Drupal\media_watermark\FormCode
protected function searchRedirect(array &$form, FormStateInterface $form_state) {
$search_name = $form_state
->getValue('search_name');
if (!empty($search_name) && is_string($search_name)) {
$form_state
->setRedirect('media_watermark.batch', [], [
'query' => [
'search' => $search_name,
],
]);
}
}