public function getUri()
    {
        if ($this->routeGenerated) {
            return $this->routeGenerated;
        }

        if ($this->routeName !== null) {
            return $this->routeGenerated = $this->urlGenerator->generate($this->routeName, $this->routeParams);
        }

        if (strpos($this->uri, '/') === 0 || !$this->parent) {
            return $this->routeGenerated = $this->uri;
        }

        $parentUri = $this->parent ? $this->parent->getUri() : null;
        if ($parentUri === null) {
            return $this->routeGenerated = $this->uri;
        }

        $routeGenerated = new Uri($parentUri);
        $routeGenerated = $routeGenerated->withPath($routeGenerated->getPath() . '/' . $this->uri);

        return $this->routeGenerated = (string) $routeGenerated;
    }