Bundle/SeoBundle/Controller/PageSeoController.php
private function getViewUrl(View $view)
    {
        if (!method_exists($view, 'getUrl')) {
            return $this->generateUrl('victoire_business_template_show', ['id' => $view->getId()]);
        }

        /** @var ViewReference $viewReference */
        $viewReference = $this->container->get('victoire_view_reference.repository')
            ->getOneReferenceByParameters(['viewId' => $view->getId()]);

        $view->setReference($viewReference);

        return $this->generateUrl('victoire_core_page_show', ['url' => $viewReference->getUrl()]);
    }
private function getViewUrl(View $view)
    {
        if (!method_exists($view, 'getUrl')) {
            return $this->generateUrl('victoire_business_template_show', ['id' => $view->getId()]);
        }

        /** @var ViewReference $viewReference */
        $viewReference = $this->container->get('victoire_view_reference.repository')
            ->getOneReferenceByParameters(['viewId' => $view->getId()]);

        $view->setReference($viewReference);

        return $this->generateUrl('victoire_core_page_show', ['url' => $viewReference->getUrl()]);
    }
private function getViewUrl ( View $ view ) { if ( ! method_exists ( $ view , 'getUrl' ) ) { return $ this -> generateUrl ( 'victoire_business_template_show' , [ 'id' => $ view -> getId ( ) ] ) ; } /** @var ViewReference $viewReference */ $ viewReference = $ this -> container -> get ( 'victoire_view_reference.repository' ) -> getOneReferenceByParameters ( [ 'viewId' => $ view -> getId ( ) ] ) ; $ view -> setReference ( $ viewReference ) ; return $ this -> generateUrl ( 'victoire_core_page_show' , [ 'url' => $ viewReference -> getUrl ( ) ] ) ; }
Get url for a View using ViewReferences if necessary.

@param View $view

@return string
Get url for a View using ViewReferences if necessary .