<?php

/**
 * @package    contao-flexible-sections
 * @author     David Molineus <*****@*****.**>
 * @copyright  2014-2015 netzmacht creative David Molineus
 * @license    LGPL 3.0
 * @filesource
 *
 */
Bit3\Contao\MetaPalettes\MetaPalettes::appendFields('tl_layout', 'sections', array('flexible_sections'));
Bit3\Contao\MetaPalettes\MetaPalettes::removeFields('tl_layout', array('sections', 'sposition'));
if (TL_MODE === 'BE') {
    $GLOBALS['TL_CSS'][] = 'system/modules/flexible-sections/assets/backend.css';
}
$GLOBALS['TL_DCA']['tl_layout']['fields']['flexible_sections'] = array('label' => &$GLOBALS['TL_LANG']['tl_layout']['flexible_sections'], 'exclude' => true, 'inputType' => 'multiColumnWizard', 'save_callback' => array(array('Netzmacht\\Contao\\FlexibleSections\\Dca\\Layout', 'autoCompleteSectionIds'), array('Netzmacht\\Contao\\FlexibleSections\\Dca\\Layout', 'updateLegacySections')), 'eval' => array('tl_class' => 'clr long flexible-sections-mcw', 'columnFields' => array('label' => array('label' => &$GLOBALS['TL_LANG']['tl_layout']['flexible_sections_label'], 'inputType' => 'text', 'eval' => array('style' => 'width: 180px', 'columnPos' => '1')), 'id' => array('label' => &$GLOBALS['TL_LANG']['tl_layout']['flexible_sections_id'], 'inputType' => 'text', 'eval' => array('style' => 'width: 180px', 'columnPos' => '2')), 'class' => array('label' => &$GLOBALS['TL_LANG']['tl_layout']['flexible_sections_class'], 'inputType' => 'text', 'eval' => array('style' => 'width: 180px', 'columnPos' => '2')), 'template' => array('label' => &$GLOBALS['TL_LANG']['tl_layout']['flexible_sections_template'], 'inputType' => 'select', 'options_callback' => array('Netzmacht\\Contao\\FlexibleSections\\Dca\\Layout', 'getSectionTemplates'), 'eval' => array('style' => 'width: 185px', 'chosen' => true, 'mandatory' => true, 'columnPos' => '1')), 'position' => array('label' => &$GLOBALS['TL_LANG']['tl_layout']['flexible_sections_position'], 'inputType' => 'select', 'options' => array('top', 'before', 'main', 'after', 'bottom', 'custom'), 'reference' => &$GLOBALS['TL_LANG']['tl_layout'], 'eval' => array('style' => 'width: 180px', 'chosen' => true, 'mandatory' => true, 'columnPos' => '3')))), 'sql' => "blob NULL");
$GLOBALS['TL_DCA']['tl_layout']['fields']['modules']['load_callback'][] = array('Netzmacht\\Contao\\FlexibleSections\\Dca\\Layout', 'loadSectionLabels');
<?php

/**
 * @package    contao-feature-toggle
 * @author     David Molineus <*****@*****.**>
 * @copyright  2016 netzmacht creative David Molineus
 * @license    LGPL 3.0
 * @filesource
 *
 */
use Netzmacht\Contao\FeatureToggle\Dca\Callbacks;
Bit3\Contao\MetaPalettes\MetaPalettes::appendFields('tl_page', 'regular', 'publish', ['feature_toggle']);
$GLOBALS['TL_DCA']['tl_page']['fields']['feature_toggle'] = ['label' => &$GLOBALS['TL_LANG']['tl_page']['feature_toggle'], 'inputType' => 'select', 'options_callback' => [Callbacks::class, 'getToggles'], 'reference' => &$GLOBALS['TL_LANG']['feature_toggles'], 'eval' => ['chosen' => true, 'tl_class' => 'w50', 'includeBlankOption' => true], 'sql' => 'varchar(64) NOT NULL default \'\''];
<?php

/**
 * @package    contao-feature-toggle
 * @author     David Molineus <*****@*****.**>
 * @copyright  2016 netzmacht creative David Molineus
 * @license    LGPL 3.0
 * @filesource
 *
 */
use Netzmacht\Contao\FeatureToggle\Dca\Callbacks;
Bit3\Contao\MetaPalettes\MetaPalettes::appendFields('tl_article', 'publish', ['feature_toggle']);
$GLOBALS['TL_DCA']['tl_article']['fields']['feature_toggle'] = ['label' => &$GLOBALS['TL_LANG']['tl_article']['feature_toggle'], 'inputType' => 'select', 'options_callback' => [Callbacks::class, 'getToggles'], 'reference' => &$GLOBALS['TL_LANG']['feature_toggles'], 'eval' => ['chosen' => true, 'tl_class' => 'w50', 'includeBlankOption' => true], 'sql' => 'varchar(64) NOT NULL default \'\''];
Beispiel #4
0
<?php

/**
 * @package   contao-bootstrap
 * @author    David Molineus <*****@*****.**>
 * @license   LGPL 3+
 * @copyright 2013-2015 netzmacht creative David Molineus
 */
Bit3\Contao\MetaPalettes\MetaPalettes::appendTo('tl_settings', array('bootstrap' => array(':hide', 'bootstrapIconSet')));
$GLOBALS['TL_DCA']['tl_settings']['fields']['bootstrapIconSet'] = array('label' => &$GLOBALS['TL_LANG']['tl_settings']['bootstrapIconSet'], 'inputType' => 'select', 'options_callback' => array('Netzmacht\\Bootstrap\\Core\\Contao\\DataContainer\\Settings', 'getIconSets'), 'eval' => array('tl_class' => 'clr w50'));