Service/Mail.php
protected function renderView($view, array $parameters = array())
    {
        if ($this->_oContainer->has('templating')) {
            return $this->_oContainer->get('templating')->render($view, $parameters);
        }

        if (!$this->_oContainer->has('twig')) {
            throw new \LogicException('You can not use the "renderView" method if the Templating Component or the Twig Bundle are not available.');
        }

        return $this->_oContainer->get('twig')->render($view, $parameters);
    }
protected function renderView($view, array $parameters = array())
    {
        if ($this->_oContainer->has('templating')) {
            return $this->_oContainer->get('templating')->render($view, $parameters);
        }

        if (!$this->_oContainer->has('twig')) {
            throw new \LogicException('You can not use the "renderView" method if the Templating Component or the Twig Bundle are not available.');
        }

        return $this->_oContainer->get('twig')->render($view, $parameters);
    }
Returns a rendered view.

@param string $view       The view name
@param array  $parameters An array of parameters to pass to the view

@return string The rendered view