Render the feed.

@param   string  $name     The name of the element to render
@param   array   $params   Array of values
@param   string  $content  Override the output of the renderer
@return  string  The output of the script
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;
	}
104853
public function contentTag($name, $content, array $options = array(), $escape = false)
    {
        if ($content instanceof \Closure) {
            ob_start();
            $tmpContent = $content();
            $content = ob_get_clean();
            if ($tmpContent !== null) {
                $content = $tmpContent;
                unset($tmpContent);
            }
        }
        return $this->_content_tag_string($name, $content, $options, $escape);
    }
593522
public function contentTag($name, $content, array $options = array(), $escape = false)
    {
        if ($content instanceof \Closure) {
            ob_start();
            $ret     = $content();
            $content = ob_get_clean();
            if ($ret !== null) {
                $content = $ret;
            }
        }
        return $this->contentTagString($name, $content, $options, $escape);
    }
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);
    }
627309
public static function __callstatic($name, $params)
    {
        $knownStyles = static::getKnownStyles();
        $styleID     = $knownStyles[$name];

        $style = static::style($styleID);

        // target string is expected to be:
        $targetString = $params[0][0];

        $element = new TextElement($targetString);
        $element->addStyle($style);

        return $element->render();
    }
1363330
public function render($content)
    {
    	$form = $this->getElement();
    	$view = $form->getView();

        /*
         * Check if this is a form that should autosubmit. If so, add script to head and onload
         */
        if ($form->isAutoSubmit()) {
            $form->addScript($this->localScriptFiles);
            //\ZendX_JQuery::enableForm($form);
            $jquery = $view->jQuery();
            $jquery->enable();  //Just to make sure

            $params = $form->getAutoSubmit();
            if (($view instanceof \Zend_View_Abstract) && ($params['submitUrl'] instanceof \MUtil_Html_HtmlInterface)) {
                $params['submitUrl'] = $params['submitUrl']->render($view);
            }

            $js = sprintf(
                    '%s("#%s").%s(%s);',
                    \ZendX_JQuery_View_Helper_JQuery::getJQueryHandler(),
                    $form->getId(),
                    $this->localScriptName,
                    \ZendX_JQuery::encodeJson($params)
                    );
            $jquery->addOnLoad($js);
        }

        $scripts 	= $form->getScripts();
        $css        = $form->getCss();

        if (!is_null($scripts) && is_array($scripts)) {
    		$baseUrl = $view->serverUrl() . $view->baseUrl();
            $headscript = $view->headScript();
	        foreach ($scripts as $script) {
	        	$headscript->appendFile($baseUrl . $script);
	        }
    	}
        if (!is_null($css) && is_array($css)) {
            $baseUrl = $view->serverUrl() . $view->baseUrl();
            $headLink = $view->headLink();
            foreach($css as $cssFile => $media) {
                $headLink->appendStylesheet($baseUrl . $cssFile, $media);
            }
        }
    	$content = parent::render($content);
    	return $content;
    }
959312
public function render($name, array $params = [])
	{
		$latte = $this->createLatteEngine();
		$basePath = ['basePath' => $this->getBasePath()] ;
		$latte->render($name, $params + $basePath);
		return $latte;
	}
450880
public function render($name, $params = [])
    {
        if (isset($this->fullQualifiedPathNameWithTemplatePath[$name])) {
            $template   = $this->getNewTemplate();
            $path       = $this->fullQualifiedPathNameWithTemplatePath[$name];

            $template->setFilePath($path->getPath() . '.phtml');

            if ($this->defaultParametersProvided) {
                $template->assignMany($this->defaultParameters);
            }

            if (isset($this->fullQualifiedPathNameWithDefaultParameters[$name])) {
                $template->assignMany($this->fullQualifiedPathNameWithDefaultParameters[$name]);
            }

            if (!empty($params)) {
                $template->assignMany($params);
            }

            $content = $template->render();
        } else {
            $content = '';
        }

        return $content;
    }
96381
public function slot($name, $content = null)
    {
        if (func_num_args() === 2) {
            $this->slots[$this->currentComponent()][$name] = $content;
        } else {
            if (ob_start()) {
                $this->slots[$this->currentComponent()][$name] = '';

                $this->slotStack[$this->currentComponent()][] = $name;
            }
        }
    }
858752
public function addMeta(string $name, string $content)
    {
        $args = func_get_args();

        return $this->set('page', 'meta', ...$args);
    }
936903
public function appendBody($content, $name = null)
    {
        if ((null === $name) || !is_string($name)) {
            if (isset($this->_body['default'])) {
                $this->_body['default'] .= (string) $content;
            } else {
                return $this->append('default', $content);
            }
        } elseif (isset($this->_body[$name])) {
            $this->_body[$name] .= (string) $content;
        } else {
            return $this->append($name, $content);
        }

        return $this;
    }
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;
	}
1279530
protected static function buildLine( $name, $param, $content )
	{
		$params	= array();
		foreach( $param as $key => $value )
			$params[]	= strtoupper( trim( $key ) )."=".$value;
		$param	= implode( ",", $params );
		if( $param )
		{
			$param	= " ;".$param;
			if( strlen( $param ) > 75 )
			{
				$rest	= $param;
				$param	= "";
				while( strlen( $rest ) > 75 )
				{
					$param	.= substr( $rest, 0, 74 ).self::$lineBreak;
					$rest	= " ".substr( $rest, 74 );
				}
			}
			$param	= self::$lineBreak.$param;
		}

		$content	= ":".$content;
		if( strlen( $content ) > 75 )
		{
			$rest	= $content;
			$content	= "";
			while( strlen( $rest ) > 75 )
			{
				$content	.= substr( $rest, 0, 74 ).self::$lineBreak;
				$rest	= " ".substr( $rest, 74 );
			}
		}

		$line	= strtoupper( $name ).$param.$content;
		$line	= $line;
		return $line;
	}
611906
public static function createSub($name = '', $content = null)
	{
		$class = get_called_class();
		$element = new $class($name, $content);
		$element->sub = true;
		return $element;
	}
33670
public function appendSection($name, $content = null)
    {
        $section = $this->getSectionCollection()->findOrCreate($name);

        $content ? $section->appendContent($content) : $section->start();
    }
577828
public static function tag($name, $content = NULL, Array $attributes = NULL) {
    return \Psc\UI\HTML::tag($name, $content, $attributes);
  }
460467
public function render($name = null, ...$params)
    {
        return new HtmlString(
            view($this->getView(), [
                'breadcrumbs' => $this->generate($name, $params)
            ])->render()
        );
    }