src/DataContainer/ColumnSet.php
public function getColumnsForModule($dataContainer)
    {
        if ($GLOBALS['TL_CONFIG']['subcolumns'] != 'bootstrap_customizable') {
            $subcolumns = new \tl_module_sc();

            return $subcolumns->getColumns($dataContainer);
        }

        $model = \ModuleModel::findByPK($dataContainer->currentRecord);
        $cols  = array();

        $translate = array('first', 'second', 'third', 'fourth', 'fith');

        for ($i = 0; $i < $model->sc_type; $i++) {
            if (!array_key_exists($i, $translate)) {
                break;
            }

            $key        = $translate[$i];
            $cols[$key] = $GLOBALS['TL_LANG']['MSC']['sc_' . $key];
        }

        return $cols;
    }
public function getColumnsForModule($dataContainer)
    {
        if ($GLOBALS['TL_CONFIG']['subcolumns'] != 'bootstrap_customizable') {
            $subcolumns = new \tl_module_sc();

            return $subcolumns->getColumns($dataContainer);
        }

        $model = \ModuleModel::findByPK($dataContainer->currentRecord);
        $cols  = array();

        $translate = array('first', 'second', 'third', 'fourth', 'fith');

        for ($i = 0; $i < $model->sc_type; $i++) {
            if (!array_key_exists($i, $translate)) {
                break;
            }

            $key        = $translate[$i];
            $cols[$key] = $GLOBALS['TL_LANG']['MSC']['sc_' . $key];
        }

        return $cols;
    }
Get columns for a a specific module.

@param \DataContainer $dataContainer The data container driver.

@return array

@SuppressWarnings(PHPMD.Superglobals)