Skip to content
Snippets Groups Projects
Commit 1dccc223 authored by Fabian Galinski's avatar Fabian Galinski :pouting_cat:
Browse files

[FEATURE] Adds mulitlanguage to the author, because of the description

parent e056c3f0
No related branches found
No related tags found
No related merge requests found
...@@ -40,10 +40,14 @@ return [ ...@@ -40,10 +40,14 @@ return [
'disabled' => 'hidden', 'disabled' => 'hidden',
], ],
'default_sortby' => 'crdate DESC', 'default_sortby' => 'crdate DESC',
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l10n_parent',
'transOrigDiffSourceField' => 'l10n_diffsource',
'iconfile' => 'EXT:sg_news/Resources/Public/Icons/module-sgnews.svg' 'iconfile' => 'EXT:sg_news/Resources/Public/Icons/module-sgnews.svg'
], ],
'interface' => [ 'interface' => [
'showRecordFieldList' => 'hidden, crdate, name, email, description, website, image, path_segment', 'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, crdate, name, email,
description, website, image, path_segment',
], ],
'types' => [ 'types' => [
'1' => [ '1' => [
...@@ -76,13 +80,53 @@ return [ ...@@ -76,13 +80,53 @@ return [
], ],
'hidden' => [ 'hidden' => [
'exclude' => TRUE, 'exclude' => TRUE,
'l10n_mode' => 'exclude',
'label' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:hidden.I.0', 'label' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:hidden.I.0',
'config' => [ 'config' => [
'type' => 'check', 'type' => 'check',
], ],
], ],
'sys_language_uid' => [
'exclude' => TRUE,
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'special' => 'languages',
'default' => 0,
'items' => [
[
'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages',
-1,
'flags-multiple'
]
]
]
],
'l10n_parent' => [
'displayCond' => 'FIELD:sys_language_uid:>:0',
'exclude' => TRUE,
'label' => 'LLL:EXT:lang/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
'config' => [
'type' => 'select',
'renderType' => 'selectSingle',
'items' => [
['', 0]
],
'foreign_table' => 'tx_sgnews_domain_model_author',
'foreign_table_where' => 'AND tx_sgnews_domain_model_author.uid=###REC_FIELD_l10n_parent### AND tx_sgnews_domain_model_author.sys_language_uid IN (-1,0)',
'default' => 0
]
],
'l10n_diffsource' => [
'config' => [
'type' => 'passthrough',
'default' => ''
]
],
'website' => [ 'website' => [
'exclude' => FALSE, 'exclude' => FALSE,
'l10n_mode' => 'exclude',
'label' => 'LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:tx_sgnews_domain_model_author.website', 'label' => 'LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:tx_sgnews_domain_model_author.website',
'config' => [ 'config' => [
'type' => 'input', 'type' => 'input',
...@@ -92,6 +136,7 @@ return [ ...@@ -92,6 +136,7 @@ return [
], ],
'name' => [ 'name' => [
'exclude' => FALSE, 'exclude' => FALSE,
'l10n_mode' => 'exclude',
'label' => 'LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:tx_sgnews_domain_model_author.name', 'label' => 'LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:tx_sgnews_domain_model_author.name',
'config' => [ 'config' => [
'type' => 'input', 'type' => 'input',
...@@ -101,6 +146,7 @@ return [ ...@@ -101,6 +146,7 @@ return [
], ],
'email' => [ 'email' => [
'exclude' => FALSE, 'exclude' => FALSE,
'l10n_mode' => 'exclude',
'label' => 'LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:tx_sgnews_domain_model_author.email', 'label' => 'LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:tx_sgnews_domain_model_author.email',
'config' => [ 'config' => [
'type' => 'input', 'type' => 'input',
...@@ -120,6 +166,7 @@ return [ ...@@ -120,6 +166,7 @@ return [
], ],
'image' => [ 'image' => [
'exclude' => TRUE, 'exclude' => TRUE,
'l10n_mode' => 'exclude',
'label' => 'LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:tx_sgnews_domain_model_author.image', 'label' => 'LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:tx_sgnews_domain_model_author.image',
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig( 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
'files', [ 'files', [
...@@ -133,6 +180,7 @@ return [ ...@@ -133,6 +180,7 @@ return [
], ],
'path_segment' => [ 'path_segment' => [
'label' => 'LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:tx_sgnews_domain_model_author.path_segment', 'label' => 'LLL:EXT:sg_news/Resources/Private/Language/locallang_db.xlf:tx_sgnews_domain_model_author.path_segment',
'l10n_mode' => 'exclude',
'config' => [ 'config' => [
'type' => 'slug', 'type' => 'slug',
'generatorOptions' => [ 'generatorOptions' => [
......
...@@ -39,6 +39,11 @@ CREATE TABLE tx_sgnews_domain_model_author ( ...@@ -39,6 +39,11 @@ CREATE TABLE tx_sgnews_domain_model_author (
deleted tinyint(4) unsigned DEFAULT '0' NOT NULL, deleted tinyint(4) unsigned DEFAULT '0' NOT NULL,
hidden tinyint(4) unsigned DEFAULT '0' NOT NULL, hidden tinyint(4) unsigned DEFAULT '0' NOT NULL,
sys_language_uid int(11) DEFAULT '0' NOT NULL,
l10n_parent int(11) DEFAULT '0' NOT NULL,
l10n_diffsource mediumblob,
PRIMARY KEY (uid), PRIMARY KEY (uid),
KEY parent (pid) KEY parent (pid),
KEY language (l10n_parent,sys_language_uid)
); );
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment