Outputs rendered page
@param null|array|string $templates
@param array $options
340865
final public function output($templates = null, array $options = array())
    {
        if (empty($templates)) {
            $templates = $this->templates;
        }

        $this->prepareDataOutput();
        $this->prepareOutput($templates, $options);
        $this->response->outputHtml($this->renderOutput($templates), $options);
    }
186264
public function renderViewPrint( $template, $models, $config = [] ) {

		return $this->renderViewGeneric( $template, $models, CoreGlobal::TPL_VIEW_PRINT, $config );
	}
78852
public function _renderPagination($options) {
		if ($this->Paginator->request->params['paging'][$this->Paginator->defaultModel()]['pageCount'] < 2) {
			return '';
		}

		if (CakePlugin::loaded('TwitterBootstrap')) {
		}

		$out = array();

		$paginate = $options['paginate'];
		$prev = $paginate['prev'];
		$next = $paginate['next'];

		$this->Paginator->options($paginate['attrs']);

		$after = false !== $paginate['divOptions'] ? "\n\t" : "\n\t\t\t";
		$glue = false !== $paginate['divOptions'] ? "\n\t" : "\n\t\t\t";
		$before = '';
		if (CakePlugin::loaded('TwitterBootstrap')) {
			$glue .= "\t";
			$before .= "\n";
			$paginate['numbers']['separator'] = $after . "\t";
			// Hack for the `BootstrapPaginatorHelper::prev()` and `BootstrapPaginatorHelper::next()` to apply the correct `class`.
			$prev['options']['disabled'] = $prev['disabledOptions']['class'];
			$next['options']['disabled'] = $next['disabledOptions']['class'];
		}

		$out[] = $this->Paginator->prev($prev['title'], $prev['options'], $prev['disabledTitle'], $prev['disabledOptions']);
		$out[] = $this->Paginator->numbers($paginate['numbers']);
		$out[] = $this->Paginator->next($next['title'], $next['options'], $next['disabledTitle'], $next['disabledOptions']);

		$out = $glue . implode($glue, $out);
		if (CakePlugin::loaded('TwitterBootstrap') || CakePlugin::loaded('BoostCake')) {
			if (!isset($paginate['ulOptions'])) {
				$paginate['ulOptions'] = array('class' => 'pagination');
			}
			$out = $this->Html->tag('ul', $out . $after, $paginate['ulOptions']);
		}

		if (false !== $paginate['divOptions']) {
			return $this->Html->useTag('block', $this->_parseAttributes($paginate['divOptions']), $before . "\t" . $out . "\n");
		}

		return "\t" . $this->Html->useTag(
			'tablerow',
			$this->_parseAttributes($paginate['trOptions']),
			"\n\t\t" . $this->Html->useTag(
				'tablecell',
				$this->_parseAttributes(array_merge($paginate['tdOptions'], array('colspan' => count($options['columns'])))),
				$before . "\t\t\t" . $out . "\n\t\t"
			) . "\n\t"
		);
	}
307590
protected function renderOutput(string $template, array $vars = [])
    {
        $vars = array_merge($vars, [
            'unpublished' => Article::select(['id', 'user_id', 'state'])
            ->when('owner' != user('role'), function ($query) {
                // Show unpublished articles only to current user.
                $query->where('user_id', user('id'));
            })
            ->where('state', '<>', 'published')
            ->get(),
        ]);

        return parent::renderOutput($template, $vars);
    }
724009
public function render(array $parameters = array())
	{
		if ($this->templateName === null) {
			throw new \RuntimeException('Template name was not specified, nothing to render.');
		}

		$this->output(
				$this->templating->render(
						$this->templateName,
						array_merge($this->parameters, $parameters)
				)
		);
	}
556654
public function twigRender ($template_file = null, $render = null, $template_dir_list = [], $options = []) {
		$this->renderSetting();
		$template = $this->twigLoadFileTemplate($template_file, $template_dir_list, $options);
		$render = $this->adjustRender($render);
		return $template->render($render);
	}
1181583
private function render(string $view, array $options = []): string
    {
        extract($options, EXTR_OVERWRITE);

        ob_start();
        require $this->getFilename($view);

        return ob_get_clean();
    }
469653
protected function _compileTemplates(array $templates = [])
    {
        if (empty($templates)) {
            $templates = array_keys($this->_config);
        }
        foreach ($templates as $name) {
            $template = $this->get($name);
            if ($template === null) {
                $this->_compiled[$name] = [null, null];
            }

            $template = str_replace('%', '%%', $template);
            preg_match_all('#\{\{([\w\._]+)\}\}#', $template, $matches);
            $this->_compiled[$name] = [
                str_replace($matches[0], '%s', $template),
                $matches[1]
            ];
        }
    }
1033950
protected function render(string $template, array $vars = [])
    {
        $vars['flash'] = $this->flash;
        $this->view->setVars($vars);

        $content = $this->view->render($template);
        $this->response->setContent($content);

        return $this->response;
    }
384239
function output($options = null) {
		//Helpers::dompdf_debug("trace", "($options[compress])");

		// Add page text
		$this->_add_page_text();
		$this->_add_internal_links();

		$this->_place_objects();

		if ( isset($options["compress"]) && $options["compress"] == 0 ) {
			$compress = false;
		}
		else {
			$compress = true;
		}

		$this->_pdf->SetCompression($compress);

		return $this->_pdf->Output('', 'S');
	}
700130
public function template($template, $data = array(), $options = '')
    {
        $this->template = array($template, $data, $options);
        $template = new Template(Base::getInstance());
        $this->loaderHooks($template,'pre_template',$class='',$method_name='',$data=array());
        return $template;
    }
861210
public function render($template, $parameters = [])
    {
        if (count($parameters) < 1) {
            $parameters = null;
        }
        echo $this->smarty->fetch($template, $parameters);
    }
966833
public function serialize(Template $template, array $options = [])
    {
        $serialized = [
            'id' => $template->getUuid(),
            'name' => $template->getName(),
            'type' => $this->serializer->serialize($template->getType()),
            'title' => $template->getTitle(),
            'content' => $template->getContent(),
            'lang' => $template->getLang(),
            'localized' => $this->serializeLocalized($template),
        ];

        return $serialized;
    }
464612
public function render(Request $request, array $options = array())
    {
        $provider = isset($options['provider']) ? $this->getProvider($options['provider']) : $this->getDefaultProvider();
        unset($options['provider']);

        return $provider->render($request, $options);
    }
825815
public function display($templates) {
        global $OUTPUT;
        if (empty($templates)) {
            echo $OUTPUT->box(get_string('no_templates_available_yet', 'feedback'),
                             'generalbox boxaligncenter');
            return;
        }

        $this->setup();
        $strdeletefeedback = get_string('delete_template', 'feedback');

        foreach ($templates as $template) {
            $data = array();
            $data[] = format_string($template->name);
            $url = new moodle_url($this->baseurl, array('deletetempl' => $template->id, 'sesskey' => sesskey()));

            $deleteaction = new confirm_action(get_string('confirmdeletetemplate', 'feedback'));
            $data[] = $OUTPUT->action_icon($url, new pix_icon('t/delete', $strdeletefeedback), $deleteaction);
            $this->add_data($data);
        }
        $this->finish_output();
    }
1043367
public function render(array $options, $name, $selected = array(), array $attrs = array(), $tpl = false)
    {
        if (is_array($selected)) {
            $last = Arr::last($selected);
            $selectedVal = Arr::in($last, $selected) ? $last : null;
            list($options, $selected) = $this->_checkSelected($options, $selectedVal);
        }

        if (is_string($selected)) {
            list($options, $selected) = $this->_checkSelected($options, $selected);
        }

        return parent::render($options, $name, $selected, $attrs, $tpl);
    }
817282
public function render($options = array())
    {
        $this->configure($options + $this->getDefaultConfiguration());

        $content = $this->parseCurrentContent();

        if ((bool)$this->getConfig('end')) {
            // Only play with headers when we know we will
            // kill the process.
            $this->applyHeaders();

            echo $content;
            Strata::router()->route->end();
            exit();
        }

        echo $content;
    }