<?php

/**
 * @package   contao-bootstrap
 * @author    David Molineus <*****@*****.**>
 * @license   LGPL 3+
 * @copyright 2013-2015 netzmacht creative David Molineus
 */
// backend modukle
$GLOBALS['BE_MOD']['design']['columnset'] = array('icon' => 'system/modules/bootstrap-grid/assets/icon.png', 'tables' => array('tl_columnset'));
// integrations
$GLOBALS['TL_HOOKS']['outputFrontendTemplate'][] = array('Netzmacht\\Bootstrap\\Grid\\Integration\\InsertTag', 'hookOutputFrontendTemplate');
$GLOBALS['TL_EVENT_SUBSCRIBERS'][] = 'Netzmacht\\Bootstrap\\Grid\\Integration\\InsertTag';
\Netzmacht\Bootstrap\Grid\Integration\Subcolumns::setUp();
\Netzmacht\Bootstrap\Grid\Integration\SemanticHtml5::setUp();
// add separator for colsetPart. It's missing by subcolumns
$GLOBALS['TL_WRAPPERS']['separator'][] = 'colsetPart';
if (!isset($GLOBALS['TL_CONFIG']['bootstrap_gridColumns'])) {
    $GLOBALS['TL_CONFIG']['bootstrap_gridColumns'] = 12;
}
// subcolumns columnset definition
$GLOBALS['TL_SUBCL']['bootstrap_customizable'] = array('label' => 'Bootstrap 3 (customizable)', 'scclass' => 'row', 'inside' => false, 'gap' => false, 'sets' => array('1' => array(array('col-lg-12')), '2' => array(array('col-lg-6'), array('col-lg-6')), '3' => array(array('col-lg-4'), array('col-lg-4'), array('col-lg-4')), '4' => array(array('col-lg-3'), array('col-lg-3'), array('col-lg-3'), array('col-lg-3')), '5' => array(array('col-lg-3'), array('col-lg-3'), array('col-lg-2'), array('col-lg-2'), array('col-lg-2')), '6' => array(array('col-lg-2'), array('col-lg-2'), array('col-lg-2'), array('col-lg-2'), array('col-lg-2'), array('col-lg-2')), '7' => array(array('col-lg-2'), array('col-lg-2'), array('col-lg-2'), array('col-lg-2'), array('col-lg-2'), array('col-lg-1'), array('col-lg-1')), '8' => array(array('col-lg-2'), array('col-lg-2'), array('col-lg-2'), array('col-lg-2'), array('col-lg-1'), array('col-lg-1'), array('col-lg-1'), array('col-lg-1')), '9' => array(array('col-lg-2'), array('col-lg-2'), array('col-lg-2'), array('col-lg-1'), array('col-lg-1'), array('col-lg-1'), array('col-lg-1'), array('col-lg-1'), array('col-lg-1')), '10' => array(array('col-lg-2'), array('col-lg-2'), array('col-lg-1'), array('col-lg-1'), array('col-lg-1'), array('col-lg-1'), array('col-lg-1'), array('col-lg-1'), array('col-lg-1'), array('col-lg-1')), '11' => array(array('col-lg-2'), array('col-lg-1'), array('col-lg-1'), array('col-lg-1'), array('col-lg-1'), array('col-lg-1'), array('col-lg-1'), array('col-lg-1'), array('col-lg-1'), array('col-lg-1'), array('col-lg-1')), '12' => array(array('col-lg-1'), array('col-lg-1'), array('col-lg-1'), array('col-lg-1'), array('col-lg-1'), array('col-lg-1'), array('col-lg-1'), array('col-lg-1'), array('col-lg-1'), array('col-lg-1'), array('col-lg-1'), array('col-lg-1'))));
<?php

/**
 * @package   contao-bootstrap
 * @author    David Molineus <*****@*****.**>
 * @license   LGPL 3+
 * @copyright 2013-2015 netzmacht creative David Molineus
 */
// inject columnset selector for subcolumns
if (\Netzmacht\Bootstrap\Grid\Integration\Subcolumns::isActive()) {
    $GLOBALS['TL_DCA']['tl_content']['config']['onload_callback'][] = array('Netzmacht\\Bootstrap\\Grid\\Integration\\Subcolumns', 'appendColumnsetIdToPalette');
}
// inject columnset selector for semantic html5
if (\Netzmacht\Bootstrap\Grid\Integration\SemanticHtml5::isActive()) {
    $GLOBALS['TL_DCA']['tl_content']['config']['palettes_callback'][] = array('Netzmacht\\Bootstrap\\Grid\\Integration\\SemanticHtml5', 'callbackGeneratePalette');
}
$GLOBALS['TL_DCA']['tl_content']['metasubselectpalettes']['bootstrap_isGridElement'] = array('row' => array('bootstrap_grid'), 'column' => array('bootstrap_gridRow'));
/**
 * fields
 */
$GLOBALS['TL_DCA']['tl_content']['fields']['sc_type']['options_callback'] = array('Netzmacht\\Bootstrap\\Grid\\DataContainer\\ColumnSet', 'getAllTypes');
$GLOBALS['TL_DCA']['tl_content']['fields']['sc_type']['eval']['submitOnChange'] = true;
$GLOBALS['TL_DCA']['tl_content']['fields']['bootstrap_grid'] = array('label' => &$GLOBALS['TL_LANG']['tl_content']['bootstrap_grid'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => array('Netzmacht\\Bootstrap\\Grid\\DataContainer\\ColumnSet', 'getGrids'), 'reference' => &$GLOBALS['TL_LANG']['tl_content'], 'eval' => array('mandatory' => true, 'submitOnChange' => true, 'tl_class' => 'w50'), 'sql' => "int(10) unsigned NOT NULL default '0'");
$GLOBALS['TL_DCA']['tl_content']['fields']['bootstrap_gridRow'] = array('label' => &$GLOBALS['TL_LANG']['tl_content']['bootstrap_gridRow'], 'exclude' => true, 'inputType' => 'select', 'options_callback' => array('Netzmacht\\Bootstrap\\Grid\\Integration\\SemanticHtml5', 'getGridElements'), 'eval' => array('mandatory' => true, 'submitOnChange' => true, 'tl_class' => 'w50'), 'sql' => "int(10) unsigned NOT NULL default '0'");
$GLOBALS['TL_DCA']['tl_content']['fields']['bootstrap_isGridElement'] = array('label' => &$GLOBALS['TL_LANG']['tl_content']['bootstrap_isGridElement'], 'exclude' => true, 'inputType' => 'select', 'options' => array('row', 'column'), 'reference' => &$GLOBALS['TL_LANG']['tl_content']['bootstrap_gridElements'], 'eval' => array('submitOnChange' => true, 'tl_class' => 'clr w50', 'includeBlankOption' => true), 'sql' => "varchar(8) NOT NULL default ''");
$GLOBALS['TL_DCA']['tl_content']['fields']['bootstrap_isGridColumn'] = array('label' => &$GLOBALS['TL_LANG']['tl_content']['bootstrap_isGridColumn'], 'exclude' => true, 'inputType' => 'checkbox', 'eval' => array('mandatory' => true, 'submitOnChange' => true, 'tl_class' => 'w50'), 'sql' => "char(1) NOT NULL default ''");