d0bf6339992c8b10932700a2aff7450a8dbf5a51
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Tests / Functional / Fixtures / Extensions / blog_example / ext_tables.php
1 <?php
2 defined('TYPO3_MODE') or die();
3
4 /**
5 * Add labels for context sensitive help (CSH)
6 */
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\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_blogexample_domain_model_blog');
13 $TCA['tx_blogexample_domain_model_blog'] = array (
14 'ctrl' => array (
15 'title' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_blog',
16 'label' => 'title',
17 'tstamp' => 'tstamp',
18 'crdate' => 'crdate',
19 'versioningWS' => 2,
20 'versioning_followPages' => true,
21 'origUid' => 't3_origuid',
22 'languageField' => 'sys_language_uid',
23 'transOrigPointerField' => 'l18n_parent',
24 'transOrigDiffSourceField' => 'l18n_diffsource',
25 'delete' => 'deleted',
26 'enablecolumns' => array(
27 'disabled' => 'hidden'
28 ),
29 'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Configuration/TCA/Blog.php',
30 'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Icons/icon_tx_blogexample_domain_model_blog.gif'
31 )
32 );
33
34 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_blogexample_domain_model_post');
35 $TCA['tx_blogexample_domain_model_post'] = array (
36 'ctrl' => array (
37 'title' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post',
38 'label' => 'title',
39 'label_alt' => 'author',
40 'label_alt_force' => TRUE,
41 'tstamp' => 'tstamp',
42 'crdate' => 'crdate',
43 'versioningWS' => 2,
44 'versioning_followPages' => true,
45 'origUid' => 't3_origuid',
46 'languageField' => 'sys_language_uid',
47 'transOrigPointerField' => 'l18n_parent',
48 'transOrigDiffSourceField' => 'l18n_diffsource',
49 'delete' => 'deleted',
50 'enablecolumns' => array(
51 'disabled' => 'hidden'
52 ),
53 'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Configuration/TCA/Post.php',
54 'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Icons/icon_tx_blogexample_domain_model_post.gif'
55 )
56 );
57
58 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_blogexample_domain_model_comment');
59 $TCA['tx_blogexample_domain_model_comment'] = array (
60 'ctrl' => array (
61 'title' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_comment',
62 'label' => 'date',
63 'label_alt' => 'author',
64 'label_alt_force' => TRUE,
65 'tstamp' => 'tstamp',
66 'crdate' => 'crdate',
67 'delete' => 'deleted',
68 'enablecolumns' => array (
69 'disabled' => 'hidden'
70 ),
71 'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Configuration/TCA/Comment.php',
72 'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Icons/icon_tx_blogexample_domain_model_comment.gif'
73 )
74 );
75
76 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_blogexample_domain_model_person');
77 $TCA['tx_blogexample_domain_model_person'] = array (
78 'ctrl' => array (
79 'title' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_person',
80 'label' => 'lastname',
81 'label_alt' => 'firstname',
82 'label_alt_force' => TRUE,
83 'tstamp' => 'tstamp',
84 'crdate' => 'crdate',
85 'versioningWS' => 2,
86 'versioning_followPages' => true,
87 'origUid' => 't3_origuid',
88 'prependAtCopy' => 'LLL:EXT:lang/locallang_general.xml:LGL.prependAtCopy',
89 'delete' => 'deleted',
90 'enablecolumns' => array(
91 'disabled' => 'hidden'
92 ),
93 'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Configuration/TCA/Person.php',
94 'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Icons/icon_tx_blogexample_domain_model_person.gif'
95 )
96 );
97
98 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_blogexample_domain_model_tag');
99 $TCA['tx_blogexample_domain_model_tag'] = array (
100 'ctrl' => array (
101 'title' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_tag',
102 'label' => 'name',
103 'tstamp' => 'tstamp',
104 'crdate' => 'crdate',
105 'delete' => 'deleted',
106 'enablecolumns' => array (
107 'disabled' => 'hidden'
108 ),
109 'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Configuration/TCA/Tag.php',
110 'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Icons/icon_tx_blogexample_domain_model_tag.gif'
111 )
112 );
113
114 if (is_array($TCA['fe_users']['columns']['tx_extbase_type'])) {
115 $TCA['fe_users']['types']['Tx_BlogExample_Domain_Model_Administrator'] = $TCA['fe_users']['types']['0'];
116 array_push($TCA['fe_users']['columns']['tx_extbase_type']['config']['items'], array('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'));
117 }
118
119 // Categorize Post records
120 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::makeCategorizable($_EXTKEY, 'tx_blogexample_domain_model_post');