template/extension/RouterExtension.php
public function isCurrent(string $route_id) : bool
    {
        /**
         *
         * @var RouteCollectionInterface $RouteCollection
         */
        $RouteCollection    = $this->Template->getContainer()->get(RouterInterface::class)->getRouteCollection();
        return !empty($RouteCollection->get($route_id)->getOptions(Constant::IS_CURRENT_ROUTE));
    }
public function isCurrent(string $route_id) : bool
    {
        /**
         *
         * @var RouteCollectionInterface $RouteCollection
         */
        $RouteCollection    = $this->Template->getContainer()->get(RouterInterface::class)->getRouteCollection();
        return !empty($RouteCollection->get($route_id)->getOptions(Constant::IS_CURRENT_ROUTE));
    }
判断一个路由是否时当前正在请求的路由

@param string $route_id
@return boolean