forked from pixelant/pxa_social_feed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_localconf.php
70 lines (62 loc) · 2.96 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
<?php
defined('TYPO3_MODE') or die();
call_user_func(
function ($_EXTKEY) {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'Pixelant.' . $_EXTKEY,
'Showfeed',
[
'Feeds' => 'list, loadFeedAjax, listAjax'
],
// non-cacheable actions
[
'Feeds' => 'list, loadFeedAjax'
]
);
$ll = 'LLL:EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_db.xlf:';
// @codingStandardsIgnoreStart
# Import task
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\Pixelant\PxaSocialFeed\Task\ImportTask::class] = [
'extension' => $_EXTKEY,
'title' => $ll . 'tx_pxasocialfeed.task.import.name',
'description' => $ll . 'tx_pxasocialfeed.task.import.description',
'additionalFields' => \Pixelant\PxaSocialFeed\Task\ImportTaskAdditionalFieldProvider::class
];
# Clean up task
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\Pixelant\PxaSocialFeed\Task\CleanUpTask::class] = [
'extension' => $_EXTKEY,
'title' => $ll . 'tx_pxasocialfeed.task.cleanuptask.name',
'description' => $ll . 'tx_pxasocialfeed.task.cleanuptask.description',
'additionalFields' => \Pixelant\PxaSocialFeed\Task\CleanUpTaskAdditionalFieldProvider::class
];
// hook for extension BE view
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['list_type_Info']['pxasocialfeed_showfeed'][$_EXTKEY] =
\Pixelant\PxaSocialFeed\Hooks\PageLayoutView::class . '->getExtensionInformation';
// @codingStandardsIgnoreEnd
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
'<INCLUDE_TYPOSCRIPT: source="FILE:EXT:pxa_social_feed/Configuration/TSconfig/ContentElementWizard.ts">'
);
# register icons
if (TYPO3_MODE === 'BE') {
$icons = [
'ext-pxasocialfeed-wizard-icon' => 'feed.svg',
'ext-pxasocialfeed-model-icon' => 'feed.svg',
'ext-pxasocialfeed-model-icon-facebook' => 'facebook.svg',
'ext-pxasocialfeed-model-icon-instagram' => 'instagram.svg',
'ext-pxasocialfeed-model-icon-twitter' => 'twitter.svg'
];
/** @var \TYPO3\CMS\Core\Imaging\IconRegistry $iconRegistry */
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
\TYPO3\CMS\Core\Imaging\IconRegistry::class
);
foreach ($icons as $identifier => $path) {
$iconRegistry->registerIcon(
$identifier,
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:pxa_social_feed/Resources/Public/Icons/BE/' . $path]
);
}
}
},
'pxa_social_feed'
);