Commit d467e2ed authored by Stefan Busemann's avatar Stefan Busemann
Browse files

[TASK] Add TCA and Table for member statistic

parent 02460b3f
Pipeline #13370 passed with stage
in 1 minute and 37 seconds
<?php
if (!defined('TYPO3_MODE')) {
die ('Access denied.');
}
return [
'ctrl' => [
'title' => 'LLL:EXT:t3o_membership/Resources/Private/Language/locallang_db.xlf:tx_t3omembership_domain_model_member_statistic',
'label_alt' => 'year,month,membership',
'label_alt_force' => true,
'tstamp' => 'tstamp',
'crdate' => 'crdate',
'cruser_id' => 'cruser_id',
'dividers2tabs' => true,
'delete' => 'deleted',
'enablecolumns' => [
'disabled' => 'hidden',
'starttime' => 'starttime',
'endtime' => 'endtime',
],
'searchFields' => 'year, month, membership',
'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('t3o_membership') . 'Configuration/TCA/tx_t3omembership_domain_model_member_statistic.php',
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('t3o_membership') . 'Resources/Public/Icons/tx_t3omembership_domain_model_member.gif'
],
'interface' => [
'showRecordFieldList' => 'year, month, membership, count',
],
'types' => [
'1' => ['showitem' => 'year, month, membership, count, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,starttime, endtime'],
],
'palettes' => [
'1' => ['showitem' => ''],
],
'columns' => [
'hidden' => [
'exclude' => true,
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.hidden',
'config' => [
'type' => 'check',
'renderType' => 'checkboxToggle',
'default' => 0,
'items' => [
[
0 => '',
1 => '',
]
],
]
],
'starttime' => [
'exclude' => true,
'label' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:starttime_formlabel',
'config' => [
'type' => 'input',
'renderType' => 'inputDateTime',
'size' => 16,
'eval' => 'datetime,int',
'default' => 0,
'behaviour' => [
'allowLanguageSynchronization' => true,
],
]
],
'endtime' => [
'exclude' => true,
'label' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:endtime_formlabel',
'config' => [
'type' => 'input',
'renderType' => 'inputDateTime',
'size' => 16,
'eval' => 'datetime,int',
'default' => 0,
'behaviour' => [
'allowLanguageSynchronization' => true,
],
]
],
'month' => [
'exclude' => 0,
'label' => 'LLL:EXT:t3o_membership/Resources/Private/Language/locallang_db.xlf:tx_t3omembership_domain_model_member_statistic.month',
'config' => [
'type' => 'input',
'size' => 2,
'eval' => 'int, required'
],
],
'year' => [
'exclude' => 0,
'label' => 'LLL:EXT:t3o_membership/Resources/Private/Language/locallang_db.xlf:tx_t3omembership_domain_model_member_statistic.year',
'config' => [
'type' => 'input',
'size' => 4,
'eval' => 'int,required'
],
],
'count' => [
'exclude' => 0,
'label' => 'LLL:EXT:t3o_membership/Resources/Private/Language/locallang_db.xlf:tx_t3omembership_domain_model_member_statistic.count',
'config' => [
'type' => 'input',
'size' => 10,
'eval' => 'int,required'
],
],
'membership' => [
'exclude' => 0,
'label' => 'LLL:EXT:t3o_membership/Resources/Private/Language/locallang_db.xlf:tx_t3omembership_domain_model_member.membership',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'foreign_table' => 'tx_t3omembership_domain_model_membership',
'minitems' => 0,
'maxitems' => 1,
],
],
],
];
...@@ -78,6 +78,13 @@ ...@@ -78,6 +78,13 @@
<trans-unit id="tx_t3omembership_task_importmemberstask.description"> <trans-unit id="tx_t3omembership_task_importmemberstask.description">
<source>Import members from CSV file</source> <source>Import members from CSV file</source>
</trans-unit> </trans-unit>
<trans-unit id="tx_t3omembership_domain_model_member_statistic">
<source>Member Statistic</source>
</trans-unit>
<trans-unit id="tx_t3omembership_domain_model_member_statistic">
<source>Member Statistic</source>
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>
\ No newline at end of file
...@@ -86,3 +86,24 @@ CREATE TABLE tx_t3omembership_domain_model_membership ( ...@@ -86,3 +86,24 @@ CREATE TABLE tx_t3omembership_domain_model_membership (
KEY language (l10n_parent,sys_language_uid) KEY language (l10n_parent,sys_language_uid)
); );
CREATE TABLE tx_t3omembership_domain_model_member_statistic (
uid int(11) NOT NULL auto_increment,
pid int(11) DEFAULT '0' NOT NULL,
month int(11) DEFAULT '0' NOT NULL,
year int(11) DEFAULT '0' NOT NULL,
membership int(11) unsigned DEFAULT '0',
count int(11) unsigned DEFAULT '0',
tstamp int(11) unsigned DEFAULT '0' NOT NULL,
crdate int(11) unsigned DEFAULT '0' NOT NULL,
cruser_id int(11) unsigned DEFAULT '0' NOT NULL,
deleted tinyint(4) unsigned DEFAULT '0' NOT NULL,
hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
starttime int(11) unsigned DEFAULT '0' NOT NULL,
endtime int(11) unsigned DEFAULT '0' NOT NULL,
sorting int(11) unsigned DEFAULT '0' NOT NULL,
PRIMARY KEY (uid),
KEY parent (pid)
);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment