function PathPluginBase::getRouteName

Same name in other branches
  1. 8.9.x core/modules/views/src/Plugin/views/display/PathPluginBase.php \Drupal\views\Plugin\views\display\PathPluginBase::getRouteName()
  2. 10 core/modules/views/src/Plugin/views/display/PathPluginBase.php \Drupal\views\Plugin\views\display\PathPluginBase::getRouteName()
  3. 11.x core/modules/views/src/Plugin/views/display/PathPluginBase.php \Drupal\views\Plugin\views\display\PathPluginBase::getRouteName()

Overrides DisplayRouterInterface::getRouteName

2 calls to PathPluginBase::getRouteName()
PathPluginBase::getMenuLinks in core/modules/views/src/Plugin/views/display/PathPluginBase.php
Gets menu links, if this display provides some.
PathPluginBase::getUrlInfo in core/modules/views/src/Plugin/views/display/PathPluginBase.php
Generates a URL to this display.

File

core/modules/views/src/Plugin/views/display/PathPluginBase.php, line 546

Class

PathPluginBase
The base display plugin for path/callbacks. This is used for pages and feeds.

Namespace

Drupal\views\Plugin\views\display

Code

public function getRouteName() {
    $view_id = $this->view->storage
        ->id();
    $display_id = $this->display['id'];
    $view_route_key = "{$view_id}.{$display_id}";
    // Check for overridden route names.
    $view_route_names = $this->getAlteredRouteNames();
    return $view_route_names[$view_route_key] ?? "view.{$view_route_key}";
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.