Bundle/PageBundle/Helper/PageHelper.php
private function guessBestLayoutForView(View $view)
    {
        if (method_exists($view, 'getLayout') && $view->getLayout()) {
            $viewLayout = $view->getLayout();
        } else {
            $viewLayout = $view->getTemplate()->getLayout();
        }

        return $viewLayout;
    }
private function guessBestLayoutForView(View $view)
    {
        if (method_exists($view, 'getLayout') && $view->getLayout()) {
            $viewLayout = $view->getLayout();
        } else {
            $viewLayout = $view->getTemplate()->getLayout();
        }

        return $viewLayout;
    }
private function guessBestLayoutForView ( View $ view ) { if ( method_exists ( $ view , 'getLayout' ) && $ view -> getLayout ( ) ) { $ viewLayout = $ view -> getLayout ( ) ; } else { $ viewLayout = $ view -> getTemplate ( ) -> getLayout ( ) ; } return $ viewLayout ; }
Guess which layout to use for a given View.

@param View $view

@return string
Guess which layout to use for a given View .