Classes/Service/PluginConfigurationService.php
protected function reduceTemplateLayouts($templateLayouts, $currentColPos)
    {
        $currentColPos = (int)$currentColPos;
        $restrictions = [];
        $allLayouts = [];
        foreach ($templateLayouts as $key => $layout) {
            if (is_array($layout[0])) {
                if (isset($layout[0]['allowedColPos']) && StringUtility::endsWith($layout[1], '.')) {
                    $layoutKey = substr($layout[1], 0, -1);
                    $restrictions[$layoutKey] = GeneralUtility::intExplode(',', $layout[0]['allowedColPos'], true);
                }
            } else {
                $allLayouts[$key] = $layout;
            }
        }
        if (!empty($restrictions)) {
            foreach ($restrictions as $restrictedIdentifier => $restrictedColPosList) {
                if (!in_array($currentColPos, $restrictedColPosList, true)) {
                    unset($allLayouts[$restrictedIdentifier]);
                }
            }
        }
        return $allLayouts;
    }
protected function reduceTemplateLayouts($templateLayouts, $currentColPos)
    {
        $currentColPos = (int)$currentColPos;
        $restrictions = [];
        $allLayouts = [];
        foreach ($templateLayouts as $key => $layout) {
            if (is_array($layout[0])) {
                if (isset($layout[0]['allowedColPos']) && StringUtility::endsWith($layout[1], '.')) {
                    $layoutKey = substr($layout[1], 0, -1);
                    $restrictions[$layoutKey] = GeneralUtility::intExplode(',', $layout[0]['allowedColPos'], true);
                }
            } else {
                $allLayouts[$key] = $layout;
            }
        }
        if (!empty($restrictions)) {
            foreach ($restrictions as $restrictedIdentifier => $restrictedColPosList) {
                if (!in_array($currentColPos, $restrictedColPosList, true)) {
                    unset($allLayouts[$restrictedIdentifier]);
                }
            }
        }
        return $allLayouts;
    }
protected function reduceTemplateLayouts ( $ templateLayouts , $ currentColPos ) { $ currentColPos = ( int ) $ currentColPos ; $ restrictions = [ ] ; $ allLayouts = [ ] ; foreach ( $ templateLayouts as $ key => $ layout ) { if ( is_array ( $ layout [ 0 ] ) ) { if ( isset ( $ layout [ 0 ] [ 'allowedColPos' ] ) && StringUtility :: endsWith ( $ layout [ 1 ] , '.' ) ) { $ layoutKey = substr ( $ layout [ 1 ] , 0 , - 1 ) ; $ restrictions [ $ layoutKey ] = GeneralUtility :: intExplode ( ',' , $ layout [ 0 ] [ 'allowedColPos' ] , true ) ; } } else { $ allLayouts [ $ key ] = $ layout ; } } if ( ! empty ( $ restrictions ) ) { foreach ( $ restrictions as $ restrictedIdentifier => $ restrictedColPosList ) { if ( ! in_array ( $ currentColPos , $ restrictedColPosList , true ) ) { unset ( $ allLayouts [ $ restrictedIdentifier ] ) ; } } } return $ allLayouts ; }
Reduce the template layouts by the ones that are not allowed in given colPos

@param array $templateLayouts
@param int $currentColPos
@return array
Reduce the template layouts by the ones that are not allowed in given colPos