Skip to content

Instantly share code, notes, and snippets.

@holzfelix
Created August 31, 2018 06:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save holzfelix/41e05dbe35946152ef31decff916cab4 to your computer and use it in GitHub Desktop.
Save holzfelix/41e05dbe35946152ef31decff916cab4 to your computer and use it in GitHub Desktop.
<?php
if (!defined ('TYPO3_MODE')) {
die ('Access denied.');
}
$GLOBALS['TCA']['tx_tutvideoverwaltung_domain_model_video'] = array(
'ctrl' => $GLOBALS['TCA']['tx_tutvideoverwaltung_domain_model_video']['ctrl'],
'interface' => array(
'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title, description, path_ogg, path_webm, path_mp4, path_ogg_alternative, path_webm_alternative, path_mp4_alternative, duration, date_of_publication, views, sort_code, visible, meta_title, meta_key, meta_description, transcript, thumbnail, thumbnail_alternative, errata, poster, poster_alternative, chapter, further_field1, further_field2, further_field3, language, level_u_i_d, target_group_u_i_d, complementary_video_u_i_d, further_video_u_i_d, supposed_video_u_i_d, material_u_i_d, author_u_i_d, category_u_i_d, fegroup_u_i_d, question_u_i_d',
),
'types' => array(
'1' => array('showitem' => 'sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, hidden;;1, title, description, path_ogg, path_webm, path_mp4, path_ogg_alternative, path_webm_alternative, path_mp4_alternative, duration, date_of_publication, views, sort_code, visible, meta_title, meta_key, meta_description, transcript, thumbnail, thumbnail_alternative, errata, poster, poster_alternative, chapter, further_field1, further_field2, further_field3, language, level_u_i_d, target_group_u_i_d, complementary_video_u_i_d, further_video_u_i_d, supposed_video_u_i_d, material_u_i_d, author_u_i_d, category_u_i_d, fegroup_u_i_d, question_u_i_d, --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access, starttime, endtime'),
),
'palettes' => array(
'1' => array('showitem' => ''),
),
'columns' => array(
'sys_language_uid' => array(
'exclude' => 1,
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language',
'config' => array(
'type' => 'select',
'foreign_table' => 'sys_language',
'foreign_table_where' => 'ORDER BY sys_language.title',
'items' => array(
array('LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', -1),
array('LLL:EXT:lang/locallang_general.xlf:LGL.default_value', 0)
),
),
),
'l10n_parent' => array(
'displayCond' => 'FIELD:sys_language_uid:>:0',
'exclude' => 1,
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent',
'config' => array(
'type' => 'select',
'items' => array(
array('', 0),
),
'foreign_table' => 'tx_tutvideoverwaltung_domain_model_video',
'foreign_table_where' => 'AND tx_tutvideoverwaltung_domain_model_video.pid=###CURRENT_PID### AND tx_tutvideoverwaltung_domain_model_video.sys_language_uid IN (-1,0)',
),
),
'l10n_diffsource' => array(
'config' => array(
'type' => 'passthrough',
),
),
't3ver_label' => array(
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.versionLabel',
'config' => array(
'type' => 'input',
'size' => 30,
'max' => 255,
)
),
'hidden' => array(
'exclude' => 1,
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.hidden',
'config' => array(
'type' => 'check',
),
),
'starttime' => array(
'exclude' => 1,
'l10n_mode' => 'mergeIfNotBlank',
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.starttime',
'config' => array(
'type' => 'input',
'size' => 13,
'max' => 20,
'eval' => 'datetime',
'checkbox' => 0,
'default' => 0,
'range' => array(
'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
),
),
),
'endtime' => array(
'exclude' => 1,
'l10n_mode' => 'mergeIfNotBlank',
'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.endtime',
'config' => array(
'type' => 'input',
'size' => 13,
'max' => 20,
'eval' => 'datetime',
'checkbox' => 0,
'default' => 0,
'range' => array(
'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y'))
),
),
),
'title' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.title',
'config' => array(
'type' => 'input',
'size' => 30,
'eval' => 'trim,required'
),
),
'description' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.description',
'config' => array(
'type' => 'text',
'cols' => 40,
'rows' => 15,
'eval' => 'trim,required'
)
),
'path_ogg' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.path_ogg',
'config' => array(
'type' => 'input',
'size' => 30,
'eval' => 'trim,required'
),
),
'path_webm' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.path_webm',
'config' => array(
'type' => 'input',
'size' => 30,
'eval' => 'trim,required'
),
),
'path_mp4' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.path_mp4',
'config' => array(
'type' => 'input',
'size' => 30,
'eval' => 'trim,required'
),
),
'path_ogg_alternative' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.path_ogg_alternative',
'config' => array(
'type' => 'input',
'size' => 30,
'eval' => 'trim'
),
),
'path_webm_alternative' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.path_webm_alternative',
'config' => array(
'type' => 'input',
'size' => 30,
'eval' => 'trim'
),
),
'path_mp4_alternative' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.path_mp4_alternative',
'config' => array(
'type' => 'input',
'size' => 30,
'eval' => 'trim'
),
),
'duration' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.duration',
'config' => array(
'type' => 'input',
'size' => 30,
'eval' => 'trim,required'
),
),
'date_of_publication' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.date_of_publication',
'config' => array(
'dbType' => 'date',
'type' => 'input',
'size' => 7,
'eval' => 'date,required',
'checkbox' => 0,
'default' => '0000-00-00'
),
),
'views' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.views',
'config' => array(
'type' => 'input',
'size' => 4,
'eval' => 'int,required'
)
),
'sort_code' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.sort_code',
'config' => array(
'type' => 'input',
'size' => 30,
'eval' => 'trim,required'
),
),
'visible' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.visible',
'config' => array(
'type' => 'check',
'default' => 0
)
),
'meta_title' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.meta_title',
'config' => array(
'type' => 'input',
'size' => 30,
'eval' => 'trim'
),
),
'meta_key' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.meta_key',
'config' => array(
'type' => 'input',
'size' => 30,
'eval' => 'trim'
),
),
'meta_description' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.meta_description',
'config' => array(
'type' => 'text',
'cols' => 40,
'rows' => 15,
'eval' => 'trim'
)
),
'transcript' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.transcript',
'config' => array(
'type' => 'text',
'cols' => 40,
'rows' => 15,
'eval' => 'trim'
)
),
'thumbnail' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.thumbnail',
'config' => array(
'type' => 'input',
'size' => 30,
'eval' => 'trim'
),
),
'thumbnail_alternative' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.thumbnail_alternative',
'config' => array(
'type' => 'input',
'size' => 30,
'eval' => 'trim'
),
),
'errata' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.errata',
'config' => array(
'type' => 'input',
'size' => 30,
'eval' => 'trim'
),
),
'poster' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.poster',
'config' => array(
'type' => 'input',
'size' => 30,
'eval' => 'trim'
),
),
'poster_alternative' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.poster_alternative',
'config' => array(
'type' => 'input',
'size' => 30,
'eval' => 'trim'
),
),
'chapter' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.chapter',
'config' => array(
'type' => 'input',
'size' => 30,
'eval' => 'trim'
),
),
'further_field1' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.further_field1',
'config' => array(
'type' => 'input',
'size' => 30,
'eval' => 'trim'
),
),
'further_field2' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.further_field2',
'config' => array(
'type' => 'input',
'size' => 30,
'eval' => 'trim'
),
),
'further_field3' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.further_field3',
'config' => array(
'type' => 'input',
'size' => 30,
'eval' => 'trim'
),
),
'language' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.language',
'config' => array(
'type' => 'input',
'size' => 30,
'eval' => 'trim'
),
),
'level_u_i_d' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.level_u_i_d',
'config' => array(
'type' => 'select',
'foreign_table' => 'tx_tutvideoverwaltung_domain_model_level',
'minitems' => 0,
'maxitems' => 1,
),
),
'target_group_u_i_d' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.target_group_u_i_d',
'config' => array(
'type' => 'select',
'foreign_table' => 'tx_tutvideoverwaltung_domain_model_targetgroup',
'MM' => 'tx_tutvideoverwaltung_video_targetgroup_mm',
'size' => 10,
'autoSizeMax' => 30,
'maxitems' => 9999,
'multiple' => 0,
'wizards' => array(
'_PADDING' => 1,
'_VERTICAL' => 1,
'edit' => array(
'type' => 'popup',
'title' => 'Edit',
'script' => 'wizard_edit.php',
'icon' => 'edit2.gif',
'popup_onlyOpenIfSelected' => 1,
'JSopenParams' => 'height=350,width=580,status=0,menubar=0,scrollbars=1',
),
'add' => Array(
'type' => 'script',
'title' => 'Create new',
'icon' => 'add.gif',
'params' => array(
'table' => 'tx_tutvideoverwaltung_domain_model_targetgroup',
'pid' => '###CURRENT_PID###',
'setValue' => 'prepend'
),
'script' => 'wizard_add.php',
),
),
),
),
'complementary_video_u_i_d' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.complementary_video_u_i_d',
'config' => array(
'type' => 'select',
'foreign_table' => 'tx_tutvideoverwaltung_domain_model_video',
'MM' => 'tx_tutvideoverwaltung_video_complementaryvideouid_video_mm',
'size' => 10,
'autoSizeMax' => 30,
'maxitems' => 9999,
'multiple' => 0,
'wizards' => array(
'_PADDING' => 1,
'_VERTICAL' => 1,
'edit' => array(
'type' => 'popup',
'title' => 'Edit',
'script' => 'wizard_edit.php',
'icon' => 'edit2.gif',
'popup_onlyOpenIfSelected' => 1,
'JSopenParams' => 'height=350,width=580,status=0,menubar=0,scrollbars=1',
),
'add' => Array(
'type' => 'script',
'title' => 'Create new',
'icon' => 'add.gif',
'params' => array(
'table' => 'tx_tutvideoverwaltung_domain_model_video',
'pid' => '###CURRENT_PID###',
'setValue' => 'prepend'
),
'script' => 'wizard_add.php',
),
),
),
),
'further_video_u_i_d' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.further_video_u_i_d',
'config' => array(
'type' => 'select',
'foreign_table' => 'tx_tutvideoverwaltung_domain_model_video',
'MM' => 'tx_tutvideoverwaltung_video_furthervideouid_video_mm',
'size' => 10,
'autoSizeMax' => 30,
'maxitems' => 9999,
'multiple' => 0,
'wizards' => array(
'_PADDING' => 1,
'_VERTICAL' => 1,
'edit' => array(
'type' => 'popup',
'title' => 'Edit',
'script' => 'wizard_edit.php',
'icon' => 'edit2.gif',
'popup_onlyOpenIfSelected' => 1,
'JSopenParams' => 'height=350,width=580,status=0,menubar=0,scrollbars=1',
),
'add' => Array(
'type' => 'script',
'title' => 'Create new',
'icon' => 'add.gif',
'params' => array(
'table' => 'tx_tutvideoverwaltung_domain_model_video',
'pid' => '###CURRENT_PID###',
'setValue' => 'prepend'
),
'script' => 'wizard_add.php',
),
),
),
),
'supposed_video_u_i_d' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.supposed_video_u_i_d',
'config' => array(
'type' => 'select',
'foreign_table' => 'tx_tutvideoverwaltung_domain_model_video',
'MM' => 'tx_tutvideoverwaltung_video_video_mm',
'size' => 10,
'autoSizeMax' => 30,
'maxitems' => 9999,
'multiple' => 0,
'wizards' => array(
'_PADDING' => 1,
'_VERTICAL' => 1,
'edit' => array(
'type' => 'popup',
'title' => 'Edit',
'script' => 'wizard_edit.php',
'icon' => 'edit2.gif',
'popup_onlyOpenIfSelected' => 1,
'JSopenParams' => 'height=350,width=580,status=0,menubar=0,scrollbars=1',
),
'add' => Array(
'type' => 'script',
'title' => 'Create new',
'icon' => 'add.gif',
'params' => array(
'table' => 'tx_tutvideoverwaltung_domain_model_video',
'pid' => '###CURRENT_PID###',
'setValue' => 'prepend'
),
'script' => 'wizard_add.php',
),
),
),
),
'material_u_i_d' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.material_u_i_d',
'config' => array(
'type' => 'select',
'foreign_table' => 'tx_tutvideoverwaltung_domain_model_material',
'MM' => 'tx_tutvideoverwaltung_video_material_mm',
'size' => 10,
'autoSizeMax' => 30,
'maxitems' => 9999,
'multiple' => 0,
'wizards' => array(
'_PADDING' => 1,
'_VERTICAL' => 1,
'edit' => array(
'type' => 'popup',
'title' => 'Edit',
'script' => 'wizard_edit.php',
'icon' => 'edit2.gif',
'popup_onlyOpenIfSelected' => 1,
'JSopenParams' => 'height=350,width=580,status=0,menubar=0,scrollbars=1',
),
'add' => Array(
'type' => 'script',
'title' => 'Create new',
'icon' => 'add.gif',
'params' => array(
'table' => 'tx_tutvideoverwaltung_domain_model_material',
'pid' => '###CURRENT_PID###',
'setValue' => 'prepend'
),
'script' => 'wizard_add.php',
),
),
),
),
'author_u_i_d' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.author_u_i_d',
'config' => array(
'type' => 'select',
'foreign_table' => 'tx_tutvideoverwaltung_domain_model_author',
'MM' => 'tx_tutvideoverwaltung_video_author_mm',
'size' => 10,
'autoSizeMax' => 30,
'maxitems' => 9999,
'multiple' => 0,
'wizards' => array(
'_PADDING' => 1,
'_VERTICAL' => 1,
'edit' => array(
'type' => 'popup',
'title' => 'Edit',
'script' => 'wizard_edit.php',
'icon' => 'edit2.gif',
'popup_onlyOpenIfSelected' => 1,
'JSopenParams' => 'height=350,width=580,status=0,menubar=0,scrollbars=1',
),
'add' => Array(
'type' => 'script',
'title' => 'Create new',
'icon' => 'add.gif',
'params' => array(
'table' => 'tx_tutvideoverwaltung_domain_model_author',
'pid' => '###CURRENT_PID###',
'setValue' => 'prepend'
),
'script' => 'wizard_add.php',
),
),
),
),
'category_u_i_d' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.category_u_i_d',
'config' => array(
'type' => 'select',
'foreign_table' => 'tx_tutvideoverwaltung_domain_model_category',
'MM' => 'tx_tutvideoverwaltung_video_category_mm',
'size' => 10,
'autoSizeMax' => 30,
'maxitems' => 9999,
'multiple' => 0,
'wizards' => array(
'_PADDING' => 1,
'_VERTICAL' => 1,
'edit' => array(
'type' => 'popup',
'title' => 'Edit',
'script' => 'wizard_edit.php',
'icon' => 'edit2.gif',
'popup_onlyOpenIfSelected' => 1,
'JSopenParams' => 'height=350,width=580,status=0,menubar=0,scrollbars=1',
),
'add' => Array(
'type' => 'script',
'title' => 'Create new',
'icon' => 'add.gif',
'params' => array(
'table' => 'tx_tutvideoverwaltung_domain_model_category',
'pid' => '###CURRENT_PID###',
'setValue' => 'prepend'
),
'script' => 'wizard_add.php',
),
),
),
),
'fegroup_u_i_d' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.fegroup_u_i_d',
'config' => array(
'type' => 'select',
'foreign_table' => 'fe_groups',
'MM' => 'tx_tutvideoverwaltung_video_frontendusergroup_mm',
'size' => 10,
'autoSizeMax' => 30,
'maxitems' => 9999,
'multiple' => 0,
'wizards' => array(
'_PADDING' => 1,
'_VERTICAL' => 1,
'edit' => array(
'type' => 'popup',
'title' => 'Edit',
'script' => 'wizard_edit.php',
'icon' => 'edit2.gif',
'popup_onlyOpenIfSelected' => 1,
'JSopenParams' => 'height=350,width=580,status=0,menubar=0,scrollbars=1',
),
'add' => Array(
'type' => 'script',
'title' => 'Create new',
'icon' => 'add.gif',
'params' => array(
'table' => 'fe_groups',
'pid' => '###CURRENT_PID###',
'setValue' => 'prepend'
),
'script' => 'wizard_add.php',
),
),
),
),
'question_u_i_d' => array(
'exclude' => 1,
'label' => 'LLL:EXT:tutvideoverwaltung/Resources/Private/Language/locallang_db.xlf:tx_tutvideoverwaltung_domain_model_video.question_u_i_d',
'config' => array(
'type' => 'inline',
'foreign_table' => 'tx_tutvideoverwaltung_domain_model_question',
'foreign_field' => 'video',
'maxitems' => 9999,
'appearance' => array(
'collapseAll' => 0,
'levelLinksPosition' => 'top',
'showSynchronizationLink' => 1,
'showPossibleLocalizationRecords' => 1,
'showAllLocalizationLink' => 1
),
),
),
),
);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment