Create an output content for Ltsv
@return string
770472
protected function createOutputContents()
    {
        $formattedItems = $this->formatterInstance()->format($this->rows);

        $ret = array();
        foreach ($formattedItems as $label => $value) {
            $ret[] = $label . ':' . $value;
        }

        return join("\t", $ret) . $this->EOL;
    }
511826
protected function generateOutput()
    {
        $output = '';

        foreach ($this->messageList as $message) {
            $flashMessage = GeneralUtility::makeInstance(
                'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
                $message[2],
                $message[1],
                $message[0]
            );
            $output .= $flashMessage->render();
        }

        return $output;
    }
856092
public function html()
    {
        if (!$this->hasContent() && !$this->isEditable()) {
            return '';
        }

        $content = $this->hasContent() ? $this->show() : $this->showDefault();

        // If the return data is a View then assign any parameters to it.
        if ($content instanceof View && !empty($this->viewParams)) {
            $content->with($this->viewParams);
        }

        return (string) $content;
    }
665388
public function outputView()
    {
        // Can have Components without views
        if (!$this->view) {
            return '';
        }

        /**
         * @var View $view
         */

        // We init every View only once
        if (!isset(self::$views[$this->view])) {
            if (!class_exists($this->view)) {
                $this->view = str_replace('_', '', $this->view);
            }

            $view = new $this->view($this);
            // Set up shared data
            $view->setUp();
            self::$views[$this->view] = $view;
        }
        $method = $this->method;

        if (!method_exists(self::$views[$this->view], $method)) {
            dump('Method "'. $method .'" in class "'. $this->view .'" not found.');
        }

        // Execute view method
        $this->getCurrentViewObject()->$method($this->data);

        // Require file with data
        $method_file = DIR_FRONT_VIEWS . $this->getComponentName() . '.' . $method . '.php';
        if (is_file($method_file)) {
            require_once $method_file;
        }
        // Require file with data in sub folder
        $method_file = DIR_FRONT_VIEWS . $this->getComponentName() . '/' . $method . '.php';
        if (is_file($method_file)) {
            require_once $method_file;
        }
    }
36271
public function getContent()
    {
        $content = '{\colortbl;';

        foreach ($this->_colors as $hexColor) {
            $rtfColor = self::convertHexColorToRtf($hexColor);
            $content .= $rtfColor . ';';
        }

        $content .= '}' . "\r\n";

        return $content;
    }
541970
public function generate()
	{
		if (TL_MODE === 'BE') {
			return parent::generate();
		}

		$parentKey = ($this->arrData['ptable'] ?: 'tl_article') . '__' . $this->arrData['pid'];

		$htmlPrefix = '';

		if (!empty($GLOBALS['TL_RS_COLUMNS'][$parentKey])) {

			if ($GLOBALS['TL_RS_COLUMNS'][$parentKey]['active']) {

				$GLOBALS['TL_RS_COLUMNS'][$parentKey]['count']++;
				$count = $GLOBALS['TL_RS_COLUMNS'][$parentKey]['count'];

				if ($count) {

					$classes = array('rs-column');
					foreach ($GLOBALS['TL_RS_COLUMNS'][$parentKey]['config'] as $name => $media) {
						$classes = array_merge($classes, $media[($count - 1) % count($media)]);
						if ($count - 1 < count($media)) {
							$classes[] = '-' . $name . '-first-row';
						}
					}

					$htmlPrefix .= '<div class="' . implode(' ', $classes) . '">';

				}

			}

			$GLOBALS['TL_RS_COLUMNS_STACK'][$parentKey][] = $GLOBALS['TL_RS_COLUMNS'][$parentKey];
		}

		$GLOBALS['TL_RS_COLUMNS'][$parentKey] = array(
			'active' => true,
			'count' => 0,
			'config' => static::getColumnsConfiguration($this->arrData),
		);

		return $htmlPrefix . parent::generate();
	}
180129
protected function output()
    {
        $attrs   = '';
        $classes = $this->style . ' fa-' . $this->icon;
        $transforms = '';
        $mask = '';

        if (!empty($this->classes) && count($this->classes) > 0) {
            $classes .= ' ' . implode(' ', $this->classes);
        }

        if (!empty($this->attributes) && count($this->attributes) > 0) {
            foreach ($this->attributes as $attr => $val) {
                $attrs .= ' ' . $attr . '="' . $val . '"';
            }
        }

        if (!empty($this->transforms) && count($this->transforms) > 0) {
            $transformList = array();
            foreach ($this->transforms as $transform) {
                $transformList[] = implode('-', $transform);
            }
            $transforms = ' data-fa-transform="' . implode(' ', $transformList) . '"';
        }

        if($this->mask) {
            $mask = ' data-fa-mask="' . $this->mask . '"';
        }

        $htmlOutput = sprintf(self::ICON_HTML, $classes, $attrs, $transforms, $mask);

        return $this->resetAndOutput($htmlOutput);
    }
1197862
public function outputHtml()
    {
        echo '<div style="display: block; margin: 5px; padding: 5px; background-color: #fff; border: 1px solid black; z-index: 999999999; position:relative;">';
        echo '<h3 style="font-size: 14px; margin: 3px">' . $this->_backtrace[0]['file'] . ':' . $this->_backtrace[1]['function'] . ':' . $this->_backtrace[0]['line'] . '</h3>';
        $backtrace = array_slice($this->_backtrace, 1, $this->_showSteps);
        foreach ($backtrace as $bt) {
            if (!isset($bt['file'])) {
                continue;
            }
            echo '<div style="font-size: 12px; margin: 1px">' . $bt['file'] . ':' . $bt['function'] . ':' . $bt['line'] . '</div>';
        }
        echo '<hr />';
        echo self::dump($this->_var, $this->_depth, true);
        echo '</div>';
    }
24956
public function getOutput() {
		// create stream handle for the output
		$handle = fopen('php://temp/maxmemory:'.(1*1024*1024), 'r+'); // 1MB

		fwrite($handle, '<?xml version="1.0"?>');
		
		// count subkeys. if there is more than one we have to generate an auto container
		// we have to take care of attributes
		$count = 0;
		foreach ($this->_content['content'] as $key => $item) {
			if ($key{0} != ':') $count++;
		}
		
		if ($count != 1) $this->_content['content'] = ['auto-container' => $this->_content['content']];
		fwrite($handle, $this -> _outputXML($this->_content['content']));
		return $handle;
	}
117306
public function output()
    {
        // If the view file exists
        if ($this->hasFile()) {
            // Extract all view variables
            extract($this->getVars());
            ob_start();
            include($this->getPath() . '/' . $this->getFile(true));
            $html = ob_get_contents();
            ob_end_clean();
            return $html;
        } else {
            die('Fatal Error: ' . $this->getPath() . '/' . $this->getFile(true) . ' does not exist.');
        }
    }
17033
function toHtml() {
        global $CFG, $PAGE, $OUTPUT;
        require_once($CFG->dirroot.'/repository/lib.php');

        if ($this->_flagFrozen) {
            return $this->getFrozenHtml();
        }

        $ctx = $this->_options['context'];

        $id           = $this->_attributes['id'];
        $elname       = $this->_attributes['name'];

        $subdirs      = $this->_options['subdirs'];
        $maxbytes     = $this->_options['maxbytes'];
        $areamaxbytes = $this->_options['areamaxbytes'];
        $maxfiles     = $this->_options['maxfiles'];
        $changeformat = $this->_options['changeformat']; // TO DO: implement as ajax calls

        $text         = $this->_values['text'];
        $format       = $this->_values['format'];
        $draftitemid  = $this->_values['itemid'];

        // security - never ever allow guest/not logged in user to upload anything
        if (isguestuser() or !isloggedin()) {
            $maxfiles = 0;
        }

        $str = $this->_getTabs();
        $str .= '<div>';

        $editor = editors_get_preferred_editor($format);
        $strformats = format_text_menu();
        $formats =  $editor->get_supported_formats();
        foreach ($formats as $fid) {
            $formats[$fid] = $strformats[$fid];
        }

        // get filepicker info
        //
        $fpoptions = array();
        if ($maxfiles != 0 ) {
            if (empty($draftitemid)) {
                // no existing area info provided - let's use fresh new draft area
                require_once("$CFG->libdir/filelib.php");
                $this->setValue(array('itemid'=>file_get_unused_draft_itemid()));
                $draftitemid = $this->_values['itemid'];
            }

            $args = new stdClass();
            // need these three to filter repositories list
            $args->accepted_types = array('web_image');
            $args->return_types = $this->_options['return_types'];
            $args->context = $ctx;
            $args->env = 'filepicker';
            // advimage plugin
            $image_options = initialise_filepicker($args);
            $image_options->context = $ctx;
            $image_options->client_id = uniqid();
            $image_options->maxbytes = $this->_options['maxbytes'];
            $image_options->areamaxbytes = $this->_options['areamaxbytes'];
            $image_options->env = 'editor';
            $image_options->itemid = $draftitemid;

            // moodlemedia plugin
            $args->accepted_types = array('video', 'audio');
            $media_options = initialise_filepicker($args);
            $media_options->context = $ctx;
            $media_options->client_id = uniqid();
            $media_options->maxbytes  = $this->_options['maxbytes'];
            $media_options->areamaxbytes  = $this->_options['areamaxbytes'];
            $media_options->env = 'editor';
            $media_options->itemid = $draftitemid;

            // advlink plugin
            $args->accepted_types = '*';
            $link_options = initialise_filepicker($args);
            $link_options->context = $ctx;
            $link_options->client_id = uniqid();
            $link_options->maxbytes  = $this->_options['maxbytes'];
            $link_options->areamaxbytes  = $this->_options['areamaxbytes'];
            $link_options->env = 'editor';
            $link_options->itemid = $draftitemid;

            $args->accepted_types = array('.vtt');
            $subtitle_options = initialise_filepicker($args);
            $subtitle_options->context = $ctx;
            $subtitle_options->client_id = uniqid();
            $subtitle_options->maxbytes  = $this->_options['maxbytes'];
            $subtitle_options->areamaxbytes  = $this->_options['areamaxbytes'];
            $subtitle_options->env = 'editor';
            $subtitle_options->itemid = $draftitemid;

            $fpoptions['image'] = $image_options;
            $fpoptions['media'] = $media_options;
            $fpoptions['link'] = $link_options;
            $fpoptions['subtitle'] = $subtitle_options;
        }

        //If editor is required and tinymce, then set required_tinymce option to initalize tinymce validation.
        if (($editor instanceof tinymce_texteditor)  && !is_null($this->getAttribute('onchange'))) {
            $this->_options['required'] = true;
        }

        // print text area - TODO: add on-the-fly switching, size configuration, etc.
        $editor->set_text($text);
        $editor->use_editor($id, $this->_options, $fpoptions);

        $rows = empty($this->_attributes['rows']) ? 15 : $this->_attributes['rows'];
        $cols = empty($this->_attributes['cols']) ? 80 : $this->_attributes['cols'];

        //Apply editor validation if required field
        $context = [];
        $context['rows'] = $rows;
        $context['cols'] = $cols;
        $context['frozen'] = $this->_flagFrozen;
        foreach ($this->getAttributes() as $name => $value) {
            $context[$name] = $value;
        }
        $context['hasformats'] = count($formats) > 1;
        $context['formats'] = [];
        if (($format === '' || $format === null) && count($formats)) {
            $format = key($formats);
        }
        foreach ($formats as $formatvalue => $formattext) {
            $context['formats'][] = ['value' => $formatvalue, 'text' => $formattext, 'selected' => ($formatvalue == $format)];
        }
        $context['id'] = $id;
        $context['value'] = $text;
        $context['format'] = $format;

        if (!is_null($this->getAttribute('onblur')) && !is_null($this->getAttribute('onchange'))) {
            $context['changelistener'] = true;
        }

        $str .= $OUTPUT->render_from_template('core_form/editor_textarea', $context);

        // during moodle installation, user area doesn't exist
        // so we need to disable filepicker here.
        if (!during_initial_install() && empty($CFG->adminsetuppending)) {
            // 0 means no files, -1 unlimited
            if ($maxfiles != 0 ) {
                $str .= html_writer::empty_tag('input', array('type' => 'hidden', 'name' => $elname.'[itemid]',
                        'value' => $draftitemid));

                // used by non js editor only
                $editorurl = new moodle_url("$CFG->wwwroot/repository/draftfiles_manager.php", array(
                    'action'=>'browse',
                    'env'=>'editor',
                    'itemid'=>$draftitemid,
                    'subdirs'=>$subdirs,
                    'maxbytes'=>$maxbytes,
                    'areamaxbytes' => $areamaxbytes,
                    'maxfiles'=>$maxfiles,
                    'ctx_id'=>$ctx->id,
                    'course'=>$PAGE->course->id,
                    'sesskey'=>sesskey(),
                    ));
                $str .= '<noscript>';
                $str .= "<div><object type='text/html' data='$editorurl' height='160' width='600' style='border:1px solid #000'></object></div>";
                $str .= '</noscript>';
            }
        }


        $str .= '</div>';

        return $str;
    }
592071
public function xmlOutput() {
        $o = '';
        $o.= '        <INDEX NAME="' . $this->name . '"';
        if ($this->unique) {
            $unique = 'true';
        } else {
            $unique = 'false';
        }
        $o.= ' UNIQUE="' . $unique . '"';
        $o.= ' FIELDS="' . implode(', ', $this->fields) . '"';
        if ($this->hints) {
            $o.= ' HINTS="' . implode(', ', $this->hints) . '"';
        }
        if ($this->comment) {
            $o.= ' COMMENT="' . htmlspecialchars($this->comment) . '"';
        }
        $o.= '/>' . "\n";

        return $o;
    }
1018289
public function generate()
	{
		$arrOptions = array();
		$strClass = 'tl_select';
		$strStyle = '<style>.group-result {padding-top: 5px !important; line-height: 20px !important;}';
		$count = 1;

		if ($this->multiple)
		{
			$this->strName .= '[]';
			$strClass = 'tl_mselect';
		}

		// Add an empty option (XHTML) if there are none
		if (empty($this->arrOptions))
		{
			$this->arrOptions = array(array('value'=>'', 'label'=>'-'));
		}
		
		foreach ($this->arrOptions as $strKey=>$arrOption)
		{
			if (isset($arrOption['value']))
			{
				$arrOptions[] = sprintf('<option value="%s"%s>%s</option>',
										 \StringUtil::specialchars($arrOption['value']),
										 $this->isSelected($arrOption),
										 $arrOption['label']);

				if (isset($GLOBALS['TL_CTB_IMG'][$arrOptgroup['value']]))
				{
					$objImage = \FilesModel::findByUuid($GLOBALS['TL_CTB_IMG'][$arrOptgroup['value']]);
				}
				
				if ($objImage === null)
				{
					$strStyle .= '#ctrl_type_chzn_o_'.$count.' {position: relative; padding-left: 90px; line-height: 41px;}#ctrl_type_chzn_o_'.$count++.'::before {content: ""; position: absolute; left: 20px; top:2px; width: 60px; height: 40px; border: 1px solid #ccc; background: #eee; background-size: 60px 40px;}';
				}
				else
				{
					$strStyle .= '#ctrl_type_chzn_o_'.$count.' {position: relative; padding-left: 90px; line-height: 41px;}#ctrl_type_chzn_o_'.$count++.'::before {content: ""; position: absolute; left: 20px; top:2px; width: 60px; height: 40px; border: 1px solid #ccc; background: #eee url('.$objImage->path.'); background-size: 60px 40px;}';
				}
			}
			else
			{
				$arrOptgroups = array();

				foreach ($arrOption as $arrOptgroup)
				{
					$arrOptgroups[] = sprintf('<option value="%s"%s>%s</option>',
											   \StringUtil::specialchars($arrOptgroup['value']),
											   $this->isSelected($arrOptgroup),
											   $arrOptgroup['label']);

					if (isset($GLOBALS['TL_CTB_IMG'][$arrOptgroup['value']]))
					{
						$objImage = \FilesModel::findByUuid($GLOBALS['TL_CTB_IMG'][$arrOptgroup['value']]);
					}

					if ($objImage === null)
					{
						$strStyle .= '#ctrl_type_chzn_o_'.$count.' {position: relative; padding-left: 90px; line-height: 41px;}#ctrl_type_chzn_o_'.$count++.'::before {content: ""; position: absolute; left: 20px; top:2px; width: 60px; height: 40px; border: 1px solid #ccc; background: #eee; background-size: 60px 40px;}';
					}
					else
					{
						$strStyle .= '#ctrl_type_chzn_o_'.$count.' {position: relative; padding-left: 90px; line-height: 41px;}#ctrl_type_chzn_o_'.$count++.'::before {content: ""; position: absolute; left: 20px; top:2px; width: 60px; height: 40px; border: 1px solid #ccc; background: #eee url('.$objImage->path.'); background-size: 60px 40px;}';
					}

				}

				$arrOptions[] = sprintf('<optgroup label="&nbsp;%s">%s</optgroup>', \StringUtil::specialchars($strKey), implode('', $arrOptgroups));
				$count++;
			}
		}

		// Chosen
		if ($this->chosen)
		{
			$strClass .= ' tl_chosen';
		}


		$strStyle .= '</style>';
	
		return sprintf('%s<select name="%s" id="ctrl_%s" class="%s%s"%s onfocus="Backend.getScrollOffset()">%s</select>%s',
						($this->multiple ? '<input type="hidden" name="'. rtrim($this->strName, '[]') .'" value="">' : ''),
						$this->strName,
						$this->strId,
						$strClass,
						(($this->strClass != '') ? ' ' . $this->strClass : ''),
						$this->getAttributes(),
						implode('', $arrOptions),
						$strStyle);
	}
342777
public function output()
    {
        $defaults = [
            'fontCache' => TMP,
            'tempDir' => TMP,
        ];
        $options = (array)$this->getConfig('options') + $defaults;

        $DomPDF = $this->_createInstance($options);
        $DomPDF->setPaper($this->_Pdf->pageSize(), $this->_Pdf->orientation());
        $DomPDF = $this->_render($this->_Pdf, $DomPDF);

        return $this->_output($DomPDF);
    }
663844
private function makeTpl() {
		$this->localTpl = rtrim($this->localTpl, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
		$this->wipe[] = $output = self::path(sys_get_temp_dir()) . 'twigjs' . time() . DIRECTORY_SEPARATOR;
		self::readyDir($output);
		
		$data = array();
		
		foreach (self::rglob($this->localTpl . '*.twig') as $file) {
			$id = substr($file, strlen($this->localTpl));
			$data[ $id ] = file_get_contents($file);
		}
		
		file_put_contents($output . 'tpl.js', 'var templates = '. json_encode($data) .';');

		$this->addLocalStatic('js', $output);
		//$this->addCopy($this->localTpl);
		
		return $this;
	}
473500
protected function renderMainContent()
    {
        $items = [];
        foreach ($this->getClients() as $externalService) {
            $items[] = Html::tag('li', $this->clientLink($externalService));
        }
        return Html::tag('ul', implode('', $items), ['class' => 'auth-clients']);
    }
134130
protected function output()
    {
        // first get content to local var
        $content = $this->getContentRaw();

        // iterate log content
        foreach ($content as $logEntry) {

            // build the log-line
            $content = $logEntry['time'].' '.
                '['.$logEntry['type'].'] '.
                $logEntry['fingerprint'].' '.
                $logEntry['message'].
                $this->lineBreak.$this->getLineSeparator().$this->lineBreak;

            // use persistent write to write content to file?
            if ($this->getPersistent() === true) {
                $this->getFilesystem()->pwrite($this->getLogfile(), $content, $this->getAppend());
            } else {
                $this->getFilesystem()->write($this->getLogfile(), $content, $this->getAppend());
            }
        }

        // so we can clear the existing log
        $this->clearContent();
    }