Renders the site

@return void
492505
public function build()
    {
        $this->app->writeln("\n<comment>Adding root pages</comment>");
        $this->addPages('\\Skosh\\Content\\Page');

        $this->app->writeln("\n<comment>Adding posts</comment>");
        $this->addPages('\\Skosh\\Content\\Post', 'path', '_posts');

        $this->app->writeln("\n<comment>Adding docs</comment>");
        $this->addPages('\\Skosh\\Content\\Doc', 'path', '_doc');

        // Sort pages
        $this->sortPosts();

        // Fire event
        Event::fire('pages.sorted', [$this]);

        $this->app->writeln("\n<comment>Rendering content</comment>");

        foreach ($this->site->pages as $content) {
            $this->renderContent($content);
        }

        // Fire event
        Event::fire('pages.rendered', [$this]);
    }
772813
public function render () {
        $content = $this->renderToString();

        if ($this->redirect !== null) {
            header("Location: ".$this->redirect);
            session_write_close();
            exit();
            return;
        }

        // Headers are also calculated in render to string
        if($this->isJsonResponse()) {
            header("Content-type: application/json;");
        }


        echo $content;
        exit ();
    }
27772
public function load() {
		session_start();

		$this->loadSiteClass();
		$this->checkRedirect();
		$this->applyViewRenderer();

		$this->loadController();
		$this->render();

	}
1154495
public function render()
    {
        $renderer = $this->rendererRegistry->getRenderer($this->rendererName);
        foreach ($this->themes as $theme) {
            $renderer->setBlockTheme($theme[0], $theme[1]);
        }
        $renderer->setFormTheme($this->formThemes);

        return $renderer->renderBlock($this->view);
    }
717032
public function Render()
    {
        if (strlen($this->_ankor) > 0) {
            WebApplication::$app->getResponse()->addJavaScript("window.location='#" . $this->_ankor . "'", true);
            $this->_ankor = '';
        }
        $this->beforeRender();
        $this->RenderImpl();
        $this->afterRender();
    }
1059675
public function render()
    {
        if (empty($this->_rows) || empty($this->_columns)) {
            return;
        }

        foreach ($this->_rows as $row) {
            $this->renderRowCells($row);
        }
    }
406275
public function render()
    {
        $paginationData = $this->paginator->getPages($this->scrollingStyle);
        $unorderedList  = $this->getElement()->spawnChild('ul');
        $previous       = $unorderedList->spawnChild('li');
        $previousAnchor = $previous->spawnChild('a')->setContent('&laquo;');

        $unorderedList->setAttributes($this->getListAttributes());
        $previous->setAttributes($this->getListItemAttributes());
        $previous->addAttributes($this->getPreviousAttributes());
        $previousAnchor->setAttributes($this->getAnchorAttributes());

        if (empty($paginationData->previous)) {
            $previous->addClass('disabled');
        } else {
            $previousAnchor->addAttribute('href', $this->getUrl(
                $this->getRoute(),
                array_merge(
                    array('page' => $paginationData->previous),
                    $this->getRouteParams()
                )
            ));
        }

        foreach ($paginationData->pagesInRange as $page) {
            $pageNumberElement = $unorderedList->spawnChild('li');
            $pageHref          = $this->getUrl(
                $this->getRoute(),
                array_merge(
                    array('page' => $page),
                    $this->getRouteParams()
                )
            );

            $pageNumberElement->setAttributes($this->getListItemAttributes());

            if ($page === $paginationData->current) {
                $pageNumberElement->addClass('active');
            }

            $anchorElement = $pageNumberElement->spawnChild('a')->addAttribute('href', $pageHref)->setContent($page);

            $anchorElement->addAttribute('data-page', $page);
        }

        $next       = $unorderedList->spawnChild('li');
        $nextAnchor = $next->spawnChild('a')->setContent('&raquo;');

        $next->setAttributes($this->getNextAttributes());

        if (empty($paginationData->next)) {
            $next->addClass('disabled');
        } else {
            $nextAnchor->addAttribute('href', $this->getUrl(
                $this->getRoute(),
                array_merge(
                    array('page' => $paginationData->next),
                    $this->getRouteParams()
                )
            ));
        }

        return $this->getElement()->render();
    }
131479
public function renderAll()
    {
        if (!$this->_initialized) {
            $this->init();
        }

        if (!$this->_rendered) {
            $this->renderView();

            $this->recursiveRender();
            $this->_rendered = true;
        }
    }
636831
public function render()
    {
        $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();

        parent::render();

        $this->_aViewData["edit"] = $oArticle = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);

        $soxId = $this->getEditObjectId();
        if (isset($soxId) && $soxId != "-1") {
            // load object
            $oArticle->loadInLang($this->_iEditLang, $soxId);

            // load object in other languages
            $oOtherLang = $oArticle->getAvailableInLangs();
            if (!isset($oOtherLang[$this->_iEditLang])) {
                // echo "language entry doesn't exist! using: ".key($oOtherLang);
                $oArticle->loadInLang(key($oOtherLang), $soxId);
            }

            foreach ($oOtherLang as $id => $language) {
                $oLang = new stdClass();
                $oLang->sLangDesc = $language;
                $oLang->selected = ($id == $this->_iEditLang);
                $this->_aViewData["otherlang"][$id] = clone $oLang;
            }

            if ($oArticle->isDerived()) {
                $this->_aViewData['readonly'] = true;
            }

            // variant handling
            if ($oArticle->oxarticles__oxparentid->value) {
                $oParentArticle = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);
                $oParentArticle->load($oArticle->oxarticles__oxparentid->value);
                $this->_aViewData["parentarticle"] = $oParentArticle;
                $this->_aViewData["oxparentid"] = $oArticle->oxarticles__oxparentid->value;
            }

            if ($myConfig->getConfigParam('blMallInterchangeArticles')) {
                $sShopSelect = '1';
            } else {
                $sShopID = $myConfig->getShopID();
                $sShopSelect = " oxshopid =  '$sShopID' ";
            }

            $oPriceList = oxNew(\OxidEsales\Eshop\Core\Model\ListModel::class);
            $oPriceList->init('oxbase', "oxprice2article");
            $sQ = "select * from oxprice2article where oxartid = '{$soxId}' " .
                  "and {$sShopSelect} and (oxamount > 0 or oxamountto > 0) order by oxamount ";
            $oPriceList->selectstring($sQ);

            $this->_aViewData["amountprices"] = $oPriceList;
        }

        return "article_stock.tpl";
    }
1249762
public function render()
    {
        $content = $this->renderForm($this->renderSelect());

        $this->outputService->output($content);
    }
230436
protected function render()
	{
		if (empty($this->getContent())) {
			$parsed = parse_ini_string($this->file->getContent(), true);
			$this->setContent(is_array($parsed) ? $parsed : []);
		}
	}
143360
public function render()
	{
		extract($this->_vars);

		$path = APP_PATH
		        . Agl::APP_TEMPLATE_DIR
		        . static::APP_HTTP_DIR
		        . DS
		        . $this->_file;

		require($path);
	}
181703
public function render() {

		$this->set_footers();

		add_action( 'admin_footer', array( $this, 'output_templates' ) );
		add_action( 'wp_footer', array( $this, 'output_templates' ) );

		$output = '<button ' . $this->build_attributes() . '>' . $this->struct['label'] . '</button>';

		$this->templates .= $this->render_modal_template();

		return $output;
	}
562516
public function render()
    {
        $config = \OxidEsales\Eshop\Core\Registry::getConfig();

        parent::render();

        $article = oxNew(\OxidEsales\Eshop\Application\Model\Article::class);
        $this->_aViewData["edit"] = $article;

        $articleId = $this->getEditObjectId();
        $reviewId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('rev_oxid');
        if (isset($articleId) && $articleId != "-1") {
            // load object
            $article->load($articleId);

            if ($article->isDerived()) {
                $this->_aViewData['readonly'] = true;
            }

            $reviewList = $this->_getReviewList($article);

            foreach ($reviewList as $review) {
                if ($review->oxreviews__oxid->value == $reviewId) {
                    $review->selected = 1;
                    break;
                }
            }
            $this->_aViewData["allreviews"] = $reviewList;
            $this->_aViewData["editlanguage"] = $this->_iEditLang;

            if (isset($reviewId)) {
                $reviewForEditing = oxNew(\OxidEsales\Eshop\Application\Model\Review::class);
                $reviewForEditing->load($reviewId);
                $this->_aViewData["editreview"] = $reviewForEditing;

                $user = oxNew(\OxidEsales\Eshop\Application\Model\User::class);
                $user->load($reviewForEditing->oxreviews__oxuserid->value);
                $this->_aViewData["user"] = $user;
            }
            //show "active" checkbox if moderating is active
            $this->_aViewData["blShowActBox"] = $config->getConfigParam('blGBModerate');
        }

        return "article_review.tpl";
    }
697558
public function compilePages()
	{		
		foreach ($this->site->getPages() as $page)
		{			
			$template = $this->twig->loadTemplate( $page->getLayout() . '.html.tpl');
			$content = $template->render(array('site' => $this->site, 'page' => $page));
			$this->createFile($content, $page);
		}
	}
1136273
public function render()
    {
        if ($this->config[ 'ordering' ]) {
            $this->attributes->addAttributeClass('table-ordering');
        }

        // Render header
        $tr = $this->header->createRow();

        foreach ($this->columns as $key => $column) {

            $th = $tr->createColumn('th');

            $column[ 'attr' ][ 'data-column' ] = $key;

            foreach ($column[ 'attr' ] as $name => $value) {
                if ( ! empty($value)) {
                    $th->attributes->addAttribute($name, $value);
                }
            }

            if ($column[ 'sorting' ] === true) {
                $icon = new Ui\Contents\Icon('fa fa-sort');
                $icon->attributes->addAttributeClass(['text-muted', 'float-right', 'mt-1']);

                $th->attributes->addAttributeClass('col-sortable');
                $th->attributes->addAttribute('data-toggle', 'sort');
                $th->childNodes->push($icon);
            }

            if ($column[ 'show' ] === false) {
                $th->attributes->addAttributeClass('hidden');
            }

            $th->textContent->push(language()->getLine($column[ 'label' ]));
        }

        // Render tbody
        if ($this->rows->count() > 0) {
            $totalEntries = $this->rows->count();
            $totalRows = $this->rows->countAll();
            $currentPage = input()->get('page') ? input()->get('page') : 1;
            $startNumber = $currentPage == 1 ? 1 : $currentPage * $this->config[ 'entries' ][ 'minimum' ];
            $totalPages = round($totalRows / $this->config[ 'entries' ][ 'minimum' ]);
            $totalPages = $totalPages == 0 && $totalRows > 0 ? 1 : $totalPages;

            $i = $startNumber;
            foreach ($this->rows as $row) {
                $row->numbering = $i;
                $tr = $this->body->createRow();
                $tr->attributes->addAttribute('data-id', $row->id);

                foreach ($this->columns as $key => $column) {

                    $column[ 'key' ] = $key;
                    $td = $tr->createColumn();

                    $column[ 'attr' ][ 'data-column' ] = $key;

                    foreach ($column[ 'attr' ] as $name => $value) {
                        if ( ! empty($value)) {
                            $td->attributes->addAttribute($name, $value);
                        }
                    }

                    if ($column[ 'show' ] === false) {
                        $td->attributes->addAttributeClass('hidden');
                    }

                    $td->attributes->addAttributeClass('col-body-' . $key);

                    $this->renderBodyColumn($td, $column, $row);
                }

                $i++;
            }
        } else {
            $totalEntries = 0;
            $totalRows = 0;
            $currentPage = 1;
            $startNumber = 0;
            $totalPages = 0;
        }

        $showEntries = input()->get('entries') ? input()->get('entries') : $this->config[ 'entries' ][ 'minimum' ];

        // Build table card
        $card = new Ui\Components\Card();
        $card->attributes->addAttribute('data-role', 'table-crud');
        $card->attributes->addAttributeClass('card-table');

        // Build table header tools
        $tools = new Element('div', 'cardHeaderTools');
        $tools->attributes->addAttributeClass(['card-tools', 'float-left']);

        $buttons = new Ui\Components\Buttons\Group();
        foreach ($this->tools as $key => $tool) {
            if ($tool[ 'show' ] === false) {
                continue;
            }

            if ($tool[ 'label' ] === true) {
                $button = $buttons->createButton(language()->getLine('TABLE_BUTTON_' . strtoupper($key)));
                if ( ! empty($tool[ 'icon' ])) {
                    $button->setIcon($tool[ 'icon' ]);
                }
            } else {
                $button = $buttons->createButton(new Ui\Contents\Icon($tool[ 'icon' ]));
                $button->attributes->addAttribute('data-toggle', 'tooltip');
                $button->attributes->addAttribute('title',
                    language()->getLine('TABLE_BUTTON_' . strtoupper($key)));
            }

            if ( ! empty($tool[ 'href' ])) {
                $tool[ 'data-url' ] = $tool[ 'href' ];
            }

            if (isset($tool[ 'attr' ])) {
                foreach ($tool[ 'attr' ] as $name => $value) {
                    $button->attributes->addAttribute($name, $value);
                }
            }

            $button->setContextualClass($tool[ 'contextual' ]);
            $button->smallSize();
            $button->attributes->addAttribute('data-action', $key);
        }

        $tools->childNodes->push($buttons);

        $card->header->childNodes->push($tools);

        // Build table header options
        $options = new Element('div', 'cardHeaderOptions');
        $options->attributes->addAttributeClass(['card-options', 'float-right']);

        $buttons = new Ui\Components\Buttons\Group();
        foreach ($this->options as $key => $option) {
            if ($option[ 'show' ] === false) {
                continue;
            }

            if ($option[ 'label' ] === true) {
                $button = $buttons->createButton(language()->getLine('TABLE_BUTTON_' . strtoupper($key)));
                if ( ! empty($option[ 'icon' ])) {
                    $button->setIcon($option[ 'icon' ]);
                }
            } else {
                $button = $buttons->createButton(new Ui\Contents\Icon($option[ 'icon' ]));
                $button->attributes->addAttribute('data-toggle', 'tooltip');
                $button->attributes->addAttribute('title',
                    language()->getLine('TABLE_BUTTON_' . strtoupper($key)));
            }

            if ( ! empty($option[ 'href' ])) {
                $option[ 'data-url' ] = $option[ 'href' ];
            }

            if (isset($option[ 'attr' ])) {
                foreach ($option[ 'attr' ] as $name => $value) {
                    $button->attributes->addAttribute($name, $value);
                }
            }

            $button->setContextualClass($option[ 'contextual' ]);
            $button->smallSize();
            $button->attributes->addAttribute('data-action', $key);
        }

        $options->childNodes->push($buttons);

        $card->header->childNodes->push($options);

        // Build table body
        $cardBody = $card->createBody();
        $cardBodyRow = $cardBody->createRow();

        $columnSearch = $cardBodyRow->createColumn(['class' => 'col-md-4']);
        $columnShow = $cardBodyRow->createColumn(['class' => 'col-md-8']);

        // Search
        $search = new Ui\Components\Form\Elements\Input([
            'name'        => 'query',
            'data-role'   => 'table-crud-search',
            'placeholder' => language()->getLine('TABLE_LABEL_SEARCH'),
            'value'       => input()->get('query'),
        ]);

        $columnSearch->childNodes->push($search);

        // Show
        $inputGroup = new Ui\Components\Form\Input\Group();

        $addOn = new Ui\Components\Form\Input\Group\AddOn();
        $addOn->textContent->push(language()->getLine('TABLE_LABEL_SHOW'));

        $inputGroup->childNodes->push($addOn);

        $options = [];
        foreach (range((int)$this->config[ 'entries' ][ 'minimum' ], (int)$this->config[ 'entries' ][ 'maximum' ],
            (int)$this->config[ 'entries' ][ 'step' ]) as $entries
        ) {
            $options[ $entries ] = $entries;
        }

        $columnsDropdown = new Ui\Components\Dropdown(language()->getLine('TABLE_LABEL_COLUMNS'));
        $columnsDropdown->attributes->addAttribute('data-role', 'table-crud-columns');

        foreach ($this->columns as $key => $column) {

            if ($column[ 'hiding' ] === false) {
                continue;
            }

            $label = new Ui\Components\Form\Elements\Label();
            $label->attributes->addAttributeClass('form-check-label');
            $label->textContent->push(language()->getLine($column[ 'label' ]));

            $checkbox = new Ui\Components\Form\Elements\Input([
                'type'        => 'checkbox',
                'class'       => 'form-check-input',
                'data-toggle' => 'table-crud-columns',
                'data-column' => $key,
            ]);

            $checkbox->attributes->removeAttributeClass('form-control');

            if ($column[ 'show' ] === true) {
                $checkbox->attributes->addAttribute('checked', 'checked');
            }

            $label->childNodes->push($checkbox);

            $columnsDropdown->menu->createItem($label);
        }

        $inputGroup->childNodes->push($columnsDropdown);

        $select = new Ui\Components\Form\Elements\Select();
        $select->attributes->addAttribute('name', 'entries');
        $select->createOptions($options, $showEntries);
        $inputGroup->childNodes->push($select);

        $addOn = new Ui\Components\Form\Input\Group\AddOn();
        $addOn->textContent->push(language()->getLine('TABLE_LABEL_PAGE', [
            $startNumber,
            $totalEntries,
            $totalRows,
            $currentPage,
            $totalPages,
        ]));

        $inputGroup->childNodes->push($addOn);

        $input = new Ui\Components\Form\Elements\Input([
            'name'        => 'page',
            'placeholder' => language()->getLine('TABLE_LABEL_GOTO'),
        ]);

        $inputGroup->childNodes->push($input);

        $pagination = new Ui\Components\Pagination($totalRows, $showEntries);
        $inputGroup->childNodes->push($pagination);

        $columnShow->childNodes->push($inputGroup);

        $card->textContent->push(parent::render());

        return $card->render();
    }
290797
public function run()
    {
        echo Html::beginTag('div', $this->options) . "\n";
        echo $this->renderContainer ? Html::beginTag('div', $this->containerOptions) . "\n" : '';
        foreach ($this->templates as $template => $options) {
            if (!is_array($options)) {
                echo $this->renderElements($options);
            } else {
                echo Html::beginTag('div', $options);
                echo $this->renderElements($template, $options);
                echo Html::endTag('div');
            }
        }
        echo $this->renderContainer ? Html::endTag('div') . "\n" : '';
        echo Html::endTag('div') . "\n";

        if ($this->registerCss) {
            ActionBarAsset::register($this->view);
        }
    }