public function getAvailableColumns($layout = '', $table = '', $id = 0)
    {
        $tcaColumns = '';

        if ($layout && $table === 'tt_content') {
            $tcaColumns = $this->layoutSetup->getLayoutColumns($layout);
            $tcaColumns = '-2,-1,' . $tcaColumns['CSV'];
        } elseif ($table === 'pages') {
            $tcaColumns = GeneralUtility::callUserFunction(
                BackendLayoutView::class . '->getColPosListItemsParsed',
                $id,
                $this
            );
            $temp = [];
            foreach ($tcaColumns as $item) {
                if (trim($item[1]) !== '') {
                    $temp[] = (int)$item[1];
                }
            }
            // Implode into a CSV string as BackendLayoutView->getColPosListItemsParsed returns an array
            $tcaColumns = rtrim('-2,-1,' . implode(',', $temp), ',');
        }
        return $tcaColumns;
    }
public function getAvailableColumns($layout = '', $table = '', $id = 0)
    {
        $tcaColumns = '';

        if ($layout && $table === 'tt_content') {
            $tcaColumns = $this->layoutSetup->getLayoutColumns($layout);
            $tcaColumns = '-2,-1,' . $tcaColumns['CSV'];
        } elseif ($table === 'pages') {
            $tcaColumns = GeneralUtility::callUserFunction(
                BackendLayoutView::class . '->getColPosListItemsParsed',
                $id,
                $this
            );
            $temp = [];
            foreach ($tcaColumns as $item) {
                if (trim($item[1]) !== '') {
                    $temp[] = (int)$item[1];
                }
            }
            // Implode into a CSV string as BackendLayoutView->getColPosListItemsParsed returns an array
            $tcaColumns = rtrim('-2,-1,' . implode(',', $temp), ',');
        }
        return $tcaColumns;
    }
public function getAvailableColumns ( $ layout = '' , $ table = '' , $ id = 0 ) { $ tcaColumns = '' ; if ( $ layout && $ table === 'tt_content' ) { $ tcaColumns = $ this -> layoutSetup -> getLayoutColumns ( $ layout ) ; $ tcaColumns = '-2,-1,' . $ tcaColumns [ 'CSV' ] ; } elseif ( $ table === 'pages' ) { $ tcaColumns = GeneralUtility :: callUserFunction ( BackendLayoutView :: class . '->getColPosListItemsParsed' , $ id , $ this ) ; $ temp = [ ] ; foreach ( $ tcaColumns as $ item ) { if ( trim ( $ item [ 1 ] ) !== '' ) { $ temp [ ] = ( int ) $ item [ 1 ] ; } } // Implode into a CSV string as BackendLayoutView->getColPosListItemsParsed returns an array $ tcaColumns = rtrim ( '-2,-1,' . implode ( ',' , $ temp ) , ',' ) ; } return $ tcaColumns ; }
fetches all available columns for a certain grid container based on TCA settings and layout records

@param string $layout The selected backend layout of the grid container or the page
@param string $table The name of the table to get the layout for
@param int $id he uid of the parent container - being the page id for the table "pages"

@return string The columns available for the selected layout as CSV list
fetches all available columns for a certain grid container based on TCA settings and layout records