forked from pixelant/pxa_product_manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_localconf.php
103 lines (92 loc) · 5.07 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?php
defined('TYPO3_MODE') || die;
call_user_func(
function ($_EXTKEY) {
// @codingStandardsIgnoreStart
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'Pixelant.' . $_EXTKEY,
'Pi1',
[
'Product' => 'list, show, wishList, finishOrder, lazyList, comparePreView, compareView, groupedList, promotionList',
'Navigation' => 'show',
'AjaxProducts' => 'ajaxLazyList, latestVisited',
'AjaxJson' => 'toggleWishList, toggleCompareList, loadCompareList, emptyCompareList, loadWishList, addLatestVisitedProduct',
'Filter' => 'showFilter'
],
// non-cacheable actions
[
'Product' => 'wishList, finishOrder, comparePreView, compareView',
'AjaxProducts' => 'ajaxLazyList, latestVisited',
'AjaxJson' => 'toggleWishList, toggleCompareList, loadCompareList, emptyCompareList, loadWishList, addLatestVisitedProduct'
]
);
// @codingStandardsIgnoreEnd
// Register cart as another plugin. Otherwise it has conflict
// with product single view
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'Pixelant.' . $_EXTKEY,
'Pi2',
[
'Product' => 'wishListCart, compareListCart',
],
// non-cacheable actions
[
]
);
// @codingStandardsIgnoreStart
// Page module hook
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['list_type_Info']['pxaproductmanager_pi1']['pxa_product_manager'] =
\Pixelant\PxaProductManager\Hook\PageLayoutView::class . '->getExtensionSummary';
// Form data provider hook, to generate attributes TCA
$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['formDataGroup']['tcaDatabaseRecord'][\Pixelant\PxaProductManager\Backend\FormDataProvider\ProductEditFormInitialize::class] = [
'depends' => [
\TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRowInitializeNew::class,
\TYPO3\CMS\Backend\Form\FormDataProvider\TcaSelectItems::class
]
];
$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['formDataGroup']['tcaDatabaseRecord'][\Pixelant\PxaProductManager\Backend\FormDataProvider\OrderEditFormInitialize::class] = [
'depends' => [
\TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRowInitializeNew::class
]
];
// LinkHandler
// t3://pxappm?product=[product_id]
// t3://pxappm?category=[category_id]
$linkType = 'pxappm';
$GLOBALS['TYPO3_CONF_VARS']['SYS']['linkHandler'][$linkType] = \Pixelant\PxaProductManager\LinkHandler\LinkHandling::class;
$GLOBALS['TYPO3_CONF_VARS']['FE']['typolinkBuilder'][$linkType] = \Pixelant\PxaProductManager\LinkHandler\ProductLinkBuilder::class;
$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['linkHandler'][$linkType] = \Pixelant\PxaProductManager\LinkHandler\LinkHandlingFormData::class;
// Register cache
if (!isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_pxa_pm_categories']['frontend'])) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_pxa_pm_categories'] = [
'frontend' => \TYPO3\CMS\Core\Cache\Frontend\VariableFrontend::class,
'backend' => \TYPO3\CMS\Core\Cache\Backend\FileBackend::class,
'options' => [
'defaultLifetime' => 0
],
'groups' => ['all']
];
}
// @codingStandardsIgnoreEnd
// Include page typoscript
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
'<INCLUDE_TYPOSCRIPT: source="FILE:EXT:pxa_product_manager/Configuration/TypoScript/PageTS/rteTsConfig.ts">'
);
$ppmLocalLangBe = 'LLL:EXT:pxa_product_manager/Resources/Private/Language/locallang_be.xlf';
$productCustomSortingUpdateTask = Pixelant\PxaProductManager\Task\ProductCustomSortingUpdateTask::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][$productCustomSortingUpdateTask] = [
'extension' => $_EXTKEY,
'title' => $ppmLocalLangBe . ':task.productCustomSortingUpdate.title',
'description' => $ppmLocalLangBe . ':task.productCustomSortingUpdate.description'
];
// Register field control for identifier
$GLOBALS['TYPO3_CONF_VARS']['SYS']['formEngine']['nodeRegistry'][1534315213786] = [
'nodeName' => 'attributeIdentifierControl',
'priority' => 30,
'class' => \Pixelant\PxaProductManager\Backend\FormEngine\FieldControl\AttributeIdentifierControl::class
];
// Register the class to be available in 'eval' of TCA
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tce']['formevals'][\Pixelant\PxaProductManager\Backend\Evaluation\LcFirstEvaluation::class] = '';
},
$_EXTKEY
);