Networking\InitCmsBundle\Model\ContentRouteManager::generateRoute PHP Метод

generateRoute() публичный статический Метод

public static generateRoute ( Networking\InitCmsBundle\Model\ContentRouteInterface $contentRoute, $path, $content ) : Route
$contentRoute Networking\InitCmsBundle\Model\ContentRouteInterface
$path
$content
Результат Networking\InitCmsBundle\Component\Routing\Route
    public static function generateRoute(ContentRouteInterface $contentRoute, $path, $content)
    {
        $template = new Template(array('template' => $contentRoute->getTemplate()));
        $defaults = array('route_params' => '', Route::LOCALE => $contentRoute->getLocale(), RouteObjectInterface::CONTROLLER_NAME => $contentRoute->getController(), RouteObjectInterface::TEMPLATE_NAME => $template, RouteObjectInterface::CONTENT_OBJECT => $content);
        return new Route($path, $defaults);
    }

Usage Example

Пример #1
0
 /**
  * {@inheritDoc}
  */
 public function getRoute()
 {
     return ContentRouteManager::generateRoute($this->contentRoute, $this->contentRoute->getPath(), $this);
 }
All Usage Examples Of Networking\InitCmsBundle\Model\ContentRouteManager::generateRoute