bookmark-pages/Configuration/TCA/tx_bookmarkslikesratings_domain_model_vote.php

109 lines
3.7 KiB
PHP
Raw Normal View History

2021-08-17 19:45:38 +02:00
<?php
return [
'ctrl' => [
'title' => 'LLL:EXT:bookmarks_likes_ratings/Resources/Private/Language/locallang.xlf:tca.model.vote.title',
'label' => 'uid',
'label_alt' => 'rating,fe_user,vote',
'label_userFunc' => 'WapplerSystems\\BookmarksLikesRatings\\Userfuncs\\Tca->getVoteRecordTitle',
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'delete' => 'deleted',
'adminOnly' => true,
'hideTable' => true,
'editlock' => 'rating',
'enablecolumns' => [
'disabled' => 'hidden',
],
'iconfile' => 'EXT:bookmarks_likes_ratings/Resources/Public/Icons/tx_bookmarkslikesratings_domain_model_vote.gif',
],
'interface' => [
'showRecordFieldList' => 'hidden, rating, voter, vote',
],
'columns' => [
'pid' => [
'exclude' => 1,
'config' => [
'type' => 'none',
],
],
'hidden' => [
'exclude' => 1,
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.hidden',
'config' => [
'type' => 'check',
],
],
'rating' => [
'exclude' => 1,
'label' => 'LLL:EXT:bookmarks_likes_ratings/Resources/Private/Language/locallang.xlf:tca.model.vote.rating',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'foreign_table' => 'tx_bookmarkslikesratings_domain_model_rating',
'maxitems' => 1,
'minitems' => 1,
'disableNoMatchingValueElement' => 1,
],
],
2021-08-20 13:33:13 +02:00
'user' => [
2021-08-17 19:45:38 +02:00
'exclude' => 1,
2021-08-20 13:33:13 +02:00
'label' => 'LLL:EXT:bookmarks_likes_ratings/Resources/Private/Language/locallang.xlf:tca.model.vote.user',
2021-08-17 19:45:38 +02:00
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'foreign_table' => 'fe_users',
'foreign_table_where' => 'ORDER BY fe_users.username',
'items' => [
[
'--div--', 0
],
],
'fieldControl' => [
'editPopup' => [
'disabled' => false,
],
'addRecord' => [
'disabled' => false,
'options' => [
'setValue' => 'prepend',
],
'listModule' => [
'disabled' => false,
],
],
],
],
],
//TODO Prio 3: only provide valid references from foreign table
'vote' => [
'label' => 'LLL:EXT:bookmarks_likes_ratings/Resources/Private/Language/locallang.xlf:tca.model.vote.vote',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'foreign_table' => 'tx_bookmarkslikesratings_domain_model_stepconf',
'maxitems' => 1,
'minitems' => 1,
'disableNoMatchingValueElement' => 1,
],
],
'uid' => [
'label' => 'LLL:EXT:bookmarks_likes_ratings/Resources/Private/Language/locallang.xlf:tca.model.vote.uid',
'config' => [
'type' => 'none'
],
],
],
'types' => [
'1' => [
'showitem' => 'hidden, rating, voter, vote'
],
],
'palettes' => [
'1' => [
'showitem' => ''
],
],
];