public function TMGMTI18nStringDefaultSourceUIController::overviewSearchFormRedirect in Translation Management Tool 7
Performs redirect with search params appended to the uri.
In case of triggering element is edit-search-submit it redirects to current location with added query string containing submitted search form values.
Parameters
array $form: Drupal form array.
$form_state: Drupal form_state array.
$type: Entity type.
1 call to TMGMTI18nStringDefaultSourceUIController::overviewSearchFormRedirect()
- TMGMTI18nStringDefaultSourceUIController::overviewFormSubmit in sources/
i18n_string/ tmgmt_i18n_string.ui.inc
File
- sources/
i18n_string/ tmgmt_i18n_string.ui.inc, line 282 - Provides the I18nString source controller.
Class
- TMGMTI18nStringDefaultSourceUIController
- Class TMGMTI18nStringDefaultSourceUIController
Code
public function overviewSearchFormRedirect($form, &$form_state, $type) {
if ($form_state['triggering_element']['#id'] == 'edit-search-submit') {
$query = array();
foreach ($form_state['values']['search'] as $key => $value) {
$query[$key] = $value;
}
drupal_goto($_GET['q'], array(
'query' => $query,
));
}
}