Skip to content

Instantly share code, notes, and snippets.

@init90
Created September 22, 2016 15:23
Show Gist options
  • Save init90/abe598d20e7d26dc7d925cec71d258e0 to your computer and use it in GitHub Desktop.
Save init90/abe598d20e7d26dc7d925cec71d258e0 to your computer and use it in GitHub Desktop.
Drupal 8 get current route name.
$route_name = \Drupal::service('current_route_match')->getRouteName();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment