public function getLayoutSelectItems($colPos, $gridColPos = 0, $containerId = 0, $pageId = 0)
    {
        $allowed = ['*' => '*'];
        $disallowed = [];
        $selectItems = [];
        if ($containerId > 0) {
            $container = $this->cacheCurrentParent((int)$containerId, true);
            if (!empty($container)) {
                $containerLayout = $this->layoutSetup[$container['tx_gridelements_backend_layout']];
                $allowed = $containerLayout['allowed'][$gridColPos]['tx_gridelements_backend_layout'];
                $disallowed = $containerLayout['disallowed'][$gridColPos]['tx_gridelements_backend_layout'];
            }
        } elseif ($pageId > 0) {
            $pageLayout = Helper::getInstance()->getSelectedBackendLayout($pageId);
            if (!empty($pageLayout)) {
                $allowed = $pageLayout['allowed'][$colPos]['tx_gridelements_backend_layout'];
                $disallowed = $pageLayout['disallowed'][$colPos]['tx_gridelements_backend_layout'];
            }
        }
        foreach ($this->layoutSetup as $layoutId => $item) {
            if ((
                    (int)$colPos === -1 &&
                    $item['top_level_layout']
                ) ||
                (
                    !empty($allowed) &&
                    !isset($allowed['*']) &&
                    !isset($allowed[$layoutId])
                ) ||
                (
                    !empty($disallowed) &&
                    (
                        isset($disallowed['*']) ||
                        isset($disallowed[$layoutId])
                    )
                )) {
                continue;
            }
            $icon = 'gridelements-default';
            if ($item['iconIdentifier']) {
                $icon = $item['iconIdentifier'];
            } elseif (!empty($item['icon'])) {
                if (is_array($item['icon']) && !empty($item['icon'][0])) {
                    $icon = $item['icon'][0];
                } else {
                    $icon = $item['icon'];
                }
                if (StringUtility::beginsWith($icon, '../')) {
                    $icon = PATH_site . str_replace('../', '', $icon);
                }
            }
            $selectItems[] = [$this->languageService->sL($item['title']), $layoutId, $icon];
        }

        return $selectItems;
    }
public function getLayoutSelectItems($colPos, $gridColPos = 0, $containerId = 0, $pageId = 0)
    {
        $allowed = ['*' => '*'];
        $disallowed = [];
        $selectItems = [];
        if ($containerId > 0) {
            $container = $this->cacheCurrentParent((int)$containerId, true);
            if (!empty($container)) {
                $containerLayout = $this->layoutSetup[$container['tx_gridelements_backend_layout']];
                $allowed = $containerLayout['allowed'][$gridColPos]['tx_gridelements_backend_layout'];
                $disallowed = $containerLayout['disallowed'][$gridColPos]['tx_gridelements_backend_layout'];
            }
        } elseif ($pageId > 0) {
            $pageLayout = Helper::getInstance()->getSelectedBackendLayout($pageId);
            if (!empty($pageLayout)) {
                $allowed = $pageLayout['allowed'][$colPos]['tx_gridelements_backend_layout'];
                $disallowed = $pageLayout['disallowed'][$colPos]['tx_gridelements_backend_layout'];
            }
        }
        foreach ($this->layoutSetup as $layoutId => $item) {
            if ((
                    (int)$colPos === -1 &&
                    $item['top_level_layout']
                ) ||
                (
                    !empty($allowed) &&
                    !isset($allowed['*']) &&
                    !isset($allowed[$layoutId])
                ) ||
                (
                    !empty($disallowed) &&
                    (
                        isset($disallowed['*']) ||
                        isset($disallowed[$layoutId])
                    )
                )) {
                continue;
            }
            $icon = 'gridelements-default';
            if ($item['iconIdentifier']) {
                $icon = $item['iconIdentifier'];
            } elseif (!empty($item['icon'])) {
                if (is_array($item['icon']) && !empty($item['icon'][0])) {
                    $icon = $item['icon'][0];
                } else {
                    $icon = $item['icon'];
                }
                if (StringUtility::beginsWith($icon, '../')) {
                    $icon = PATH_site . str_replace('../', '', $icon);
                }
            }
            $selectItems[] = [$this->languageService->sL($item['title']), $layoutId, $icon];
        }

        return $selectItems;
    }
public function getLayoutSelectItems ( $ colPos , $ gridColPos = 0 , $ containerId = 0 , $ pageId = 0 ) { $ allowed = [ '*' => '*' ] ; $ disallowed = [ ] ; $ selectItems = [ ] ; if ( $ containerId > 0 ) { $ container = $ this -> cacheCurrentParent ( ( int ) $ containerId , true ) ; if ( ! empty ( $ container ) ) { $ containerLayout = $ this -> layoutSetup [ $ container [ 'tx_gridelements_backend_layout' ] ] ; $ allowed = $ containerLayout [ 'allowed' ] [ $ gridColPos ] [ 'tx_gridelements_backend_layout' ] ; $ disallowed = $ containerLayout [ 'disallowed' ] [ $ gridColPos ] [ 'tx_gridelements_backend_layout' ] ; } } elseif ( $ pageId > 0 ) { $ pageLayout = Helper :: getInstance ( ) -> getSelectedBackendLayout ( $ pageId ) ; if ( ! empty ( $ pageLayout ) ) { $ allowed = $ pageLayout [ 'allowed' ] [ $ colPos ] [ 'tx_gridelements_backend_layout' ] ; $ disallowed = $ pageLayout [ 'disallowed' ] [ $ colPos ] [ 'tx_gridelements_backend_layout' ] ; } } foreach ( $ this -> layoutSetup as $ layoutId => $ item ) { if ( ( ( int ) $ colPos === - 1 && $ item [ 'top_level_layout' ] ) || ( ! empty ( $ allowed ) && ! isset ( $ allowed [ '*' ] ) && ! isset ( $ allowed [ $ layoutId ] ) ) || ( ! empty ( $ disallowed ) && ( isset ( $ disallowed [ '*' ] ) || isset ( $ disallowed [ $ layoutId ] ) ) ) ) { continue ; } $ icon = 'gridelements-default' ; if ( $ item [ 'iconIdentifier' ] ) { $ icon = $ item [ 'iconIdentifier' ] ; } elseif ( ! empty ( $ item [ 'icon' ] ) ) { if ( is_array ( $ item [ 'icon' ] ) && ! empty ( $ item [ 'icon' ] [ 0 ] ) ) { $ icon = $ item [ 'icon' ] [ 0 ] ; } else { $ icon = $ item [ 'icon' ] ; } if ( StringUtility :: beginsWith ( $ icon , '../' ) ) { $ icon = PATH_site . str_replace ( '../' , '' , $ icon ) ; } } $ selectItems [ ] = [ $ this -> languageService -> sL ( $ item [ 'title' ] ) , $ layoutId , $ icon ] ; } return $ selectItems ; }
Returns the item array for form field selection.

@param int $colPos The selected content column position.
@param int $gridColPos
@param int $containerId
@param int $pageId
@return array
Returns the item array for form field selection .