[BUGFIX] Add language configuration for model tag in EXT:blog_example 41/58041/2
authorŁukasz Uznański <l.uznanski@macopedia.pl>
Sun, 26 Aug 2018 13:59:49 +0000 (15:59 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Sun, 26 Aug 2018 14:25:07 +0000 (16:25 +0200)
Add language configuratin for model tag in EXT:blog_example, reformat TCA files,
unify sys_language_uid field configuration across all TCA files in extension

Resolves: #85983
Releases: master
Change-Id: I8e32f389216e279d59ed92a3af7e870d076b35a8
Reviewed-on: https://review.typo3.org/58041
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Tested-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Configuration/TCA/tx_blogexample_domain_model_blog.php
typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Configuration/TCA/tx_blogexample_domain_model_comment.php
typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Configuration/TCA/tx_blogexample_domain_model_post.php
typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Configuration/TCA/tx_blogexample_domain_model_tag.php

index 7bbf4bf..8b82a2f 100644 (file)
@@ -27,11 +27,13 @@ return [
             'config' => [
                 'type' => 'select',
                 'renderType' => 'selectSingle',
-                'foreign_table' => 'sys_language',
-                'foreign_table_where' => 'ORDER BY sys_language.title',
+                'special' => 'languages',
                 'items' => [
-                    ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1],
-                    ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0]
+                    [
+                        'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages',
+                        -1,
+                        'flags-multiple'
+                    ],
                 ],
                 'default' => 0
             ]
@@ -51,7 +53,7 @@ return [
             ]
         ],
         'l18n_diffsource' => [
-            'config'=>[
+            'config' => [
                 'type' => 'passthrough',
                 'default' => ''
             ]
@@ -60,7 +62,7 @@ return [
             'displayCond' => 'FIELD:t3ver_label:REQ:true',
             'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.versionLabel',
             'config' => [
-                'type'=>'none',
+                'type' => 'none',
                 'cols' => 27
             ]
         ],
index 7f1d16a..b989779 100644 (file)
@@ -5,10 +5,10 @@ return [
         'label' => 'date',
         'label_alt' => 'author',
         'label_alt_force' => true,
-        'tstamp'   => 'tstamp',
-        'crdate'   => 'crdate',
-        'delete'   => 'deleted',
-        'enablecolumns'  => [
+        'tstamp' => 'tstamp',
+        'crdate' => 'crdate',
+        'delete' => 'deleted',
+        'enablecolumns' => [
             'disabled' => 'hidden'
         ],
         'iconfile' => 'EXT:blog_example/Resources/Public/Icons/icon_tx_blogexample_domain_model_comment.gif'
index 106b552..b4f156e 100644 (file)
@@ -5,16 +5,16 @@ return [
         'label' => 'title',
         'label_alt' => 'author',
         'label_alt_force' => true,
-        'tstamp'   => 'tstamp',
-        'crdate'   => 'crdate',
+        'tstamp' => 'tstamp',
+        'crdate' => 'crdate',
         'versioningWS' => true,
         'origUid' => 't3_origuid',
         'languageField' => 'sys_language_uid',
         'transOrigPointerField' => 'l18n_parent',
         'transOrigDiffSourceField' => 'l18n_diffsource',
-        'delete'   => 'deleted',
+        'delete' => 'deleted',
         'sortby' => 'sorting',
-        'enablecolumns'  => [
+        'enablecolumns' => [
             'disabled' => 'hidden'
         ],
         'iconfile' => 'EXT:blog_example/Resources/Public/Icons/icon_tx_blogexample_domain_model_post.gif'
@@ -34,11 +34,13 @@ return [
             'config' => [
                 'type' => 'select',
                 'renderType' => 'selectSingle',
-                'foreign_table' => 'sys_language',
-                'foreign_table_where' => 'ORDER BY sys_language.title',
+                'special' => 'languages',
                 'items' => [
-                    ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1],
-                    ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0]
+                    [
+                        'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages',
+                        -1,
+                        'flags-multiple'
+                    ],
                 ],
                 'default' => 0
             ]
@@ -58,7 +60,7 @@ return [
             ]
         ],
         'l18n_diffsource' => [
-            'config'=>[
+            'config' => [
                 'type' => 'passthrough',
                 'default' => ''
             ]
index d396996..6c66fd7 100644 (file)
@@ -2,12 +2,16 @@
 
 return [
     'ctrl' => [
-        'title'    => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_tag',
+        'title' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_tag',
         'label' => 'name',
-        'tstamp'   => 'tstamp',
-        'crdate'   => 'crdate',
-        'delete'   => 'deleted',
-        'enablecolumns'  => [
+        'tstamp' => 'tstamp',
+        'crdate' => 'crdate',
+        'versioningWS' => true,
+        'languageField' => 'sys_language_uid',
+        'transOrigPointerField' => 'l18n_parent',
+        'transOrigDiffSourceField' => 'l18n_diffsource',
+        'delete' => 'deleted',
+        'enablecolumns' => [
             'disabled' => 'hidden'
         ],
         'iconfile' => 'EXT:blog_example/Resources/Public/Icons/icon_tx_blogexample_domain_model_tag.gif'
@@ -22,11 +26,13 @@ return [
             'config' => [
                 'type' => 'select',
                 'renderType' => 'selectSingle',
-                'foreign_table' => 'sys_language',
-                'foreign_table_where' => 'ORDER BY sys_language.title',
+                'special' => 'languages',
                 'items' => [
-                    ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages', -1],
-                    ['LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.default_value', 0]
+                    [
+                        'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.allLanguages',
+                        -1,
+                        'flags-multiple'
+                    ],
                 ],
                 'default' => 0
             ]
@@ -46,7 +52,7 @@ return [
             ]
         ],
         'l18n_diffsource' => [
-            'config'=>[
+            'config' => [
                 'type' => 'passthrough',
                 'default' => '',
             ],