/** 
 * Extension for Contao Open Source CMS
 *
 * Copyright (C) 2015 Monique Hahnefeld
 *
 * @package codeowl_grid_control
 * @author  Monique Hahnefeld <*****@*****.**>
 * @link    http://codeowl.org
 * @license LGPLv3
 *
 * `-,-´
 *	( )  codeowl.org
 *************************/
$co_grid = Config::get('co_grid_wizard_palette');
$default = '{title_legend},name,headline,type;';
$expert = '{template_legend:hide},navigationTpl,customTpl;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID,space';
// `-,-´ selector
array_insert($GLOBALS['TL_DCA']['tl_module']['palettes']['__selector__'], 1, array('ftc_preset_add_custom'));
//'top_bar',
// `-,-´ subpalettes
$GLOBALS['TL_DCA']['tl_module']['subpalettes']['ftc_preset_add_custom'] = 'ftc_preset_custom';
$palettes = $GLOBALS['TL_DCA']['tl_module']['palettes'];
foreach ($palettes as $p => $str) {
    $pallete_co = str_replace("{title_legend}", $co_grid . "{title_legend}", $str);
    $GLOBALS['TL_DCA']['tl_module']['palettes'][$p] = $pallete_co;
}
if ($wizardFields === NULL) {
    $wizardFields = new \Codeowl\DCA();
    $wizardFields->insert_wizard_fields('tl_module');
}
 *
 * Copyright (C) 2015 Monique Hahnefeld
 *
 * @package codeowl_design_presets
 * @author  Monique Hahnefeld <*****@*****.**>
 * @link    http://codeowl.org
 * @license LGPLv3
 *
 * `-,-´
 *	( )  codeowl.org
 *************************/
// `-,-´ Here is an example how you can implement the wizard
$co_grid = Config::get('co_grid_wizard_palette');
$default = '{title_legend},name,headline,type;';
$expert = '{template_legend:hide},navigationTpl,customTpl;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID,space';
// `-,-´ Set the selector
array_insert($GLOBALS['TL_DCA']['your_table_name']['palettes']['__selector__'], 1, array('ftc_preset_add_custom'));
//'top_bar',
// `-,-´ Set the subpalette
$GLOBALS['TL_DCA']['your_table_name']['subpalettes']['ftc_preset_add_custom'] = 'ftc_preset_custom';
// `-,-´ Set the palettes
$palettes = $GLOBALS['TL_DCA']['your_table_name']['palettes'];
foreach ($palettes as $p => $str) {
    $pallete_co = str_replace("{title_legend}", $co_grid . "{title_legend}", $str);
    $GLOBALS['TL_DCA']['your_table_name']['palettes'][$p] = $pallete_co;
}
// `-,-´ Insert the dafault dca fields. You can also insert your own fields. Look into the docs.
if ($wizardFields === NULL) {
    $wizardFields = new \Codeowl\DCA();
    $wizardFields->insert_wizard_fields('your_table_name');
}
/** 
 * Extension for Contao Open Source CMS
 *
 * Copyright (C) 2015 Monique Hahnefeld
 *
 * @package codeowl_grid_control
 * @author  Monique Hahnefeld <*****@*****.**>
 * @link    http://codeowl.org
 * @license LGPLv3
 *
 * `-,-´
 *	( )  codeowl.org
 *************************/
if ($wizardFields === NULL) {
    $wizardFields = new \Codeowl\DCA();
    $wizardFields->insert_wizard_fields('tl_content');
}
$GLOBALS['TL_DCA']['tl_content']['config']['onload_callback'][] = array('Codeowl\\Callbacks', 'content_onload');
$fieldsSize = count($GLOBALS['TL_DCA']['tl_content']['fields']) - 1;
$palettesSize = count($palettes) - 1;
$default = '{type_legend},type,headline;';
$expert = '{template_legend:hide},customTpl;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID,space;{invisible_legend:hide},invisible,start,stop';
// `-,-´ add palettes for contentelements
array_insert($GLOBALS['TL_DCA']['tl_content']['palettes'], $palettesSize, array('row_start' => '{type_legend},type,headline,cssID,row_data_attr_ftc', 'row_stop' => '{type_legend},type;' . $expert, 'col_start' => '{type_legend},type,headline;' . $expert, 'col_stop' => '{type_legend},type;' . $expert));
// `-,-´ selector
array_insert($GLOBALS['TL_DCA']['tl_content']['palettes']['__selector__'], 1, array('ftc_preset_add_custom'));
// `-,-´ add subpalletes
$subpalettes = $GLOBALS['TL_DCA']['tl_content']['subpalettes'];
$subpalettesSize = count($subpalettes) - 1;
// `-,-´ add palettes for contentelements
<?php

/** 
 * Extension for Contao Open Source CMS
 *
 * Copyright (C) 2015 Monique Hahnefeld
 *
 * @package codeowl_grid_control
 * @author  Monique Hahnefeld <*****@*****.**>
 * @link    http://codeowl.org
 * @license LGPLv3
 *
 * `-,-´
 *	( )  codeowl.org
 *************************/
$co_grid = Config::get('co_grid_wizard_palette');
$palettes = $GLOBALS['TL_DCA']['tl_article']['palettes']['default'];
array_push($GLOBALS['TL_DCA']['tl_article']['palettes']['__selector__'], 'ftc_preset_add_custom');
$GLOBALS['TL_DCA']['tl_article']['subpalettes']['ftc_preset_add_custom'] = 'ftc_preset_custom';
$pallete_co = str_replace("{teaser_legend:hide}", $co_grid . "{teaser_legend:hide}", $palettes);
//,add_ftc_settings
$fieldsSize = count($GLOBALS['TL_DCA']['tl_article']['fields']) - 1;
$GLOBALS['TL_DCA']['tl_article']['palettes']['default'] = $pallete_co;
if ($wizardFields === NULL) {
    $wizardFields = new \Codeowl\DCA();
    $wizardFields->insert_wizard_fields('tl_article');
}