public function init($pageId, array $typoScriptSetup = [])
    {
        $this->setLanguageService($GLOBALS['LANG']);
        $pageId = (strpos($pageId, 'NEW') === 0) ? 0 : (int)$pageId;
        if ((int)$pageId < 0) {
            $pageId = Helper::getInstance()->getPidFromUid($pageId);
        }
        $this->realPid = $pageId;
        $this->loadLayoutSetup($pageId);
        foreach ($this->layoutSetup as $key => $setup) {
            $columns = $this->getLayoutColumns($key);
            if ($columns['allowed'] || $columns['disallowed'] || $columns['maxitems']) {
                $this->layoutSetup[$key]['columns'] = $columns;
                unset($this->layoutSetup[$key]['columns']['allowed']);
                $this->layoutSetup[$key]['allowed'] = $columns['allowed'] ?: [];
                $this->layoutSetup[$key]['disallowed'] = $columns['disallowed'] ?: [];
                $this->layoutSetup[$key]['maxitems'] = $columns['maxitems'] ?: [];
            }
        }
        $this->setTypoScriptSetup($typoScriptSetup);
        return $this;
    }
public function init($pageId, array $typoScriptSetup = [])
    {
        $this->setLanguageService($GLOBALS['LANG']);
        $pageId = (strpos($pageId, 'NEW') === 0) ? 0 : (int)$pageId;
        if ((int)$pageId < 0) {
            $pageId = Helper::getInstance()->getPidFromUid($pageId);
        }
        $this->realPid = $pageId;
        $this->loadLayoutSetup($pageId);
        foreach ($this->layoutSetup as $key => $setup) {
            $columns = $this->getLayoutColumns($key);
            if ($columns['allowed'] || $columns['disallowed'] || $columns['maxitems']) {
                $this->layoutSetup[$key]['columns'] = $columns;
                unset($this->layoutSetup[$key]['columns']['allowed']);
                $this->layoutSetup[$key]['allowed'] = $columns['allowed'] ?: [];
                $this->layoutSetup[$key]['disallowed'] = $columns['disallowed'] ?: [];
                $this->layoutSetup[$key]['maxitems'] = $columns['maxitems'] ?: [];
            }
        }
        $this->setTypoScriptSetup($typoScriptSetup);
        return $this;
    }
public function init ( $ pageId , array $ typoScriptSetup = [ ] ) { $ this -> setLanguageService ( $ GLOBALS [ 'LANG' ] ) ; $ pageId = ( strpos ( $ pageId , 'NEW' ) === 0 ) ? 0 : ( int ) $ pageId ; if ( ( int ) $ pageId < 0 ) { $ pageId = Helper :: getInstance ( ) -> getPidFromUid ( $ pageId ) ; } $ this -> realPid = $ pageId ; $ this -> loadLayoutSetup ( $ pageId ) ; foreach ( $ this -> layoutSetup as $ key => $ setup ) { $ columns = $ this -> getLayoutColumns ( $ key ) ; if ( $ columns [ 'allowed' ] || $ columns [ 'disallowed' ] || $ columns [ 'maxitems' ] ) { $ this -> layoutSetup [ $ key ] [ 'columns' ] = $ columns ; unset ( $ this -> layoutSetup [ $ key ] [ 'columns' ] [ 'allowed' ] ) ; $ this -> layoutSetup [ $ key ] [ 'allowed' ] = $ columns [ 'allowed' ] ? : [ ] ; $ this -> layoutSetup [ $ key ] [ 'disallowed' ] = $ columns [ 'disallowed' ] ? : [ ] ; $ this -> layoutSetup [ $ key ] [ 'maxitems' ] = $ columns [ 'maxitems' ] ? : [ ] ; } } $ this -> setTypoScriptSetup ( $ typoScriptSetup ) ; return $ this ; }
Load page TSconfig

@param int $pageId The current page ID
@param array $typoScriptSetup The PlugIn configuration

@return LayoutSetup
Load page TSconfig