<?php

namespace {
$strTable = 'tl_klaro_purpose';
\Contao\System::loadLanguageFile($strTable);
/*
 * Table tl_klaro_service
 */
$GLOBALS['TL_DCA'][$strTable] = [
    // Config
    'config' => ['dataContainer' => \Contao\DC_Table::class, 'enableVersioning' => \true, 'sql' => ['keys' => ['id' => 'primary']]],
    'list' => ['sorting' => ['mode' => 2, 'fields' => ['title'], 'flag' => 1, 'panelLayout' => 'filter;sort,search,limit'], 'label' => ['fields' => ['title'], 'format' => '%s'], 'global_operations' => ['all' => ['label' => &$GLOBALS['TL_LANG']['MSC']['all'], 'href' => 'act=select', 'class' => 'header_edit_all', 'attributes' => 'onclick="Backend.getScrollOffset()" accesskey="e"']], 'operations' => ['edit' => ['label' => &$GLOBALS['TL_LANG'][$strTable]['edit'], 'href' => 'act=edit', 'icon' => 'edit.svg'], 'copy' => ['label' => &$GLOBALS['TL_LANG'][$strTable]['copy'], 'href' => 'act=copy', 'icon' => 'copy.svg'], 'delete' => ['label' => &$GLOBALS['TL_LANG'][$strTable]['delete'], 'href' => 'act=delete', 'icon' => 'delete.svg', 'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\'))return false;Backend.getScrollOffset()"'], 'show' => ['label' => &$GLOBALS['TL_LANG'][$strTable]['show'], 'href' => 'act=show', 'icon' => 'show.svg', 'attributes' => 'style="margin-right:3px"']]],
    // Palettes
    'palettes' => ['__selector__' => [], 'default' => '{purpose_legend},klaro_key;' . '{title_legend},title;'],
    // Subpalettes
    'subpalettes' => [],
    // Fields
    'fields' => ['id' => ['sql' => 'int(10) unsigned NOT NULL auto_increment'], 'tstamp' => ['sql' => "int(10) unsigned NOT NULL default '0'"], 'klaro_key' => ['exclude' => \true, 'inputType' => 'text', 'eval' => ['mandatory' => \true, 'tl_class' => 'w25'], 'sql' => ['type' => 'string', 'length' => 20, 'fixed' => \true, 'default' => '']], 'title' => ['inputType' => 'text', 'exclude' => \true, 'search' => \true, 'filter' => \true, 'sorting' => \true, 'flag' => 1, 'eval' => ['mandatory' => \true, 'maxlength' => 255, 'tl_class' => 'w75'], 'sql' => "varchar(255) NOT NULL default ''"]],
];
}
