PHP-Code:
<?php
// contao/dca/tl_product.php
$GLOBALS['TL_DCA']['tl_product'] = [
'config' => [
'dataContainer' => 'Table',
'enableVersioning' => true,
'sql' => [
'keys' => [
'id' => 'primary',
],
],
],
'list' => [
'sorting' => [
'mode' => 1,
'flag' => 1,
'fields' => ['title'],
'panelLayout' => 'search'
],
'label' => [
'fields' => ['title'],
'format' => '%s',
],
'operations' => [
'edit' => [
'href' => 'act=edit',
'icon' => 'edit.svg',
],
'copy' => [
'href' => 'act=copy',
'icon' => 'copy.svg',
],
'delete' => [
'href' => 'act=delete',
'icon' => 'delete.svg',
],
'show' => [
'href' => 'act=show',
'icon' => 'show.svg'
],
],
'fields' => [
'id' => [
'sql' => ['type' => 'integer', 'unsigned' => true, 'autoincrement' => true],
],
'tstamp' => [
'sql' => ['type' => 'integer', 'unsigned' => true, 'default' => 0]
],
'title' => [
'label' => &$GLOBALS['TL_LANG']['tl_product']['title'],
'search' => true,
'inputType' => 'text',
'eval' => ['tl_class' => 'w50', 'maxlength' => 255, 'mandatory' => true],
'sql' => ['type' => 'string', 'length' => 255]
],
],
'palettes' => [
'default' => '{product_legend},title'
],
],
];
Wenn ich nach dem Leeren des Caches ins Installtool gehe, sagt es mir, dass die Datenbank aktuell ist.
Lesezeichen