public function getUrlByRouteName($name, array $params = null, $baseUrl = null, $addExt = true, Site $site = null, $buildQuery = false)
    {
        $paramsToAdd = [];
        $uri = $this->applyRouteParameters(
                $this->getRoutePath($name),
                (array) $params,
                $paramsToAdd
        );

        $path = $this->getUri($baseUrl.$uri, null, $site);
        if (true !== $addExt) {
            $path = File::removeExtension($path);
        }

        if (!empty($paramsToAdd) && true === $buildQuery) {
            $path = $path.'?'.http_build_query($paramsToAdd);
        }

        return $path;
    }