//Get the current path and alias $current_path = \Drupal::service('path.current')->getPath();
$result = \Drupal::service('path.alias_manager')->getAliasByPath($current_path);
//Get the drupal renderer $renderer = \Drupal::service('renderer');
Â
Drupal 8's core services are located on : /core/core.services.yml
Comments