Frontend\Core\Engine\Page::processPage PHP Метод

processPage() защищенный Метод

Processes the page
protected processPage ( )
    protected function processPage()
    {
        // set pageTitle
        $this->header->setPageTitle($this->record['meta_title'], (bool) ($this->record['meta_title_overwrite'] == 'Y'));
        // set meta-data
        $this->header->addMetaDescription($this->record['meta_description'], (bool) ($this->record['meta_description_overwrite'] == 'Y'));
        $this->header->addMetaKeywords($this->record['meta_keywords'], $this->record['meta_keywords_overwrite'] == 'Y');
        $this->header->setMetaCustom($this->record['meta_custom']);
        // advanced SEO-attributes
        if (isset($this->record['meta_data']['seo_index'])) {
            $this->header->addMetaData(array('name' => 'robots', 'content' => $this->record['meta_data']['seo_index']));
        }
        if (isset($this->record['meta_data']['seo_follow'])) {
            $this->header->addMetaData(array('name' => 'robots', 'content' => $this->record['meta_data']['seo_follow']));
        }
        // create navigation instance
        new Navigation($this->getKernel());
        // assign content
        $pageInfo = Navigation::getPageInfo($this->record['id']);
        $this->record['has_children'] = $pageInfo['has_children'];
        $this->tpl->addGlobal('page', $this->record);
        // set template path
        $this->templatePath = $this->record['template_path'];
        // loop blocks
        foreach ($this->record['positions'] as $position => &$blocks) {
            // position not known in template = skip it
            if (!in_array($position, $this->record['template_data']['names'])) {
                continue;
            }
            // loop blocks in position
            foreach ($blocks as $index => &$block) {
                // an extra
                if ($block['extra_id'] !== null) {
                    // block
                    if ($block['extra_type'] == 'block') {
                        // create new instance
                        $extra = new FrontendBlockExtra($this->getKernel(), $block['extra_module'], $block['extra_action'], $block['extra_data']);
                        if (extension_loaded('newrelic')) {
                            newrelic_name_transaction($block['extra_module'] . '::' . $block['extra_action']);
                        }
                    } else {
                        // widget
                        $extra = new FrontendBlockWidget($this->getKernel(), $block['extra_module'], $block['extra_action'], $block['extra_data']);
                    }
                    // add to list of extras
                    $block = array('extra' => $extra);
                    // add to list of extras to parse
                    $this->extras[] = $extra;
                } else {
                    // the block only contains HTML
                    $block = array('blockIsEditor' => true, 'blockContent' => $block['html']);
                    // Maintain backwards compatibility
                    $block['blockIsHTML'] = $block['blockIsEditor'];
                }
            }
        }
    }