Renders the pattern

@param  boolean $showChrome Whether or not the item should render descriptive chrome
@return String              HTML text
761133
public function render($showChrome = true)
    {
        $html = $this->template->render($this->data);

        // Tidy the HTML
        $parser = new Parser();
        $html = $parser->indent($html);

        if ($showChrome) {
            return View::render('pattern', [
                'title' => $this->title,
                'id' => $this->id,
                'html' => $html,
                'template' => $this->templateRaw,
                'copy' => $this->copy,
                'data' => json_encode($this->data, JSON_PRETTY_PRINT),
            ]);
        } else {
            return $html;
        }
    }
613972
public static function highlight_code($str, $show = false)
    {
        if (file_exists($str)) {
            $str = file_get_contents($str);
        }

        $str = stripslashes(trim($str));

        $str = str_replace(array('&lt;', '&gt;'), array('<', '>'), $str);
        $str = str_replace(array('&lt;?php', '?&gt;', '\\'), array('phptagopen', 'phptagclose', 'backslashtmp'), $str);

        $str = '<?php //tempstart' . "\n" . $str . '//tempend ?>'; // <?

        // All the magic happens here, baby!
        $str = highlight_string($str, true);

        if (abs(phpversion()) < 5) {
            $str = str_replace(array('<font ', '</font>'), array('<span ', '</span>'), $str);
            $str = preg_replace('#color="(.*?)"#', 'style="color: \\1"', $str);
        }

        // Remove our artificially added PHP
        $str = preg_replace("#\<code\>.+?//tempstart\<br />\</span\>#is", "<code>\n", $str);
        $str = preg_replace("#\<code\>.+?//tempstart\<br />#is", "<code>\n", $str);
        $str = preg_replace("#//tempend.+#is", "</span>\n</code>", $str);

        // Replace our markers back to PHP tags.
        $str    = str_replace(array('phptagopen', 'phptagclose', 'backslashtmp'), array('&lt;?php', '?&gt;', '\\'), $str); //<?
        $line   = explode("<br />", rtrim(ltrim($str, '<code>'), '</code>'));
        $result = '<div class="code"><ol>';
        foreach ($line as $key => $val) {
            $result .= '<li>' . $val . '</li>';
        }

        $result .= '</ol></div>';
        $result = str_replace("\n", "", $result);

        if ($show !== false) {
            echo $result;
        } else {
            return $result;
        }
    }
40983
public function render() : string
    {
        $html = '<div id="app">';
        $html .= '
            <transition name="fade" mode="out-in">
                <router-view></router-view>
            </transition>';
        $html .= '</div>';
        $title = env('APP_NAME');
        $html .= '<script src="/assets/application.js"></script>';
        $html .= $this->scripts();
        return '<body>' . $html . '</body>';
    }
1187906
public function render(): string
    {
        $this->tags();

        if ($this->isLink === true) {
            $this->html .= "<a href=\"{$this->link}\">";
        }

        $element_attributes = '';
        foreach ($this->element_attributes as $attribute => $value) {
            if ($attribute == "color") {
                $element_attributes .= "style=\"{$attribute}: $value\"";
            } else {
                $element_attributes .= "{$attribute}=\"{$value}\" ";
            }
        }

        foreach ($this->tags as $i => $tag) {
            if ($i === 0 && strlen($element_attributes) > 0) {
                $this->html .= "<{$tag} " . rtrim($element_attributes) . '>';
            } else {
                $this->html .= "<{$tag}>";
            }
        }

        $this->html .= $this->escape($this->insert);

        foreach (array_reverse($this->tags) as $tag) {
            $this->html .= "</{$tag}>";
        }

        if ($this->isLink === true) {
            $this->html .= '</a>';
        }

        return $this->html;
    }
757021
public function render()
	{
		// make sure the template to be rendered is defined
		if (empty($this->template))
		{
			throw new \ThemeException('No valid template could be found. Use set_template() to define a page template.');
		}

		// storage for rendered results
		$rendered = array();

		// pre-process all defined partials
		foreach ($this->partials as $key => $partials)
		{
			$output = '';
			foreach ($partials as $index => $partial)
			{
				// render the partial
				$output .= $partial->render();
			}

			// store the rendered output
			if ( ! empty($output) and array_key_exists($key, $this->chrome))
			{
				// encapsulate the partial in the chrome template
				$rendered[$key] = $this->chrome[$key]['view']->set($this->chrome[$key]['var'], $output, false);
			}
			else
			{
				// store the partial output
				$rendered[$key] = $output;
			}
		}

		// assign the partials to the template
		$this->template->set('partials', $rendered, false);

		// return the template
		return $this->template;
	}
168538
public function render( Carbon_Breadcrumb_Trail $trail, $return = false ) {
		// If the items are less than the minimum, nothing should be rendered.
		if ( $trail->get_total_items() < $this->get_min_items() ) {
			return;
		}

		// Prepare the trail & renderer for rendering.
		$this->prepare_for_rendering( $trail );

		// Render the items.
		$items_output = $this->render_items( $trail );

		// Implode the breadcrumb items and wrap them with the configured wrappers.
		$output  = $this->get_wrapper_before();
		$output .= implode( $this->get_glue(), $items_output );
		$output .= $this->get_wrapper_after();

		if ( $return ) {
			return $output;
		}

		echo wp_kses( $output, wp_kses_allowed_html( 'post' ) );
	}
1058641
public function render($echo = false)
    {
        $name = $this->field->getName();
        $display = $this->field->getDisplayName();
        $bean = $this->field->getBean();
        $value = $this->getValue();
        $disabled = $this->getDisabledString();
        $required = $this->getRequiredString();
        $readOnly = $this->getReadOnlyString(); // No used actually, because radio is not supported.



        $html = "<label>$display</label>";

        foreach ($this->options as $v =>$optionName) {

            if ($value == $v) {
                $selected  = "checked";
            } else {
                $selected = "";
            }


            $html  .= <<< EOF
                <div class="radio">
                <label><input type="radio" name="$name" value="$v" $disabled $required $selected /> $optionName</label>
                </div>
EOF;
        }

        if ($echo)
            echo $html;

        return $html;
    }
187423
public function render($render = true)
    {
        if ($render) {
            ob_clean();
            header('Content-Type: application/rss+xml; charset=utf-8');
            echo $this->createXmlDocument();
            flush();
            die();
        }

        return $this->createXmlDocument();
    }
1358
public function render()
    {
        $viewPath = $this->getDirectory() . '/'. $this->getName() . '.' . $this->getExtension();
        if (!file_exists($viewPath)) {
            trigger_error('View file "' . $viewPath . '" doesn\'t exist.', E_USER_ERROR);
            return false;
        }
        if (Configuration::read('mvc.autoload_shared_var') && !empty($this->variableList)) {
            foreach ($this->variableList as $varName => $varValue) {
                ${$varName} = $varValue;
            }
        }
        ob_start();
        require($viewPath);
        echo PHP_EOL;
        return ob_get_clean();
    }
829386
private function render() {
		$strings = implode($this->strings);
		
		// Render includes
		foreach ($this->incTemplates as $path => $include) {
			$incOutput = $include->render();
			$path = preg_replace("/\//", "\/", $path);
			$strings = preg_replace("/\{include\s$path\}/", $incOutput, $strings);
		}
		
		// Render if-statements
		foreach ($this->ifTemplates as $key => $sub) {
			foreach ($sub as $iKey => $instance) {
				$str = '';
				
				if ($this->expressions[$key]->evaluate($this->vars)) {
					$str = $instance->render();
				}
				
				$pregKey = preg_quote($key, '/');
				$strings = preg_replace("/\{if:$pregKey:$iKey\}/", $str, $strings);
			}
		}
		
		// Render foreach-loops
		foreach ($this->forTemplates as $key => $sub) {
			foreach ($sub as $iKey => $instance) {
				$tmplGen = '';
				
				if (isset($this->vars[$key]) && is_array($this->vars[$key])) {
					foreach ($this->vars[$key] as $assocArray) {
						foreach ($assocArray as $k => $v)
							$instance->set($k, $v);
						$tmplGen .= $instance->render();
					}
				}
				
				$pregKey = preg_quote($key, '/');
				$strings = preg_replace("/\{for:$pregKey:$iKey\}/", $tmplGen, $strings);
			}
		}
		
		// Render plain old variables
		foreach ($this->vars as $key => $val) {
			if (!is_array($val))
				$strings = preg_replace("/\{$key\}/", $val, $strings);
		}
		
		// Render expressions
		foreach ($this->expressions as $key => $expr) {
			$eval = $expr->evaluate($this->vars);

			// If we're an array, lets insert the number of items in the array.
			if ( is_array( $eval ) ) {
				$eval = count( $eval );
			}

			$pregKey = preg_quote($key, '/');
			
			$strings = preg_replace('/\{'.$pregKey.'\}/', $eval, $strings);
		}
		
		$strings = preg_replace("/\\\{/", '{', $strings);
		$strings = preg_replace("/\\\}/", '}', $strings);

		return $strings;
	}
1030971
protected function checkBrowserChrome() {
	    if( stripos($this->_agent,'Chrome') !== false ) {
		    $aresult = explode('/',stristr($this->_agent,'Chrome'));
		    $aversion = explode(' ',$aresult[1]);
		    $this->setVersion($aversion[0]);
		    $this->setBrowser(self::BROWSER_CHROME);
		    return true;
	    }
	    return false;
    }
47389
public function render_print_book_chapter_dialog_link() {
        $printtext = get_string('printchapter', 'booktool_print');
        $printicon = $this->output->pix_icon('chapter', $printtext, 'booktool_print',
                array('class' => 'icon'));
        $printlinkatt = array('onclick' => 'window.print();return false;', 'class' => 'hidden-print');
        return html_writer::link('#', $printicon . $printtext, $printlinkatt);
    }
263068
public function render( $echo = false )
    {
        $this->enqueue_scripts();
        
        ob_start();
        include dirname(__FILE__).'/AbstractComponent.phtml';
        $html = ob_get_clean();

        if( !$echo )
        {
            return $html;
        }
        echo $html;
    }
509995
protected function checkBrowserChrome()
    {
        if (stripos($this->_agent, 'Chrome') !== false) {
            if (preg_match('/chrome\/([\.0-9]+) (mobile)?/i', $this->_agent, $matches)) {
                $this->setVersion($matches[1]);
                $this->setBrowser(self::BROWSER_CHROME);
                if (isset($matches[2])) {
                    $this->setMobile(true);
                }

                return true;
            }
        }

        return false;
    }
213501
public function render() {

		$output = '<div id="' . esc_attr( $this->id() ) . '" data-color="' . esc_attr( $this->base_color() ) . '" data-for="' . esc_attr( $this->id() ) . '-control" class="uix-control uix-control-' . esc_attr( $this->type ) . ' ' . esc_attr( $this->id() ) . '"></div>';
		$output .= $this->label();
		$output .= $this->input();

		$output .= $this->component_templates();

		$output .= $this->modal_template();

		return $output;
	}
986361
public function RenderTemplate () {
		$formViewScript = $this->form->GetViewScript();
		return $this->Render(
			static::$formsDir,
			is_bool($formViewScript) ? $this->form->GetId() : $formViewScript
		);
	}
1223646
public function render(): string
	{
		$targetUrl = Escaper::htmlEntityEncode(self::buildUrl());

		if ($this->buttonStyle === null) {
			return "<a href=\"{$targetUrl}\">{$this->buttonText}</a>";
		}

		$gateUrl = $this->payment->getMerchantConfig()->gateUrl;

		$buttonStyle = rawurlencode($this->buttonStyle);
		$src = Escaper::htmlEntityEncode($gateUrl . 'buttons/' . $buttonStyle . '.png');
		$title = Escaper::htmlEntityEncode($this->buttonText);

		return "<a href=\"{$targetUrl}\"><img src=\"{$src}\" alt=\"{$title}\" title=\"{$title}\" /></a>";
	}