TYPO3 CMS  TYPO3_7-6
ext_tables.php
Go to the documentation of this file.
1 <?php
2 defined('TYPO3_MODE') or die();
3 
7 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_web_BlogExampleTxBlogexampleM1', 'EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_csh.xml');
8 
9 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'BlogExample setup');
10 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript/DefaultStyles', 'BlogExample CSS Styles (optional)');
11 
12 \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin($_EXTKEY, 'Blogs', 'Blog listing');
13 
14 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages(
15  'tx_blogexample_domain_model_blog,tx_blogexample_domain_model_post,tx_blogexample_domain_model_comment,tx_blogexample_domain_model_person,tx_blogexample_domain_model_tag'
16 );
17 $TCA['tx_blogexample_domain_model_blog'] = [
18  'ctrl' => [
19  'title' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_blog',
20  'label' => 'title',
21  'tstamp' => 'tstamp',
22  'crdate' => 'crdate',
23  'versioningWS' => true,
24  'versioning_followPages' => true,
25  'origUid' => 't3_origuid',
26  'languageField' => 'sys_language_uid',
27  'transOrigPointerField' => 'l18n_parent',
28  'transOrigDiffSourceField' => 'l18n_diffsource',
29  'delete' => 'deleted',
30  'enablecolumns' => [
31  'disabled' => 'hidden',
32  'fe_group' => 'fe_group',
33  ],
34  'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Configuration/TCA/Blog.php',
35  'iconfile' => 'EXT:blog_example/Resources/Public/Icons/icon_tx_blogexample_domain_model_blog.gif'
36  ]
37 ];
38 
39 $TCA['tx_blogexample_domain_model_post'] = [
40  'ctrl' => [
41  'title' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post',
42  'label' => 'title',
43  'label_alt' => 'author',
44  'label_alt_force' => true,
45  'tstamp' => 'tstamp',
46  'crdate' => 'crdate',
47  'versioningWS' => true,
48  'versioning_followPages' => true,
49  'origUid' => 't3_origuid',
50  'languageField' => 'sys_language_uid',
51  'transOrigPointerField' => 'l18n_parent',
52  'transOrigDiffSourceField' => 'l18n_diffsource',
53  'delete' => 'deleted',
54  'enablecolumns' => [
55  'disabled' => 'hidden'
56  ],
57  'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Configuration/TCA/Post.php',
58  'iconfile' => 'EXT:blog_example/Resources/Public/Icons/icon_tx_blogexample_domain_model_post.gif'
59  ]
60 ];
61 
62 $TCA['tx_blogexample_domain_model_comment'] = [
63  'ctrl' => [
64  'title' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_comment',
65  'label' => 'date',
66  'label_alt' => 'author',
67  'label_alt_force' => true,
68  'tstamp' => 'tstamp',
69  'crdate' => 'crdate',
70  'delete' => 'deleted',
71  'enablecolumns' => [
72  'disabled' => 'hidden'
73  ],
74  'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Configuration/TCA/Comment.php',
75  'iconfile' => 'EXT:blog_example/Resources/Public/Icons/icon_tx_blogexample_domain_model_comment.gif'
76  ]
77 ];
78 
79 $TCA['tx_blogexample_domain_model_person'] = [
80  'ctrl' => [
81  'title' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_person',
82  'label' => 'lastname',
83  'label_alt' => 'firstname',
84  'label_alt_force' => true,
85  'tstamp' => 'tstamp',
86  'crdate' => 'crdate',
87  'versioningWS' => true,
88  'versioning_followPages' => true,
89  'origUid' => 't3_origuid',
90  'prependAtCopy' => 'LLL:EXT:lang/locallang_general.xml:LGL.prependAtCopy',
91  'delete' => 'deleted',
92  'enablecolumns' => [
93  'disabled' => 'hidden'
94  ],
95  'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Configuration/TCA/Person.php',
96  'iconfile' => 'EXT:blog_example/Resources/Public/Icons/icon_tx_blogexample_domain_model_person.gif'
97  ]
98 ];
99 
100 $TCA['tx_blogexample_domain_model_tag'] = [
101  'ctrl' => [
102  'title' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_tag',
103  'label' => 'name',
104  'tstamp' => 'tstamp',
105  'crdate' => 'crdate',
106  'delete' => 'deleted',
107  'enablecolumns' => [
108  'disabled' => 'hidden'
109  ],
110  'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Configuration/TCA/Tag.php',
111  'iconfile' => 'EXT:blog_example/Resources/Public/Icons/icon_tx_blogexample_domain_model_tag.gif'
112  ]
113 ];
114 
115 if (is_array($TCA['fe_users']['columns']['tx_extbase_type'])) {
116  $TCA['fe_users']['types']['Tx_BlogExample_Domain_Model_Administrator'] = $TCA['fe_users']['types']['0'];
117  array_push($TCA['fe_users']['columns']['tx_extbase_type']['config']['items'], ['LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:fe_users.tx_extbase_type.Tx_BlogExample_Domain_Model_Administrator', 'Tx_BlogExample_Domain_Model_Administrator']);
118 }
119 
120 // Categorize Blog,Post records
121 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::makeCategorizable($_EXTKEY, 'tx_blogexample_domain_model_blog');
122 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::makeCategorizable($_EXTKEY, 'tx_blogexample_domain_model_post');
if(!defined("DB_ERROR")) define("DB_ERROR"
$TCA['tx_blogexample_domain_model_blog']
Definition: ext_tables.php:17