vendor/madeyourday/contao-rocksolid-slider/src/Resources/contao/dca/tl_rocksolid_slider.php line 151

Open in your IDE?
  1. <?php
  2. /*
  3.  * Copyright MADE/YOUR/DAY OG <mail@madeyourday.net>
  4.  *
  5.  * For the full copyright and license information, please view the LICENSE
  6.  * file that was distributed with this source code.
  7.  */
  8. /**
  9.  * RockSolid Slider DCA
  10.  *
  11.  * @author Martin Auswöger <martin@madeyourday.net>
  12.  */
  13. $GLOBALS['TL_DCA']['tl_rocksolid_slider'] = array(
  14.     'config' => array(
  15.         'dataContainer' => 'Table',
  16.         'ctable' => array('tl_rocksolid_slide'),
  17.         'switchToEdit' => true,
  18.         'enableVersioning' => true,
  19.         'onload_callback' => array(
  20.             array('MadeYourDay\\RockSolidSlider\\Slider''onloadCallback'),
  21.         ),
  22.         'oncreate_callback' => array(
  23.             array('MadeYourDay\\RockSolidSlider\\Slider''oncreateCallback')
  24.         ),
  25.         'oncopy_callback' => array(
  26.             array('MadeYourDay\\RockSolidSlider\\Slider''oncopyCallback')
  27.         ),
  28.         'sql' => array(
  29.             'keys' => array(
  30.                 'id' => 'primary',
  31.             ),
  32.         ),
  33.     ),
  34.     'list' => array(
  35.         'sorting' => array(
  36.             'mode' => 1,
  37.             'fields' => array('name'),
  38.             'flag' => 1,
  39.             'panelLayout' => 'filter;search,limit',
  40.         ),
  41.         'label' => array(
  42.             'fields' => array('name''type'),
  43.             'format' => '%s <span style="color:#999;padding-left:3px">%s</span>',
  44.         ),
  45.         'global_operations' => array(
  46.             'license' => array(
  47.                 'label' => &$GLOBALS['TL_LANG']['tl_rocksolid_slider']['editLicense'],
  48.                 'href' => 'table=tl_rocksolid_slider_license',
  49.                 'class' => 'header_icon',
  50.                 'icon' => 'system/themes/' \Backend::getTheme() . '/images/settings.gif',
  51.                 'button_callback' => array('MadeYourDay\\RockSolidSlider\\Slider''sliderLicenseButton'),
  52.             ),
  53.             'all' => array(
  54.                 'label' => &$GLOBALS['TL_LANG']['MSC']['all'],
  55.                 'href' => 'act=select',
  56.                 'class' => 'header_edit_all',
  57.                 'attributes' => 'onclick="Backend.getScrollOffset()" accesskey="e"',
  58.             ),
  59.         ),
  60.         'operations' => array(
  61.             'edit' => array(
  62.                 'label' => &$GLOBALS['TL_LANG']['tl_rocksolid_slider']['edit'],
  63.                 'href' => 'table=tl_rocksolid_slide',
  64.                 'icon' => 'edit.gif',
  65.                 'attributes' => 'class="contextmenu"',
  66.                 'button_callback' => array('MadeYourDay\\RockSolidSlider\\Slider''editSliderIcon'),
  67.             ),
  68.             'editheader' => array(
  69.                 'label' => &$GLOBALS['TL_LANG']['tl_rocksolid_slider']['editheader'],
  70.                 'href' => 'act=edit',
  71.                 'icon' => 'header.gif',
  72.                 'attributes' => 'class="edit-header"',
  73.             ),
  74.             'copy' => array(
  75.                 'label' => &$GLOBALS['TL_LANG']['tl_rocksolid_slider']['copy'],
  76.                 'href' => 'act=copy',
  77.                 'icon' => 'copy.svg',
  78.                 'button_callback' => array('MadeYourDay\\RockSolidSlider\\Slider''copySliderIcon'),
  79.             ),
  80.             'delete' => array(
  81.                 'label' => &$GLOBALS['TL_LANG']['tl_rocksolid_slider']['delete'],
  82.                 'href' => 'act=delete',
  83.                 'icon' => 'delete.svg',
  84.                 'attributes' => 'onclick="if(!confirm(\'' . ($GLOBALS['TL_LANG']['MSC']['deleteConfirm'] ?? '') . '\'))return false;Backend.getScrollOffset()"',
  85.                 'button_callback' => array('MadeYourDay\\RockSolidSlider\\Slider''deleteSliderIcon'),
  86.             ),
  87.             'show' => array(
  88.                 'label' => &$GLOBALS['TL_LANG']['tl_rocksolid_slider']['show'],
  89.                 'href' => 'act=show',
  90.                 'icon' => 'show.gif',
  91.             ),
  92.         ),
  93.     ),
  94.     'palettes' => array(
  95.         '__selector__' => array('type'),
  96.         'default' => '{slider_legend},name,type',
  97.         'image' => '{slider_legend},name,type,multiSRC',
  98.     ),
  99.     'fields' => array(
  100.         'id' => array(
  101.             'sql' => "int(10) unsigned NOT NULL auto_increment",
  102.         ),
  103.         'tstamp' => array(
  104.             'sql' => "int(10) unsigned NOT NULL default '0'",
  105.         ),
  106.         'name' => array(
  107.             'label' => &$GLOBALS['TL_LANG']['tl_rocksolid_slider']['name'],
  108.             'exclude' => true,
  109.             'search' => true,
  110.             'inputType' => 'text',
  111.             'eval' => array(
  112.                 'mandatory' => true,
  113.                 'maxlength' => 255,
  114.                 'tl_class' => 'w50',
  115.             ),
  116.             'sql' => "varchar(255) NOT NULL default ''",
  117.         ),
  118.         'type' => array(
  119.             'label' => &$GLOBALS['TL_LANG']['tl_rocksolid_slider']['type'],
  120.             'exclude' => true,
  121.             'inputType' => 'select',
  122.             'options' => array(
  123.                 'content',
  124.                 'image',
  125.             ),
  126.             'reference' => &$GLOBALS['TL_LANG']['tl_rocksolid_slider']['types'],
  127.             'eval' => array(
  128.                 'mandatory' => true,
  129.                 'includeBlankOption' => true,
  130.                 'submitOnChange' => true,
  131.                 'tl_class' => 'w50',
  132.             ),
  133.             'sql' => "varchar(255) NOT NULL default ''",
  134.         ),
  135.         'multiSRC' => array(
  136.             'label' => &$GLOBALS['TL_LANG']['tl_rocksolid_slider']['multiSRC'],
  137.             'exclude' => true,
  138.             'inputType' => 'fileTree',
  139.             'eval' => array(
  140.                 'mandatory' => true,
  141.                 'multiple' => true,
  142.                 'fieldType' => 'checkbox',
  143.                 'orderField' => 'orderSRC',
  144.                 'files' => true,
  145.                 'isGallery' => true,
  146.                 'extensions' => \Config::get('validImageTypes'),
  147.                 'tl_class' => 'clr',
  148.             ),
  149.             'sql' => "blob NULL",
  150.         ),
  151.         'orderSRC' => array(
  152.             'label' => &$GLOBALS['TL_LANG']['tl_rocksolid_slider']['orderSRC'],
  153.             'sql' => "blob NULL",
  154.         ),
  155.     ),
  156. );