forked from pixelant/pxa_social_feed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_tables.php
57 lines (52 loc) · 2.32 KB
/
ext_tables.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
defined('TYPO3_MODE') or die();
call_user_func(
function ($_EXTKEY) {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
$_EXTKEY,
'Showfeed',
'Pxa Social Feed'
);
if (TYPO3_MODE === 'BE') {
/**
* Registers a Backend Module
*/
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'Pixelant.' . $_EXTKEY,
'tools', // Make module a submodule of 'tools'
'pxasocialfeed', // Submodule key
'', // Position
[// @codingStandardsIgnoreStart
'SocialFeedAdministration' => 'index,manageConfiguration,manageToken,saveToken,deleteToken,addAccessToken,deleteConfiguration,saveConfiguration'
],// @codingStandardsIgnoreEnd
[
'access' => 'user,group',
'icon' => 'EXT:' . $_EXTKEY . '/Resources/Public/Icons/BE/feed.svg',
'labels' => 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_be.xlf'
]
);
}
// @codingStandardsIgnoreStart
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist']['pxasocialfeed_showfeed'] = 'pages,recursive,layout,select_key';
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['pxasocialfeed_showfeed'] = 'pi_flexform';
// @codingStandardsIgnoreEnd
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
'pxasocialfeed_showfeed',
'FILE:EXT:' . $_EXTKEY . '/Configuration/FlexForm/SocialFeed.xml'
);
foreach (['feed', 'token', 'configuration'] as $table) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages(
'tx_pxasocialfeed_domain_model_' . $table
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr(
'tx_pxasocialfeed_domain_model_' . $table,
sprintf(
'EXT:%s/Resources/Private/Language/locallang_csh_tx_pxasocialfeed_domain_model_%s.xlf',
$_EXTKEY,
$table
)
);
}
},
'pxa_social_feed'
);