PHP Code:
<?php
/**
* Table tl_screencast
*/
$GLOBALS['TL_DCA']['tl_item'] = array
(
// Config
'config' => array
(
'dataContainer' => 'Table',
'enableVersioning' => true,
'sql' => array
(
'keys' => array
(
'id' => 'primary'
)
),
),
// List
'list' => array
(
'sorting' => array
(
'mode' => 2,
'fields' => array('item'),
'flag' => 1,
'panelLayout' => 'filter;sort,search,limit'
),
'label' => array
(
'fields' => array('item'),
'format' => '%s',
),
'global_operations' => array
(
'all' => array
(
'label' => &$GLOBALS['TL_LANG']['MSC']['all'],
'href' => 'act=select',
'class' => 'header_edit_all',
'attributes' => 'onclick="Backend.getScrollOffset()" accesskey="e"'
)
),
'operations' => array
(
'edit' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_item']['edit'],
'href' => 'act=edit',
'icon' => 'edit.gif'
),
'delete' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_item']['delete'],
'href' => 'act=delete',
'icon' => 'delete.gif',
'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\'))return false;Backend.getScrollOffset()"'
),
'show' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_item']['show'],
'href' => 'act=show',
'icon' => 'show.gif',
'attributes' => 'style="margin-right:3px"'
),
)
),
// Palettes
'palettes' => array
(
'default' => '{title_legend},type,title,{item_legend},item,item2,adresse,ort,land,url,produkte,email,singleSRC'
),
// Fields
'fields' => array
(
'id' => array
(
'sql' => "int(10) unsigned NOT NULL auto_increment"
),
'tstamp' => array
(
'sql' => "int(10) unsigned NOT NULL default '0'"
),
'item' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_item']['item'],
'inputType' => 'text',
'exclude' => true,
'sorting' => true,
'flag' => 1,
'search' => true,
'eval' => array(
'mandatory' => true,
'unique' => true,
'maxlength' => 255,
'tl_class' => 'w50'
),
'sql' => "varchar(255) NOT NULL default ''"
),
'item2' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_item']['item2'],
'inputType' => 'text',
'exclude' => true,
'sorting' => true,
'flag' => 1,
'search' => true,
'eval' => array(
'maxlength' => 255,
'tl_class' => 'w50'
),
'sql' => "varchar(255) NOT NULL default ''"
),
'adresse' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_item']['adresse'],
'inputType' => 'text',
'exclude' => true,
'sorting' => true,
'flag' => 1,
'search' => true,
'eval' => array(
'maxlength' => 255,
'tl_class' => 'w50'
),
'sql' => "varchar(255) NOT NULL default ''"
),
'ort' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_item']['ort'],
'inputType' => 'text',
'exclude' => true,
'sorting' => true,
'flag' => 1,
'search' => true,
'eval' => array(
'maxlength' => 255,
'tl_class' => 'w50'
),
'sql' => "varchar(255) NOT NULL default ''"
),
'land' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_item']['land'],
'inputType' => 'text',
'exclude' => true,
'sorting' => true,
'flag' => 1,
'search' => true,
'eval' => array(
'maxlength' => 255,
'tl_class' => 'w50'
),
'sql' => "varchar(255) NOT NULL default ''"
),
'url' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_item']['url'],
'inputType' => 'text',
'exclude' => true,
'sorting' => true,
'flag' => 1,
'search' => true,
'eval' => array(
'maxlength' => 255,
'tl_class' => 'w50'
),
'sql' => "varchar(255) NOT NULL default ''"
),
'produkte' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_item']['produkte'],
'inputType' => 'text',
'exclude' => true,
'sorting' => true,
'flag' => 1,
'search' => true,
'eval' => array(
'maxlength' => 255,
'tl_class' => 'w50'
),
'sql' => "varchar(255) NOT NULL default ''"
),
'email' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_item']['email'],
'inputType' => 'text',
'exclude' => true,
'sorting' => true,
'flag' => 1,
'search' => true,
'eval' => array(
'maxlength' => 255,
'tl_class' => 'w50'
),
'sql' => "varchar(255) NOT NULL default ''"
),
'target' => array
(
'label' => &$GLOBALS['TL_LANG']['MSC']['target'],
'exclude' => true,
'inputType' => 'checkbox',
'eval' => array('tl_class'=>'w50 m12'),
'sql' => "char(1) NOT NULL default ''"
),
'singleSRC' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_content']['singleSRC'],
'exclude' => true,
'inputType' => 'fileTree',
'eval' => array('filesOnly'=>true, 'extensions'=>Config::get('validImageTypes'), 'fieldType'=>'radio', 'mandatory'=>true),
'sql' => "binary(16) NULL"
),
)
);
Created the model
Bookmarks