forked from TYPO3-svn-archive/t3quotes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathext_localconf.php
80 lines (72 loc) · 3.32 KB
/
ext_localconf.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?php
defined('TYPO3_MODE') || die('Access denied.');
function configureT3quotesPlugin()
{
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'WDB.T3quotes',
'T3quotes',
['T3quotes' => 'list,show,new,create,edit,update,delete'],
// non-cacheable actions
['T3quotes' => 'create,edit,update,delete']
);
}
function configureT3quotesWizards($v='')
{
if ($v === 'v7') {
// # Breaking #80700 Deprecated functionality removed (9.0)
// # Breaking Deprecation: #78193 - ExtensionManagementUtility::extRelPath() (8.4)
$icon = 'icon = ' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('t3quotes') . 'Resources/Public/Icons/user_plugin_t3quotes.svg';
} elseif ($v === 'v8+') {
$icon = 'iconIdentifier = t3quotes-plugin-t3quotes';
}
// wizards
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
'mod {
wizards.newContentElement.wizardItems.plugins {
elements {
t3quotes {
' . $icon . '
title = LLL:EXT:t3quotes/Resources/Private/Language/locallang_db.xlf:tx_t3quotes_domain_model_t3quotes.ce-wizard.name
description = LLL:EXT:t3quotes/Resources/Private/Language/locallang_db.xlf:tx_t3quotes_domain_model_t3quotes.ce-wizard.description
tt_content_defValues {
CType = list
list_type = t3quotes_t3quotes
}
}
}
show = *
}
}'
);
}
function addT3quotesIconToRegistry()
{
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
$iconRegistry->registerIcon(
't3quotes-plugin-t3quotes',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:t3quotes/Resources/Public/Icons/user_plugin_t3quotes.svg']
);
}
$t3Version = TYPO3\CMS\Core\Utility\VersionNumberUtility::getNumericTypo3Version(TYPO3_version);
if (version_compare($t3Version, '8.0.0', '<')) {
call_user_func(function () {
configureT3quotesPlugin();
configureT3quotesWizards('v7');
// addT3quotesIconToRegistry();
}, $_EXTKEY);
} else {
call_user_func(function () {
configureT3quotesPlugin();
configureT3quotesWizards('v8+');
addT3quotesIconToRegistry();
});
}
// cache for storing typoscript-constants
if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['t3quotes_t3quotes'])) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['t3quotes_t3quotes'] = [];
}
// Deutsche Übersetzungen
// $GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride']['de']['EXT:t3quotes/Resources/Private/Language/locallang.xlf'][] = 'EXT:t3quotes/Resources/Private/Language/de.locallang.xlf';
// $GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride']['de']['EXT:t3quotes/Resources/Private/Language/locallang_csh_tx_t3quotes_domain_model_t3quotes.xlf'][] = 'EXT:t3quotes/Resources/Private/Language/de.locallang_csh_tx_t3quotes_domain_model_t3quotes.xlf';
// $GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride']['de']['EXT:t3quotes/Resources/Private/Language/locallang_db.xlf'][] = 'EXT:t3quotes/Resources/Private/Language/de.locallang_db.xlf';