FluidTYPO3\Flux\View\PreviewView::getInitializedPageLayoutView PHP Method

getInitializedPageLayoutView() protected method

protected getInitializedPageLayoutView ( array $row ) : PageLayoutView
$row array
return PageLayoutView
    protected function getInitializedPageLayoutView(array $row)
    {
        $pageRecord = $this->workspacesAwareRecordService->getSingle('pages', '*', $row['pid']);
        $moduleData = $GLOBALS['BE_USER']->getModuleData('web_layout', '');
        // For all elements to be shown in draft workspaces & to also show hidden elements by default if user hasn't disabled the option
        // analog behavior to the PageLayoutController at the end of menuConfig()
        if ($this->getBackendUser()->workspace != 0 || FALSE === isset($this->moduleData['tt_content_showHidden']) || $this->moduleData['tt_content_showHidden'] !== '0') {
            $moduleData['tt_content_showHidden'] = 1;
        }
        /** @var $dblist PageLayoutView */
        $dblist = GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\ObjectManager::class)->get(\FluidTYPO3\Flux\View\PageLayoutView::class);
        $dblist->backPath = $GLOBALS['BACK_PATH'];
        $dblist->script = 'db_layout.php';
        $dblist->showIcon = 1;
        $dblist->setLMargin = 0;
        $dblist->doEdit = 1;
        $dblist->no_noWrap = 1;
        $dblist->ext_CALC_PERMS = $this->getBackendUser()->calcPerms($pageRecord);
        $dblist->id = $row['pid'];
        $dblist->nextThree = 1;
        $dblist->table = 'tt_content';
        $dblist->tableList = 'tt_content';
        $dblist->currentTable = 'tt_content';
        $dblist->tt_contentConfig['showCommands'] = 1;
        $dblist->tt_contentConfig['showInfo'] = 1;
        $dblist->tt_contentConfig['single'] = 0;
        $dblist->tt_contentConfig['showHidden'] = intval($moduleData['tt_content_showHidden']);
        $dblist->tt_contentConfig['activeCols'] .= ',' . ContentService::COLPOS_FLUXCONTENT;
        $dblist->CType_labels = array();
        $dblist->pidSelect = "pid = '" . $row['pid'] . "'";
        $dblist->setPageinfo(BackendUtility::readPageAccess($row['pid'], ''));
        $dblist->initializeLanguages();
        foreach ($GLOBALS['TCA']['tt_content']['columns']['CType']['config']['items'] as $val) {
            $dblist->CType_labels[$val[1]] = $this->getLanguageService()->sL($val[0]);
        }
        $dblist->itemLabels = array();
        foreach ($GLOBALS['TCA']['tt_content']['columns'] as $name => $val) {
            $dblist->itemLabels[$name] = $this->getLanguageService()->sL($val['label']);
        }
        return $dblist;
    }