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;
    }