Render element into HTML.
@return string HTML serialization
@throws Exception
4144
public function toString() {
		// List of void elements from HTML5, section 8.1.2 as of 2016-09-19
		static $voidElements = [
			'area',
			'base',
			'br',
			'col',
			'embed',
			'hr',
			'img',
			'input',
			'keygen',
			'link',
			'meta',
			'param',
			'source',
			'track',
			'wbr',
		];

		$attributes = '';
		foreach ( $this->getGeneratedAttributes() as $key => $value ) {
			if ( !preg_match( '/^[0-9a-zA-Z-]+$/', $key ) ) {
				throw new Exception( 'Attribute name must consist of only ASCII letters, numbers and dash' );
			}

			// Note that this is not a complete list of HTML attributes that need this validation.
			// We only check for the ones that are generated by built-in OOUI PHP elements.
			if ( $key === 'href' || $key === 'action' ) {
				if ( !self::isSafeUrl( $value ) ) {
					// We can't tell for sure whether this URL is safe (although it might be). The only safe
					// URLs that we can't check for is relative ones, so just prefix with './'. This should
					// change nothing for relative URLs, and it will neutralize sneaky 'javascript:' URLs.
					$value = './' . $value;
				}
			}

			// Use single-quotes around the attribute value in HTML, because
			// some of the values might be JSON strings
			// 1. Encode both single and double quotes (and other special chars)
			$value = htmlspecialchars( $value, ENT_QUOTES );
			// 2. Decode double quotes, for readability.
			$value = str_replace( '&quot;', '"', $value );
			// 3. Wrap attribute value in single quotes in the HTML.
			$attributes .= ' ' . $key . "='" . $value . "'";
		}

		// Content
		$content = '';
		foreach ( $this->content as $part ) {
			if ( is_string( $part ) ) {
				$content .= htmlspecialchars( $part );
			} elseif ( $part instanceof Tag || $part instanceof HtmlSnippet ) {
				$content .= (string)$part;
			}
		}

		if ( !preg_match( '/^[0-9a-zA-Z]+$/', $this->tag ) ) {
			throw new Exception( 'Tag name must consist of only ASCII letters and numbers' );
		}

		// Tag
		if ( !$content && in_array( $this->tag, $voidElements ) ) {
			return '<' . $this->tag . $attributes . ' />';
		} else {
			return '<' . $this->tag . $attributes . '>' . $content . '</' . $this->tag . '>';
		}
	}
254146
public function render()
    {
        $htmlContent = '';
        foreach (self::$scriptList->toArray() as $script) {
            if ($script[0] == 'script') {
                $htmlContent .= '<script type="text/javascript">' . $script[1] . '</script>' . PHP_EOL;
            } else {
                if (Configuration::read('html.script.test_file_existance') === true) {
                    $scriptPath = APP_ROOT . '/public' . $script[1];
                    if (!file_exists($scriptPath)) {
                        trigger_error('Script file "' . $scriptPath . '" doesn\'t exist.', E_USER_WARNING);
                    }
                }
                $htmlContent .= '<script src="' . $script[1] . '" type="text/javascript"></script>' . PHP_EOL;
            }
        }
        return $htmlContent;
    }
556407
public function render()
    {
        // Set the request arguments as GET parameters
        $_GET = $this->getRequestArguments();

        try {
            $this->controllerContext->getRequest()->setOriginalRequestMappingResults($this->validationErrors);

            // Render the content element
            $result = $this->beautify($GLOBALS['TSFE']->cObj->cObjGetSingle('RECORDS', $this->config));

            // In case of an error
        } catch (\Exception $e) {
            $result = '<pre class="error"><strong>'.$e->getMessage().'</strong>'.PHP_EOL
                      .$e->getTraceAsString().'</pre>';
        }

        return $result;
    }
1157952
protected function _renderContent()
    {
        $extract = $this->viewVars['_extract'];
        $serialize = $this->viewVars['_serialize'];

        if ($serialize === true) {
            $serialize = array_diff(
                array_keys($this->viewVars),
                $this->_specialVars
            );
        }

        foreach ((array)$serialize as $viewVar) {
            if (is_scalar($this->viewVars[$viewVar])) {
                throw new Exception("'" . $viewVar . "' is not an array or iteratable object.");
            }

            foreach ($this->viewVars[$viewVar] as $_data) {
                if ($_data instanceof EntityInterface) {
                    $_data = $_data->toArray();
                }

                if ($extract === null) {
                    $this->_renderRow($_data);
                    continue;
                }

                $values = [];
                foreach ($extract as $formatter) {
                    if (!is_string($formatter) && is_callable($formatter)) {
                        $value = $formatter($_data);
                    } else {
                        $path = $formatter;
                        $format = null;
                        if (is_array($formatter)) {
                            list($path, $format) = $formatter;
                        }

                        if (strpos($path, '.') === false) {
                            $value = $_data[$path];
                        } else {
                            $value = Hash::get($_data, $path);
                        }

                        if ($format) {
                            $value = sprintf($format, $value);
                        }
                    }

                    $values[] = $value;
                }
                $this->_renderRow($values);
            }
        }
    }
1241748
protected function render()
    {
        if (!isset($this->items[0])) {
            return $this->contentIfEmpty;
        }
        
        $this->html('<' . $this->type . $this->getEltDecorationStr() . '>');
        foreach ($this->items as $item) {
            $this->html('<li>' . $item . '</li>');
        }
        $this->html('</' . $this->type . '>');
        return $this->getHtml();
    }
1253180
public function render()
    {
        $htmlContent = '';
        foreach (self::$iconList->toArray() as $icon) {
            $htmlContent .= '<link href="' . $icon[0] . '" rel="icon">' . PHP_EOL;
        }
        return $htmlContent;
    }
340408
public function renderElements()
    {
        $returnValue = '';


		foreach($this->elements as $element){

			 if($this->getElementGroup($element->getName()) !== ''){
			 	continue;	//render grouped elements after
			 }

			 if(!is_null($this->getDecorator()) && !($element instanceof tao_helpers_form_elements_Hidden)){
			 	$returnValue .= $this->getDecorator()->preRender();
			 }

             if(!$this->isValid() && $element->getError()) {
                $element->addClass('error');
             }

			 //render element
			 $returnValue .= $element->render();

			 //render element help
			 $help = trim($element->getHelp());
			 if(!empty($help)){
				 if(!is_null($this->getDecorator('help'))){
			 		$returnValue .= $this->getDecorator('help')->preRender();
			 	}

			 	$returnValue .= $help;

				if(!is_null($this->getDecorator('help'))){
			 		$returnValue .= $this->getDecorator('help')->postRender();
			 	}
			 }

			 //render error message
			 if(!$this->isValid() && $element->getError()){
			 	if(!is_null($this->getDecorator('error'))){
			 		$returnValue .= $this->getDecorator('error')->preRender();
			 	}

			 	$returnValue .= nl2br($element->getError());

				if(!is_null($this->getDecorator('error'))){
			 		$returnValue .= $this->getDecorator('error')->postRender();
			 	}
			 }

			 if(!is_null($this->getDecorator()) && !($element instanceof tao_helpers_form_elements_Hidden)){
			 	$returnValue .= $this->getDecorator()->postRender();
			 }
		}

		$subGroupDecorator = null;
		if(!is_null($this->getDecorator('group'))){
			$decoratorClass = get_class($this->getDecorator('group'));
			$subGroupDecorator = new $decoratorClass();
		}

		//render group
		foreach($this->groups as $groupName => $group){

			if(!is_null($this->getDecorator('group'))){
				$this->getDecorator('group')->setOption('id', $groupName);
				if(isset($group['options'])){
					if(isset($group['options']['class'])){
						$currentClasses = array_map('trim', explode(' ',$this->getDecorator('group')->getOption('cssClass')));
						if(!in_array($group['options']['class'], $currentClasses)){
							$currentClasses[] = $group['options']['class'];
							$this->getDecorator('group')->setOption('cssClass', implode(' ', array_unique($currentClasses)));
						}
					}
				}
				$returnValue .= $this->getDecorator('group')->preRender();
			}
			$returnValue .= $group['title'];
			if(!is_null($subGroupDecorator)){
				$returnValue .= $subGroupDecorator->preRender();
			}
			foreach($group['elements'] as $elementName){
				 if($this->getElementGroup($elementName) === $groupName && $element = $this->getElement( $elementName )){

				 	if(!is_null($this->getDecorator())){// && !($element instanceof tao_helpers_form_elements_Hidden) ){

					 	$returnValue .= $this->getDecorator()->preRender();
					 }

					 //render element
                     if ( ! $this->isValid() && $element->getError()) {
                         $element->addClass( 'error' );
                     }
					 $returnValue .= $element->render();

					 //render element help
					 $help = trim($element->getHelp());
					 if(!empty($help)){
						 if(!is_null($this->getDecorator('help'))){
					 		$returnValue .= $this->getDecorator('help')->preRender();
					 	}

					 	$returnValue .= $help;

						if(!is_null($this->getDecorator('help'))){
					 		$returnValue .= $this->getDecorator('help')->postRender();
					 	}
					 }

					 //render error message
					 if(!$this->isValid() && $element->getError()){
					 	if(!is_null($this->getDecorator('error'))){
					 		$returnValue .= $this->getDecorator('error')->preRender();
					 	}
					 	$returnValue .= nl2br($element->getError());
						if(!is_null($this->getDecorator('error'))){
					 		$returnValue .= $this->getDecorator('error')->postRender();
					 	}
					 }

					 if(!is_null($this->getDecorator())){// && !($element instanceof tao_helpers_form_elements_Hidden) ){
					 	$returnValue .= $this->getDecorator()->postRender();
					 }
				 }
			}
			if(!is_null($subGroupDecorator)){
				$returnValue .= $subGroupDecorator->postRender();
			}
			if(!is_null($this->getDecorator('group'))){
				$returnValue .= $this->getDecorator('group')->postRender();
				$this->getDecorator('group')->setOption('id', '');
			}
		}


        return $returnValue;
    }
860396
public function _toHtml()
    {
        $html = '';

        foreach ($this->getChildNames() as $childName) {
            if ($html === '') {
                $renderer = $this->getChildBlock($childName);
                $html = $renderer->render($this->getFilter());
            }
        }

        return $html;
    }
1057615
public function render()
    {
        $body = $this->getBody();
        if (!$body) {
            throw new Exception\RuntimeException(
                'Body has not been set'
            );
        }

        $element = $this->getElement();
        $header  = ($this->hasCloseButton() ? $this->renderCloseButton() : '')
            . $this->getHeader();

        if ($header) {
            $element->spawnChild('div')
                ->setContent($header)
                ->addClass('modal-header');
        }

        $element->spawnChild('div')
            ->setContent($body)
            ->addClass('modal-body');

        $footer = $this->getFooter();
        if ($footer) {
            $element->spawnChild('div')
                ->setContent($footer)
                ->addClass('modal-footer');
        }

        $element
            ->addClass('modal')
            ->addAttributes($this->getDataAttributes());

        return $element->render();
    }
425101
public function toHtml()
    {
        if($this->getNumPages() <= 1)
        {
            return '';
        }

        $this->renderer->setPaginator($this);
        return $this->renderer->render();
    }
1335664
protected function _serialize()
    {
        $this->_renderRow($this->viewVars['_header']);
        $this->_renderContent();
        $this->_renderRow($this->viewVars['_footer']);
        $content = $this->_renderRow(false);
        $this->_resetStaticVariables = true;
        $this->_renderRow();

        return $content;
    }
1241122
public function render()
    {
        $nameAttribute = $this->getName();
        $this->registerFieldNameForFormTokenGeneration($nameAttribute);

        $output = '';
        $resource = $this->getUploadedResource();
        if ($resource !== null) {
            $resourceIdentityAttribute = '';
            if ($this->hasArgument('id')) {
                $resourceIdentityAttribute = ' id="' . htmlspecialchars($this->arguments['id']) . '-resource-identity"';
            }
            $output .= '<input type="hidden" name="'. htmlspecialchars($nameAttribute) . '[originallySubmittedResource][__identity]" value="' . $this->persistenceManager->getIdentifierByObject($resource) . '"' . $resourceIdentityAttribute . ' />';
        }

        if ($this->hasArgument('collection') && $this->arguments['collection'] !== false && $this->arguments['collection'] !== '') {
            $output .= '<input type="hidden" name="'. htmlspecialchars($nameAttribute) . '[__collectionName]" value="' . htmlspecialchars($this->arguments['collection']) . '" />';
        }

        $this->tag->addAttribute('type', 'file');
        $this->tag->addAttribute('name', $nameAttribute);

        $this->addAdditionalIdentityPropertiesIfNeeded();
        $this->setErrorClassAttribute();

        $output .= $this->tag->render();
        return $output;
    }
89946
public function render(): string
    {
        $formCode = '<form>';

        foreach ($this->elements as $element) {
            $formCode .= $element->render();
        }

        $formCode .= '</form>';

        return $formCode;
    }
482087
protected function renderContent()
    {
        if (is_string($this->content)
            || $this->content instanceof SafeHtmlWrapper
            || $this->content instanceof SafeHtmlProducerInterface
        ) {
            return Html::escape($this->content);
        } elseif ($this->content instanceof RenderableInterface) {
            return Html::escape($this->content->render());
        } elseif (is_array($this->content)
            || $this->content instanceof ArrayableInterface
        ) {
            return ArrayList::of($this->content)
                ->map(function ($child) {
                    if (is_string($child)
                        || $child instanceof SafeHtmlWrapper
                        || $child instanceof SafeHtmlProducerInterface
                    ) {
                        return Html::escape($child);
                    } elseif ($child instanceof RenderableInterface) {
                        return Html::escape($child->render());
                    }

                    throw new NodeChildRenderingException($child);
                })
                ->join();
        }

        throw new NodeRenderingException($this->content);
    }
805782
protected function render() : string
    {
        $html = '<div class="jumbotron' .
            (($this->fluid === true) ? ' jumbotron-fluid' : null) .
            (($this->bg_color !== null) ? ' bg-' . $this->bg_color : null) .
            (($this->text_color !== null) ? ' text-' . $this->text_color : null) .
            '">' .
            (($this->fluid === true) ? '<div class="container">' : null) .
            '<h1 class="display-' . (($this->display_level !== null) ? $this->display_level : '1') .
            '">' . $this->heading .
            (($this->sub_heading !== null) ? ' <small>' .
            $this->sub_heading . '</small>' : null) .
            '</h1>' . $this->content .
            (($this->fluid === true) ? '</div>' : null) .
            '</div>';

        return $html;
    }
1014352
public function render()
        {
            // If the content is a stringable object, we'll go ahead and call
            // the toString method so that we can get the string content of
            // the content object. Otherwise we'll just cast to string.
            if (str_object($this->content)) {
                $this->content = $this->content->__toString();
            } else {
                $this->content = (string) $this->content;
            }

            // Once we obtain the string content, we can set the content on
            // the HttpFoundation's Response instance in preparation for
            // sending it back to client browser when all is finished.
            $this->foundation->setContent($this->content);

            return $this->content;
        }
530380
public function render()
    {
        $htmlContent = '';
        foreach (self::$httpEquivList as $httpEquivName => $httpEquivValue) {
            $htmlContent .= '<meta http-equiv="' . $httpEquivName . '" content="' . $httpEquivValue . '">' . PHP_EOL;
        }
        foreach (self::$metaList as $metaName => $metaValue) {
            $htmlContent .= '<meta name="' . $metaName . '" content="' . $metaValue . '">' . PHP_EOL;
        }
        return $htmlContent;
    }