getCurrentRouteMatch example


  public function __construct(RequestStack $request_stack) {
    $this->requestStack = $request_stack;
    $this->routeMatches = new \SplObjectStorage();
  }

  /** * {@inheritdoc} */
  public function getRouteName() {
    return $this->getCurrentRouteMatch()->getRouteName();
  }

  /** * {@inheritdoc} */
  public function getRouteObject() {
    return $this->getCurrentRouteMatch()->getRouteObject();
  }

  /** * {@inheritdoc} */
Home | Imprint | This part of the site doesn't use cookies.