public function appendColumnsetIdToPalette($dataContainer)
    {
        if ($GLOBALS['TL_CONFIG']['subcolumns'] != 'bootstrap_customizable') {
            return;
        }

        if ($dataContainer->table == 'tl_content') {
            $model = \ContentModel::findByPK($dataContainer->id);

            if ($model->sc_type > 0) {
                \MetaPalettes::appendFields($dataContainer->table, 'colsetStart', 'colset', array('columnset_id'));
            }
        } else {
            $model = \ModuleModel::findByPk($dataContainer->id);

            if ($model->sc_type > 0) {
                if ($model->sc_type > 0) {
                    $GLOBALS['TL_DCA']['tl_module']['palettes']['subcolumns'] = str_replace(
                        'sc_type,',
                        'sc_type,columnset_id,',
                        $GLOBALS['TL_DCA']['tl_module']['palettes']['subcolumns']
                    );
                }
            }
        }
    }
public function appendColumnsetIdToPalette($dataContainer)
    {
        if ($GLOBALS['TL_CONFIG']['subcolumns'] != 'bootstrap_customizable') {
            return;
        }

        if ($dataContainer->table == 'tl_content') {
            $model = \ContentModel::findByPK($dataContainer->id);

            if ($model->sc_type > 0) {
                \MetaPalettes::appendFields($dataContainer->table, 'colsetStart', 'colset', array('columnset_id'));
            }
        } else {
            $model = \ModuleModel::findByPk($dataContainer->id);

            if ($model->sc_type > 0) {
                if ($model->sc_type > 0) {
                    $GLOBALS['TL_DCA']['tl_module']['palettes']['subcolumns'] = str_replace(
                        'sc_type,',
                        'sc_type,columnset_id,',
                        $GLOBALS['TL_DCA']['tl_module']['palettes']['subcolumns']
                    );
                }
            }
        }
    }
public function appendColumnsetIdToPalette ( $ dataContainer ) { if ( $ GLOBALS [ 'TL_CONFIG' ] [ 'subcolumns' ] != 'bootstrap_customizable' ) { return ; } if ( $ dataContainer -> table == 'tl_content' ) { $ model = \ ContentModel :: findByPK ( $ dataContainer -> id ) ; if ( $ model -> sc_type > 0 ) { \ MetaPalettes :: appendFields ( $ dataContainer -> table , 'colsetStart' , 'colset' , array ( 'columnset_id' ) ) ; } } else { $ model = \ ModuleModel :: findByPk ( $ dataContainer -> id ) ; if ( $ model -> sc_type > 0 ) { if ( $ model -> sc_type > 0 ) { $ GLOBALS [ 'TL_DCA' ] [ 'tl_module' ] [ 'palettes' ] [ 'subcolumns' ] = str_replace ( 'sc_type,' , 'sc_type,columnset_id,' , $ GLOBALS [ 'TL_DCA' ] [ 'tl_module' ] [ 'palettes' ] [ 'subcolumns' ] ) ; } } } }
Add column set field to the colsetStart content element.

We need to do it dynamically because subcolumns creates its palette dynamically.

@param \DataContainer $dataContainer The data container driver.

@return void

@SuppressWarnings(PHPMD.Superglobals)
Add column set field to the colsetStart content element .