Render the widget

@param   RendererInterface   $renderer
@param   string              $content
@param   array               $params
@return  string
978234
public function render( RendererInterface $renderer, $content, array $params )
    {
        return $renderer->render(
            $this->getTemplate(),
            $this->getVariables( array_merge( $params, array(
                'content' => $content,
            ) ) )
        );
    }
28785
protected function _renderTag($attribs = array(), $content = null)
    {
        if($this->getTemplate()->decorator() == 'joomla')
        {
            if($this->getConfig()->escape) {
                $content = $this->getTemplate()->escape($content);
            }

            JFactory::getDocument()->setTitle($content);
        }
        else return parent::_renderTag($attribs, $content);
    }
996069
public function renderLayout($content, $layout = null)
    {
        $html = parent::renderLayout($content, $layout);

        return $this->shortcodes($html);
    }
319555
public function render(Renderable $renderable, $render = null)
	{
		$render = $this->renderProvider->get($render);

		return $render->render($renderable);
	}
373310
public function renderContent($content = null)
    {
        $repository = $this->editor->getRepository();

        if (null === $content) {
            if (null !== $page = $this->pageHelper->getCurrent()) {
                if (null === $content = $repository->loadSubjectContent($page)) {
                    if ($page->isAdvanced()) {
                        $content = $this->editor->createDefaultContent($page);
                        $this->persist($page);
                    } elseif (0 < strlen($html = $page->getHtml())) {
                        return $html;
                    } else {
                        return $this->config['default_content'];
                    }
                }
            } else {
                throw new Exception\RenderingException('Undefined content.');
            }
        } elseif ($content instanceof CM\ContentSubjectInterface) {
            if (null === $element = $repository->loadSubjectContent($content)) {
                $element = $this->editor->createDefaultContent($content);
                $this->persist($content);
            }
            $content = $element;
        } elseif (is_string($content)) {
            if (null === $element = $this->editor->getRepository()->findContentByName($content)) {
                $this->persist($element = $this->editor->createDefaultContent($content));
            }
            $content = $element;
        }

        if ($content instanceof EM\ContentInterface) {
            $this->tagManager->addTags($content->getEntityTag());

            $content = $this->editor->getViewBuilder()->buildContent($content);
        }

        if (!$content instanceof View\ContentView) {
            throw new Exception\InvalidArgumentException(
                'Expected string or instance of ' . CM\ContentSubjectInterface::class . ', ' .
                EM\ContentInterface::class . ' or ' . View\ContentView::class
            );
        }

        /** @noinspection PhpInternalEntityUsedInspection */
        return $this->getTemplate()->renderBlock('cms_content', [
            'content' => $content,
        ]);
    }
210649
public function renderToggleButton($content, $options = [])
    {
        if (!isset($options['id'])) {
            $options['id'] = $this->getId() . '-button';
        }

        $this->getView()->registerJs('
        jQuery("#' . $options['id'] . '").on("click", function(event) {
            event.preventDefault();
            jQuery("#' . $this->getId() . '").modal("show");
        });
        ');

        return Elements::button($content, $options);
    }
1151140
public function renderMetaContent( $name, $content = '' )
    {
        $view       = $this->getView();
        $middle     = $this->getMiddleLayoutModel();
        $paragraph  = $middle->getParagraphModel();
        $renderList = $paragraph->findRenderList( $name );

        if ( empty( $renderList ) )
        {
            return $content;
        }

        $meta = reset( $renderList )[1];

        if ( empty( $meta ) )
        {
            return $content;
        }

        $appService     = $view->plugin( 'appService' );
        $serviceManager = $appService();
        $allowOverride  = $serviceManager->getAllowOverride();

        if ( ! $allowOverride )
        {
            $serviceManager->setAllowOverride( true );
        }

        $serviceManager->setService( 'RenderedContent', $meta );

        if ( ! $allowOverride )
        {
            $serviceManager->setAllowOverride( false );
        }

        if ( $meta instanceof LayoutAwareInterface )
        {
            $view->plugin( 'layout' )
                 ->setMiddleLayout(
                     $middle->findMiddleParagraphLayoutById(
                         $meta->getLayoutId()
                     )
                 );
        }

        return $view->render( 'grid/paragraph/render/paragraph', array(
            'paragraphRenderList'  => $renderList,
            'content'              => $content,
        ) );
    }
905648
public function render(AbstractInline $inline, CliRenderer $renderer)
    {
        if (!($inline instanceof Newline)) {
            throw new \InvalidArgumentException(sprintf('Incompatible inline type: "%s"', get_class($inline)));
        }

        return "\n";
    }
606962
final public function render($content = null) {
        if ($content === null) {
            foreach ($this->view->getVariables() as $var => $val) {
                $$var = $val;
            }

            $viewFile = $this->view->getViewFile();
            if (!is_readable(MODULES . $viewFile[0] . DIRECTORY_SEPARATOR . 'View' .
                            DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR .
                            $viewFile[1] . DIRECTORY_SEPARATOR . $viewFile[2] . '.phtml'))
                throw new Exception('View layout "' . join(DIRECTORY_SEPARATOR, $viewFile) . '" not found');

            // include action view
            ob_start();

            include_once MODULES . $viewFile[0] . DIRECTORY_SEPARATOR . 'View' .
                    DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR .
                    $viewFile[1] . DIRECTORY_SEPARATOR . $viewFile[2] . '.phtml';

            $content = ob_get_clean();
            if (!$this->view->isPartial()) {
                // include controller layout
                $controllerLayout = self::getLayoutPath();
                if ($controllerLayout) {
                    ob_start();
                    include_once $controllerLayout;

                    $content = ob_get_clean();
                }
                else if (engineGet('config', 'defaults', 'defaultLayout', false)) {
                    ob_start();
                    $this->loadLayout(engineGet('config', 'defaults', 'defaultLayout'), array('content' => $content));
                    $content = ob_get_clean();
                }
                else {
                    throw new Exception('No layout found.');
                }
            }
        }
        else {
            if (!$errorLayout = engineGet('config', 'modules', $this->view->getModule(), 'defaults', 'errorLayout', false)) {
                if (!$errorLayout = engineGet('config', 'defaults', 'errorLayout', false)) {
                    throw new Exception('Error layout not found', true);
                }
            }

            if (is_array($errorLayout)) {
                if (!array_key_exists('guest', $errorLayout))
                    throw new Exception('Error layout not found for "guest"', true);

                if (array_key_exists($this->userIdentity()->getUser()->getRole(), $errorLayout))
                    $errorLayout = $errorLayout[$this->userIdentity()->getUser()->getRole()];
                else
                    $errorLayout = $errorLayout['guest'];
            }

            ob_start();
            $this->loadLayout($errorLayout, array_merge(array('content' => $content), $this->view->getVariables()));
            $content = ob_get_clean();
        }
        echo($content);
    }
176297
private function setRenderParams(AbstractRenderer $render, $params)
    {
        if (null !== $params) {
            $params = (array) $params;
            foreach ($params as $param => $value) {
                $render->setParam($param, $value);
            }
        }
    }
390796
protected function renderRaw($content, $args = array(), $templateDir = null)
    {
        if (\is_array($content)) {
            $content = json_encode($content);
        }

        return $content;
    }
86354
public function content($content)
    {
        if ($content instanceof Renderable) {
            $this->content = $content->render();
        } else {
            $this->content = (string) $content;
        }

        return $this;
    }
551805
public function render($name = '', $params = null, $content = null)
	{
		$now  = new Date('now');
		$data = $this->doc;

		$url = App::get('request')->root();

		$tz = new \DateTimeZone(App::get('config')->get('offset'));

		$syndicationURL = App::get('router')->url('&format=feed&type=atom');

		if (App::get('config')->get('sitename_pagetitles', 0) == 1)
		{
			$data->title = App::get('language')->txt('JPAGETITLE', App::get('config')->get('sitename'), $data->title);
		}
		elseif (App::get('config')->get('sitename_pagetitles', 0) == 2)
		{
			$data->title = App::get('language')->txt('JPAGETITLE', $data->title, App::get('config')->get('sitename'));
		}

		$feed_title = htmlspecialchars($data->title, ENT_COMPAT, 'UTF-8');

		$feed  = "<feed xmlns=\"http://www.w3.org/2005/Atom\" ";
		if ($data->language != "")
		{
			$feed .= " xml:lang=\"" . $data->language . "\"";
		}
		$feed .= ">\n";
		$feed .= "	<title type=\"text\">" . $feed_title . "</title>\n";
		$feed .= "	<subtitle type=\"text\">" . htmlspecialchars($data->description, ENT_COMPAT, 'UTF-8') . "</subtitle>\n";
		if (empty($data->category) === false)
		{
			if (is_array($data->category))
			{
				foreach ($data->category as $cat)
				{
					$feed .= "	<category term=\"" . htmlspecialchars($cat, ENT_COMPAT, 'UTF-8') . "\" />\n";
				}
			}
			else
			{
				$feed .= "	<category term=\"" . htmlspecialchars($data->category, ENT_COMPAT, 'UTF-8') . "\" />\n";
			}
		}
		$feed .= "	<link rel=\"alternate\" type=\"text/html\" href=\"" . $url . "\"/>\n";
		$feed .= "	<id>" . str_replace(' ', '%20', $data->getBase()) . "</id>\n";
		$feed .= "	<updated>" . htmlspecialchars($now->toISO8601(true), ENT_COMPAT, 'UTF-8') . "</updated>\n";
		if ($data->editor != "")
		{
			$feed .= "	<author>\n";
			$feed .= "		<name>" . $data->editor . "</name>\n";
			if ($data->editorEmail != "")
			{
				$feed .= "		<email>" . htmlspecialchars($data->editorEmail, ENT_COMPAT, 'UTF-8') . "</email>\n";
			}
			$feed .= "	</author>\n";
		}
		$feed .= "	<generator uri=\"http://hubzero.org\" version=\"2.5\">" . $data->getGenerator() . "</generator>\n";
		$feed .= '	<link rel="self" type="application/atom+xml" href="' . str_replace(' ', '%20', $url . $syndicationURL) . "\"/>\n";

		for ($i = 0, $count = count($data->items); $i < $count; $i++)
		{
			$feed .= "	<entry>\n";
			$feed .= "		<title>" . htmlspecialchars(strip_tags($data->items[$i]->title), ENT_COMPAT, 'UTF-8') . "</title>\n";
			$feed .= '		<link rel="alternate" type="text/html" href="' . $url . $data->items[$i]->link . "\"/>\n";

			if ($data->items[$i]->date == "")
			{
				$data->items[$i]->date = $now->toUnix();
			}
			$itemDate = new Date($data->items[$i]->date);
			$itemDate->setTimeZone($tz);

			$feed .= "		<published>" . htmlspecialchars($itemDate->toISO8601(true), ENT_COMPAT, 'UTF-8') . "</published>\n";
			$feed .= "		<updated>" . htmlspecialchars($itemDate->toISO8601(true), ENT_COMPAT, 'UTF-8') . "</updated>\n";
			if (empty($data->items[$i]->guid) === true)
			{
				$feed .= "		<id>" . str_replace(' ', '%20', $url . $data->items[$i]->link) . "</id>\n";
			}
			else
			{
				$feed .= "		<id>" . htmlspecialchars($data->items[$i]->guid, ENT_COMPAT, 'UTF-8') . "</id>\n";
			}

			if ($data->items[$i]->author != "")
			{
				$feed .= "		<author>\n";
				$feed .= "			<name>" . htmlspecialchars($data->items[$i]->author, ENT_COMPAT, 'UTF-8') . "</name>\n";
				if ($data->items[$i]->authorEmail != "")
				{
					$feed .= "			<email>" . htmlspecialchars($data->items[$i]->authorEmail, ENT_COMPAT, 'UTF-8') . "</email>\n";
				}
				$feed .= "		</author>\n";
			}
			if ($data->items[$i]->description != "")
			{
				$feed .= "		<summary type=\"html\">" . htmlspecialchars($data->items[$i]->description, ENT_COMPAT, 'UTF-8') . "</summary>\n";
				$feed .= "		<content type=\"html\">" . htmlspecialchars($data->items[$i]->description, ENT_COMPAT, 'UTF-8') . "</content>\n";
			}
			if (empty($data->items[$i]->category) === false)
			{
				if (is_array($data->items[$i]->category))
				{
					foreach ($data->items[$i]->category as $cat)
					{
						$feed .= "		<category term=\"" . htmlspecialchars($cat, ENT_COMPAT, 'UTF-8') . "\" />\n";
					}
				}
				else
				{
					$feed .= "		<category term=\"" . htmlspecialchars($data->items[$i]->category, ENT_COMPAT, 'UTF-8') . "\" />\n";
				}
			}
			if ($data->items[$i]->enclosure != null)
			{
				$feed .= "		<link rel=\"enclosure\" href=\"" . $data->items[$i]->enclosure->url . "\" type=\"" . $data->items[$i]->enclosure->type . "\"  length=\"" . $data->items[$i]->enclosure->length . "\" />\n";
			}
			$feed .= "	</entry>\n";
		}
		$feed .= "</feed>\n";
		return $feed;
	}
468205
public function execute(&$params, &$pagerenderer)
    {
        if (!is_array($params['cssFiles'])) {
            return;
        }
        $cssFilesArray = [];
        foreach ($params['cssFiles'] as $cssFile => $cssFileSettings) {
            $compiledFile = \KayStrobach\Dyncss\Service\DyncssService::getCompiledFile($cssFile);
            if ($compiledFile !== $cssFile) {
                $cssFileSettings['file'] = $compiledFile; //needed for TYPO3 4.6+ ;)
                $cssFileSettings['compress'] = 0;
                $cssFilesArray[$compiledFile] = $cssFileSettings;
            } else {
                $cssFilesArray[$cssFile] = $cssFileSettings;
            }
        }
        $params['cssFiles'] = $cssFilesArray;
    }
611968
private function renderContent($params = null, $template = null)
    {
        try {
            $mode = null !== $this->getMode() ? $this->getMode() : $this->_object->getMode();
            $this->templateFile = $template;
            if (null === $this->templateFile && null !== $this->_object) {
                $this->templateFile = $this->getTemplateFile($this->_object, $mode);
                if (false === $this->templateFile) {
                    $this->templateFile = $this->getTemplateFile($this->_object, $this->getMode());
                }

                if (false === $this->templateFile && false === $this->_ignoreIfRenderModeNotAvailable) {
                    $this->templateFile = $this->getTemplateFile($this->_object);
                }
            }

            if (false === $this->isValidTemplateFile($this->templateFile)) {
                throw new RendererException(sprintf(
                        'Unable to find file \'%s\' in path (%s)', $template, implode(', ', $this->_scriptdir)
                ), RendererException::SCRIPTFILE_ERROR);
            }
        } catch (RendererException $e) {
            $render = '';

            // Unknown template, try to render subcontent
            if (null !== $this->_object && is_array($this->_object->getData())) {
                foreach ($this->_object->getData() as $subcontents) {
                    $subcontents = (array) $subcontents;

                    foreach ($subcontents as $sc) {
                        if ($sc instanceof RenderableInterface) {
                            $scRender = $this->render(
                                $sc, $this->getMode(), $params, $template, $this->_ignoreIfRenderModeNotAvailable
                            );

                            if (false === $scRender) {
                                throw $e;
                            }

                            $render .= $scRender;
                        }
                    }
                }
            }

            return $render;
        }

        $application = $this->getApplication();
        // Assign vars and parameters
        if (null !== $this->_object) {
            $draft = $this->_object->getDraft();
            $aClassContentClassname = 'BackBee\ClassContent\AbstractClassContent';
            if ($this->_object instanceof $aClassContentClassname && !$this->_object->isLoaded()) {
                // trying to refresh unloaded content
                $em = $application->getEntityManager();

                $classname = get_class($this->_object);
                $uid = $this->_object->getUid();

                $em->detach($this->_object);
                $object = $em->find($classname, $uid);
                if (null !== $object) {
                    $this->_object = $object;
                    if (null !== $draft) {
                        $this->_object->setDraft($draft);
                    }
                }
            }

            $this->assign($this->_object->getData());
            $this->setParam($this->_object->getAllParams());
        }

        if (null !== $application) {
            $application->debug(sprintf(
                'Rendering content `%s(%s)`.',
                get_class($this->_object),
                $this->_object->getUid()
            ));
        }

        return $this->renderTemplate();
    }
541274
public static function render($xml, array $params = [])
	{
		$renderer = static::getCachedRenderer();

		if (!empty($params))
		{
			$renderer->setParameters($params);
		}

		if (isset(static::$beforeRender))
		{
			$xml = call_user_func(static::$beforeRender, $xml);
		}

		$output = $renderer->render($xml);

		if (isset(static::$afterRender))
		{
			$output = call_user_func(static::$afterRender, $output);
		}

		return $output;
	}
948594
public function render($content, $data = [])
    {
        if (!$content) {
            return '';
        }

        $html = $this->renderTwig($content, $data);

        $html = Markdown::parseSafe($html);

        return $html;
    }