[TASK] Add functional tests for dynamic values in Extbase query cache
[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\Extbase\Utility\ExtensionUtility::registerPlugin($_EXTKEY, 'Blogs', 'Blog listing');
13
14 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_blogexample_domain_model_blog');
15 $TCA['tx_blogexample_domain_model_blog'] = array (
16 'ctrl' => array (
17 'title' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_blog',
18 'label' => 'title',
19 'tstamp' => 'tstamp',
20 'crdate' => 'crdate',
21 'versioningWS' => 2,
22 'versioning_followPages' => true,
23 'origUid' => 't3_origuid',
24 'languageField' => 'sys_language_uid',
25 'transOrigPointerField' => 'l18n_parent',
26 'transOrigDiffSourceField' => 'l18n_diffsource',
27 'delete' => 'deleted',
28 'enablecolumns' => array(
29 'disabled' => 'hidden',
30 'fe_group' => 'fe_group',
31 ),
32 'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Configuration/TCA/Blog.php',
33 'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Icons/icon_tx_blogexample_domain_model_blog.gif'
34 )
35 );
36
37 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_blogexample_domain_model_post');
38 $TCA['tx_blogexample_domain_model_post'] = array (
39 'ctrl' => array (
40 'title' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_post',
41 'label' => 'title',
42 'label_alt' => 'author',
43 'label_alt_force' => TRUE,
44 'tstamp' => 'tstamp',
45 'crdate' => 'crdate',
46 'versioningWS' => 2,
47 'versioning_followPages' => true,
48 'origUid' => 't3_origuid',
49 'languageField' => 'sys_language_uid',
50 'transOrigPointerField' => 'l18n_parent',
51 'transOrigDiffSourceField' => 'l18n_diffsource',
52 'delete' => 'deleted',
53 'enablecolumns' => array(
54 'disabled' => 'hidden'
55 ),
56 'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Configuration/TCA/Post.php',
57 'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Icons/icon_tx_blogexample_domain_model_post.gif'
58 )
59 );
60
61 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_blogexample_domain_model_comment');
62 $TCA['tx_blogexample_domain_model_comment'] = array (
63 'ctrl' => array (
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' => array (
72 'disabled' => 'hidden'
73 ),
74 'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Configuration/TCA/Comment.php',
75 'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Icons/icon_tx_blogexample_domain_model_comment.gif'
76 )
77 );
78
79 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_blogexample_domain_model_person');
80 $TCA['tx_blogexample_domain_model_person'] = array (
81 'ctrl' => array (
82 'title' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_person',
83 'label' => 'lastname',
84 'label_alt' => 'firstname',
85 'label_alt_force' => TRUE,
86 'tstamp' => 'tstamp',
87 'crdate' => 'crdate',
88 'versioningWS' => 2,
89 'versioning_followPages' => true,
90 'origUid' => 't3_origuid',
91 'prependAtCopy' => 'LLL:EXT:lang/locallang_general.xml:LGL.prependAtCopy',
92 'delete' => 'deleted',
93 'enablecolumns' => array(
94 'disabled' => 'hidden'
95 ),
96 'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Configuration/TCA/Person.php',
97 'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Icons/icon_tx_blogexample_domain_model_person.gif'
98 )
99 );
100
101 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_blogexample_domain_model_tag');
102 $TCA['tx_blogexample_domain_model_tag'] = array (
103 'ctrl' => array (
104 'title' => 'LLL:EXT:blog_example/Resources/Private/Language/locallang_db.xml:tx_blogexample_domain_model_tag',
105 'label' => 'name',
106 'tstamp' => 'tstamp',
107 'crdate' => 'crdate',
108 'delete' => 'deleted',
109 'enablecolumns' => array (
110 'disabled' => 'hidden'
111 ),
112 'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Configuration/TCA/Tag.php',
113 'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Icons/icon_tx_blogexample_domain_model_tag.gif'
114 )
115 );
116
117 if (is_array($TCA['fe_users']['columns']['tx_extbase_type'])) {
118 $TCA['fe_users']['types']['Tx_BlogExample_Domain_Model_Administrator'] = $TCA['fe_users']['types']['0'];
119 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'));
120 }
121
122 // Categorize Blog,Post records
123 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::makeCategorizable($_EXTKEY, 'tx_blogexample_domain_model_blog');
124 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::makeCategorizable($_EXTKEY, 'tx_blogexample_domain_model_post');