function LocalTaskDefault::routeProvider

Same name in other branches
  1. 9 core/lib/Drupal/Core/Menu/LocalTaskDefault.php \Drupal\Core\Menu\LocalTaskDefault::routeProvider()
  2. 10 core/lib/Drupal/Core/Menu/LocalTaskDefault.php \Drupal\Core\Menu\LocalTaskDefault::routeProvider()
  3. 11.x core/lib/Drupal/Core/Menu/LocalTaskDefault.php \Drupal\Core\Menu\LocalTaskDefault::routeProvider()

Returns the route provider.

Return value

\Drupal\Core\Routing\RouteProviderInterface The route provider.

File

core/lib/Drupal/Core/Menu/LocalTaskDefault.php, line 138

Class

LocalTaskDefault
Default object used for LocalTaskPlugins.

Namespace

Drupal\Core\Menu

Code

protected function routeProvider() {
    if (!$this->routeProvider) {
        $this->routeProvider = \Drupal::service('router.route_provider');
    }
    return $this->routeProvider;
}

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