drupal8 obtenha params da rota

if ($node = \Drupal::routeMatch()->getParameter('node')) {
}
Impossible Iguana