private function hasDynamicPath(PageInterface $page)
    {
        if (empty($route = $page->getRoute())) {
            return false;
        }

        if (null === $route = $this->findRoute($route)) {
            return false;
        }

        if (preg_match_all('~\{([^\}]+)\}~', $route->getPath(), $matches, PREG_SET_ORDER)) {
            foreach ($matches as $match) {
                // If route parameter does not have a default value
                if (!array_key_exists($match[1], $route->getDefaults())) {
                    return true;
                }
            }
        }


        return false;
    }
private function hasDynamicPath(PageInterface $page)
    {
        if (empty($route = $page->getRoute())) {
            return false;
        }

        if (null === $route = $this->findRoute($route)) {
            return false;
        }

        if (preg_match_all('~\{([^\}]+)\}~', $route->getPath(), $matches, PREG_SET_ORDER)) {
            foreach ($matches as $match) {
                // If route parameter does not have a default value
                if (!array_key_exists($match[1], $route->getDefaults())) {
                    return true;
                }
            }
        }


        return false;
    }
private function hasDynamicPath ( PageInterface $ page ) { if ( empty ( $ route = $ page -> getRoute ( ) ) ) { return false ; } if ( null === $ route = $ this -> findRoute ( $ route ) ) { return false ; } if ( preg_match_all ( '~\{([^\}]+)\}~' , $ route -> getPath ( ) , $ matches , PREG_SET_ORDER ) ) { foreach ( $ matches as $ match ) { // If route parameter does not have a default value if ( ! array_key_exists ( $ match [ 1 ] , $ route -> getDefaults ( ) ) ) { return true ; } } } return false ; }
Returns whether the page has dynamic path or not.

@param PageInterface $page

@return bool
Returns whether the page has dynamic path or not .