Render Styleguide.

@return \yii\web\Response|string
325308
public function actionIndex()
    {
        if (!$this->hasAccess()) {
            return $this->redirect(['login']);
        }
        
        foreach ($this->module->assetFiles as $class) {
            $this->registerAsset($class);
        }

        return $this->render('index', [
            'title' => 'Styleguide',
            'showDomain' => true,
            'styleguide' => $this->extractElementsFromComponent()
        ]);
    }
603723
public function render()
    {
        $htmlContent = '';
        foreach (self::$cssList->toArray() as $css) {
            if ($css[0] == 'css') {
                $htmlContent .= '<style type="text/css">' . $css[1] . '</script>' . PHP_EOL;
            } else {
                if (Configuration::read('html.css.test_file_existance') === true) {
                    $cssPath = APP_ROOT . '/public' . $css[1];
                    if (!file_exists($cssPath)) {
                        trigger_error('Css file "' . $cssPath . '" doesn\'t exist.', E_USER_WARNING);
                    }
                }
                $htmlContent .= '<link href="' . $css[1] . '" rel="stylesheet" type="text/css">' . PHP_EOL;
            }
        }
        return $htmlContent;
    }
1162830
public function render()
	{
		$html = array();

		// Start toolbar div.
		$html[] = '<div class="toolbar-list" id="' . $this->_name . '">';
		$html[] = '<ul>';

		foreach ($this->_bar as $key => $button)
		{
			$this->_bar[$key][9] = array();
			if ($button[0] == 'Separator')
			{
				continue;
			}
			if (!isset($this->_bar[$key - 1]) || $this->_bar[$key - 1][0] == 'Separator')
			{
				$this->_bar[$key][9][] = 'first';
			}
			if (!isset($this->_bar[$key + 1]) || $this->_bar[$key + 1][0] == 'Separator')
			{
				$this->_bar[$key][9][] = 'last';
			}
		}

		// Render each button in the toolbar.
		foreach ($this->_bar as $button)
		{
			$html[] = $this->renderButton($button);
		}

		// End toolbar div.
		$html[] = '</ul>';
		$html[] = '</div>';

		return implode("\n", $html);
	}
858284
public function render()
    {
        $variables = [
            'items' => $this->items,
            'title' => $this->title,
            'attributes' => $this->formatAttributes(),
        ];

        return view($this->view, $variables)->render();
    }
1257759
public function render()
    {
        $field = $this->getParameter('field');

        $mode = $this->getParameter('mode');
        $mode = $mode == null ? 'list' : $mode;

        $css = $this->getParameter('css');

        $prefix = $this->getParameter('prefix');
        $prefix = $prefix == null ? '' : $prefix;

        $postfix = $this->getParameter('postfix');
        $postfix = $postfix == null ? '' : $postfix;

        $errors = $this->getGlobal('Errors'); //array of FieldValidationError or ValidationError


        if(empty($errors)) return '';


        if(empty($field)) {

            $s = '';

            if($mode == 'list') {
                $s = "<ul";
                if(!empty($css))
                    $s .= " class=\"{$css}\"";
                $s .= ">\n";
            }

            $cnt = 0;
            foreach($errors as $error) {
                if(!($error instanceof ValidationError)) continue;

                $msg = $this->errorCodeResolver->resolveMessageCode(
                    $error->getErrorCode(),
                    null,
                    null,
                    null,
                    $error->getDefaultErrorMessage());

                if($mode == 'br')
                    $s .= "{$prefix}{$msg}{$postfix}<br/>\n";
                else if($mode == 'list')
                    $s .= "<li>{$prefix}{$msg}{$postfix}</li>\n";
                $cnt++;
            }

            //none of the errors were global errors, try specifying the 'field' parameter
            if($cnt == 0)
                return '';

            if($mode == 'list')
                $s .= "</ul>\n";

            return $s;

        } else {

            foreach($errors as $error) {
                if(!($error instanceof FieldValidationError)) continue;

                if($field == $error->getFailureCode()) {

                    $msg = $this->errorCodeResolver->resolveMessageCode(
                        $error->getFailureCode(),
                        $error->getFieldResolved(),
                        $error->getFieldType(),
                        array(
                            $error->getFieldTitle(),
                            $error->getValue(),
                            $error->getFieldType()
                        ),
                        $error->getDefaultErrorMessage());

                    if(!empty($css))
                        return "<span class=\"{$css}\">{$msg}</span>";

                    return $msg;
                }
            }

        }

        return '';
    }
1346565
public function render()
    {
        $sReturn = parent::render();

        // generate help link
        $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
        $sDir = $myConfig->getConfigParam('sShopDir') . '/documentation/admin';
        if (is_dir($sDir)) {
            $sDir = $myConfig->getConfigParam('sShopURL') . 'documentation/admin';
        } else {
            $languageId = $this->getDocumentationLanguageId();
            $shopVersion = oxNew(ShopVersion::class)->getVersion();
            $sDir = "http://docu.oxid-esales.com/PE/{$shopVersion}/" . $languageId . '/admin';
        }

        $this->_aViewData['sHelpURL'] = $sDir;

        return $sReturn;
    }
879680
public function styles()
    {
        // Obtain Arguments:
        
        $args = func_get_args();
        
        // Array Argument Passed?
        
        if (is_array($args[0])) {
            
            // Obtain Styles:
            
            $styles = $this->grid()->getStyles($args[0]);
            
            // Answer as Array or String? (2nd param is true)
            
            return (isset($args[1]) && $args[1]) ? ViewTools::singleton()->array2att($styles) : $styles;
            
        }
        
        // Answer Styles Array:
        
        return $this->grid()->getStyles($args);
    }
1080689
public function _render()
    {
        $ret = $this->prepend;
        if ($this->library) {
            $ret .= $this->library;
        } else {
            if ($this->str) {
                $ret .= "$('#".$this->owner->getJSID()."')";
            }
        }
        $ret .= $this->str;

        if ($this->enclose === true) {
            if ($this->preventDefault) {
                $ret = 'function(ev,ui){ev.preventDefault();ev.stopPropagation(); '.$ret.'}';
            } else {
                $ret = 'function(ev,ui){'.$ret.'}';
            }
        } elseif ($this->enclose) {
            $ret = ($this->library ?: "$('#".$this->owner->getJSID()."')").
                    ".bind('".$this->enclose."',function(ev,ui){ev.preventDefault();ev.stopPropagation(); ".$ret.'})';
        }

        if (@$this->debug) {
            echo "<font color='blue'>".htmlspecialchars($ret).';</font><br/>';
            $this->debug = false;
        }

        return $ret;
    }
894350
public function render()
    {
        if (! $this->display) {
            return;
        }

        $this->runBeforeRender();
        $this->checkRequired();
        $this->translate();

        $attributes = $this->getModifyAttributes();
        $this->attributes['id'] = $this->getId();

        if ($this->hasError()) {
            if (! isset($attributes['class']) || is_null($attributes['class'])) {
                $attributes['class'] = ' is-invalid';
            } else {
                $attributes['class'] .= ' is-invalid';
            }
        }

        return view($this->view, array_merge($this->getAttributes(), [
            'attributes' => $attributes,
            'id'         => $this->getId(),
            'old'        => $this->getOldValue(),
            'slug'       => $this->getSlug(),
            'oldName'    => $this->getOldName(),
            'typeForm'   => $this->typeForm ?? $this->vertical()->typeForm,
        ]))
            ->withErrors(session()->get('errors', app(ViewErrorBag::class)));
    }
408621
public function render()
    {
        $output = '';

        foreach ($this->items as $message) {
            $output .= $message->render();
        }

        return $output;
    }
779326
public function renderToolStyleModalFormHandlerAction()
    {
        $data = array();

        $styleId = (int) $this->params()->fromQuery('styleId', '');

        $melisKey = $this->params()->fromRoute('melisKey', '');
        // declare the Tool service that we will be using to completely create our tool.
        $melisTool = $this->getServiceLocator()->get('MelisCoreTool');
        $melisCoreConfig = $this->serviceLocator->get('MelisCoreConfig');
        $appConfigForm = $melisCoreConfig->getFormMergedAndOrdered('meliscms/tools/meliscms_tool_styles/forms/meliscms_tool_styles_form','meliscms_tool_styles_form');
        $factory = new \Zend\Form\Factory();
        $formElements = $this->serviceLocator->get('FormElementManager');
        $factory->setFormElementManager($formElements);
        $form = $factory->createForm($appConfigForm);

        // set title
        $title    = $melisTool->getTranslation('tr_meliscore_tool_styles_new');

        if(!empty($styleId)){

            $tableStyle = $this->getServiceLocator()->get('MelisEngineTableStyle');
            $details = $tableStyle->getEntryById($styleId)->current();

            $data = (array)$details;
            $title = $melisTool->getTranslation('tr_meliscore_tool_styles_edit');

        }else{
            $form->get('style_id')->setAttribute('class', 'hidden');
            $form->get('style_id')->setOptions(array('label_attributes' => array('class'  => 'hidden')));
        }

        $form->setData($data);

        $view = new ViewModel();
        $view->melisKey = $melisKey;
        $view->form = $form;
        $view->title = $title;
        $view->styleId = $styleId;
        return $view;
    }
757390
public function render() {
		
		$buffer = ''; 
		
		if ( !empty( $this->header ) ) {
			
			$buffer .= '<tr'.HTML::attr( $this->header[1] ).'>';
			foreach( $this->header[0] as $head ) {
				$head->name = 'th';
				$buffer .= $head->render();
			}
			$buffer .= '</tr>';
			foreach( $this->data as $row ) {
				$buffer .= '<tr'.HTML::attr( $row[1] ).'>';
				foreach( $this->header[0] as $key => $value ) {
					$buffer .= HTML::tag( 'td', $row[0][$key]->value, $row[0][$key]->attr );
				}
				$buffer .= '</tr>';
			}
		}
		else {
			foreach( $this->data as $row ) {
				$buffer .= '<tr'.HTML::attr( $row[1] ).'>';
				foreach( $row[0] as $value ) {
					$buffer .= $value->render();
				}
				$buffer .= '</tr>';
			}
		}
		
		$this->element->value = $buffer;
		
		return $this->element->render();
	}
284321
public function renderStyles()
    {
        $this->loadPackageCss();

        if (empty($this->styles)) {
            return PHP_EOL;
        }

        $assets = [];

        foreach ($this->sort($this->styles) as $handle => $data) {
            $assets[] = $this->getCss($handle);
        }

        return implode(PHP_EOL, $assets);
    }
625151
public function render()
    {
        $stream = $this->_rtf->getWriter();

        $typeSetting = $this->_typeSettingType != self::TYPE_NORMAL
            ? '\\' . $this->_typeSettingType
            : '';

        $stream->write(
            '{' . $typeSetting . '\chftn}'
            . '{' . $this->getTypeAsRtfCode()
            . '\pard\plain\lin283\fi-283 '
        );

        if ($this->_parFormat) {
            $stream->write($this->_parFormat->getContent());
        }
        if ($this->_font) {
            $stream->write($this->_font->getContent());
        }
        $charset = $this->_rtf->getCharset();
        $textEncoded = PHPRtfLite::quoteRtfCode($this->_text);
        $stream->write(
            '{\up6\chftn}' . "\r\n"
            . PHPRtfLite_Utf8::getUnicodeEntities($textEncoded, $charset)
            . '} '
        );
    }
525105
public function renderToolStyleContentAction()
    {

        $melisKey = $this->params()->fromRoute('melisKey', '');

        $translator = $this->getServiceLocator()->get('translator');


        // declare the Tool service that we will be using to completely create our tool.
        $melisTool = $this->getServiceLocator()->get('MelisCoreTool');

        // tell the Tool what configuration in the app.tool.php that will be used.
        $melisTool->setMelisToolKey('meliscms', 'meliscms_tool_styles');

        $view = new ViewModel();

        // get the columns that has been set in the configuration (app.tools.php)
        $columns = $melisTool->getColumns();

        // add an extra column which is Action
        $columns['actions'] = array('text' => $translator->translate('tr_meliscms_action'), 'css' => 'width:10%');

        // get the column texts set, this will be used in the thead table
        $view->tableColumns = $columns;

        $view->melisKey = $melisKey;

        $view->getToolDataTableConfig = $melisTool->getDataTableConfiguration();

        return $view;
    }
711612
function Render()
    {
        if (!self::Guard()->Allow(Action::Read(), $this->content))
        {
            return '';
        }
        ContentTranslator::Singleton()->SetContent($this->content);
        $module = ClassFinder::CreateFrontendModule($this->content->GetType());
        $module->SetTreeItem($this->tree, $this->item);
        return $module->Render();
    }
680216
public function actionIndex()
    {
        /**
         * @var Generator $generator
         */
        $generator = $this->module->generator;
        $response = Yii::$app->response;
        $response->format = yii\web\Response::FORMAT_RAW;
        $response->headers->set('Content-Type', 'text/plain');

        return $generator->render();
    }