Bundle/CoreBundle/Twig/Extension/CmsExtension.php
public function cmsWidget($widget)
    {
        $widget->setCurrentView($this->currentViewHelper->getCurrentView());

        try {
            $response = $this->widgetRenderer->renderContainer($widget, $widget->getCurrentView());
        } catch (\Exception $ex) {
            $response = $this->widgetExceptionHandler->handle($ex, $widget);
        }

        return $response;
    }
public function cmsWidget($widget)
    {
        $widget->setCurrentView($this->currentViewHelper->getCurrentView());

        try {
            $response = $this->widgetRenderer->renderContainer($widget, $widget->getCurrentView());
        } catch (\Exception $ex) {
            $response = $this->widgetExceptionHandler->handle($ex, $widget);
        }

        return $response;
    }
public function cmsWidget ( $ widget ) { $ widget -> setCurrentView ( $ this -> currentViewHelper -> getCurrentView ( ) ) ; try { $ response = $ this -> widgetRenderer -> renderContainer ( $ widget , $ widget -> getCurrentView ( ) ) ; } catch ( \ Exception $ ex ) { $ response = $ this -> widgetExceptionHandler -> handle ( $ ex , $ widget ) ; } return $ response ; }
Render a widget.

@param Widget $widget

@return string
Render a widget .