Skip to content

Instantly share code, notes, and snippets.



Last active Apr 13, 2021
What would you like to do?
Setup current request to the given path in Drupal 8/9
// Setup page URL with all request parameters as current request and path.
$path = '/some-uri';
$request = Request::create($path);
$result = \Drupal::service('router.no_access_checks')->matchRequest($request);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment