0
APAndrea Pistarini
The code retrieves the value of the "my_param" variable from the request object and sets it in the $my_param variable. The code then uses a filter to sanitize the value of "my_param" to make sure it is an integer.
Library: Drupal
Drupal
0 Comments
$my_param = \Drupal::request()->query->get('my_param'); $my_param = filter_input(INPUT_GET, 'my_param', FILTER_SANITIZE_NUMBER_INT); // o FILTER_SANITIZE_STRING, FILTER_SANITIZE_EMAIL...