public function PullForm::submitForm in Entity Share 8.3
Same name and namespace in other branches
- 8 modules/entity_share_client/src/Form/PullForm.php \Drupal\entity_share_client\Form\PullForm::submitForm()
- 8.2 modules/entity_share_client/src/Form/PullForm.php \Drupal\entity_share_client\Form\PullForm::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/
entity_share_client/ src/ Form/ PullForm.php, line 245
Class
- PullForm
- Form controller to pull entities.
Namespace
Drupal\entity_share_client\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$additional_query_parameters = [];
$get_offset = $this->query
->get('offset');
if (is_numeric($get_offset)) {
$additional_query_parameters['offset'] = $get_offset;
}
$get_page = $this->query
->get('page');
if (is_numeric($get_page)) {
$additional_query_parameters['page'] = $get_page;
}
$get_sort = $this->query
->get('sort', '');
if (!empty($get_sort)) {
$additional_query_parameters['sort'] = $get_sort;
}
$get_order = $this->query
->get('order', '');
if (!empty($get_order)) {
$additional_query_parameters['order'] = $get_order;
}
$this
->setFormRedirect($form_state, $additional_query_parameters);
}