Answers for "drupal 8 get the routing name of a view"

1

drupal 8 get page route

$route_name = \Drupal::routeMatch()->getRouteName();
Posted by: Guest on September-22-2020
0

drupal 8 get view page route

use \Drupal\Core\Url;

$url = Url::fromRoute('view.VIEW_MACHINE_NAME.PAGE_MACHINENAME');
Posted by: Guest on October-13-2020

Browse Popular Code Answers by Language