Passed
Push — master ( 305978...d3671c )
by Aimeos
16:54
created
Configuration/TCA/Overrides/tt_content.php 1 patch
Spacing   +65 added lines, -65 removed lines patch added patch discarded remove patch
@@ -1,141 +1,141 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-defined('TYPO3') or die();
3
+defined( 'TYPO3' ) or die();
4 4
 
5 5
 
6 6
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_jsonapi'] = 'pi_flexform';
7
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_jsonapi', 'FILE:EXT:aimeos/Configuration/FlexForms/Jsonapi.xml');
8
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'jsonapi', 'Aimeos Shop - JSON REST API');
7
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_jsonapi', 'FILE:EXT:aimeos/Configuration/FlexForms/Jsonapi.xml' );
8
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'jsonapi', 'Aimeos Shop - JSON REST API' );
9 9
 
10 10
 
11 11
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_locale-select'] = 'pi_flexform';
12
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_locale-select', 'FILE:EXT:aimeos/Configuration/FlexForms/LocaleSelect.xml');
13
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'locale-select', 'Aimeos Shop - Locale selector');
12
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_locale-select', 'FILE:EXT:aimeos/Configuration/FlexForms/LocaleSelect.xml' );
13
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'locale-select', 'Aimeos Shop - Locale selector' );
14 14
 
15 15
 
16 16
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_catalog-attribute'] = 'pi_flexform';
17
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_catalog-attribute', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogAttribute.xml');
18
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'catalog-attribute', 'Aimeos Shop - Catalog attributes');
17
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_catalog-attribute', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogAttribute.xml' );
18
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'catalog-attribute', 'Aimeos Shop - Catalog attributes' );
19 19
 
20 20
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_catalog-count'] = 'pi_flexform';
21
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_catalog-count', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogCount.xml');
22
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'catalog-count', 'Aimeos Shop - Catalog count JSON');
21
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_catalog-count', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogCount.xml' );
22
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'catalog-count', 'Aimeos Shop - Catalog count JSON' );
23 23
 
24 24
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_catalog-detail'] = 'pi_flexform';
25
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_catalog-detail', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogDetail.xml');
26
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'catalog-detail', 'Aimeos Shop - Catalog detail');
25
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_catalog-detail', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogDetail.xml' );
26
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'catalog-detail', 'Aimeos Shop - Catalog detail' );
27 27
 
28 28
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_catalog-filter'] = 'pi_flexform';
29
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_catalog-filter', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogFilter.xml');
30
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'catalog-filter', 'Aimeos Shop - Catalog filter');
29
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_catalog-filter', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogFilter.xml' );
30
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'catalog-filter', 'Aimeos Shop - Catalog filter' );
31 31
 
32 32
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_catalog-home'] = 'pi_flexform';
33
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_catalog-home', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogHome.xml');
34
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'catalog-home', 'Aimeos Shop - Catalog home');
33
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_catalog-home', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogHome.xml' );
34
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'catalog-home', 'Aimeos Shop - Catalog home' );
35 35
 
36 36
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_catalog-list'] = 'pi_flexform';
37
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_catalog-list', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogList.xml');
38
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'catalog-list', 'Aimeos Shop - Catalog list');
37
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_catalog-list', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogList.xml' );
38
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'catalog-list', 'Aimeos Shop - Catalog list' );
39 39
 
40 40
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_catalog-price'] = 'pi_flexform';
41
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_catalog-price', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogPrice.xml');
42
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'catalog-price', 'Aimeos Shop - Catalog price');
41
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_catalog-price', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogPrice.xml' );
42
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'catalog-price', 'Aimeos Shop - Catalog price' );
43 43
 
44 44
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_catalog-search'] = 'pi_flexform';
45
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_catalog-search', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogSearch.xml');
46
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'catalog-search', 'Aimeos Shop - Catalog search');
45
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_catalog-search', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogSearch.xml' );
46
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'catalog-search', 'Aimeos Shop - Catalog search' );
47 47
 
48 48
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_catalog-session'] = 'pi_flexform';
49
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_catalog-session', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogSession.xml');
50
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'catalog-session', 'Aimeos Shop - Catalog user related session');
49
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_catalog-session', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogSession.xml' );
50
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'catalog-session', 'Aimeos Shop - Catalog user related session' );
51 51
 
52 52
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_catalog-stage'] = 'pi_flexform';
53
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_catalog-stage', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogStage.xml');
54
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'catalog-stage', 'Aimeos Shop - Catalog stage area');
53
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_catalog-stage', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogStage.xml' );
54
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'catalog-stage', 'Aimeos Shop - Catalog stage area' );
55 55
 
56 56
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_catalog-stock'] = 'pi_flexform';
57
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_catalog-stock', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogStock.xml');
58
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'catalog-stock', 'Aimeos Shop - Catalog stock JSON');
57
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_catalog-stock', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogStock.xml' );
58
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'catalog-stock', 'Aimeos Shop - Catalog stock JSON' );
59 59
 
60 60
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_catalog-suggest'] = 'pi_flexform';
61
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_catalog-suggest', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogSuggest.xml');
62
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'catalog-suggest', 'Aimeos Shop - Catalog suggest JSON');
61
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_catalog-suggest', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogSuggest.xml' );
62
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'catalog-suggest', 'Aimeos Shop - Catalog suggest JSON' );
63 63
 
64 64
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_catalog-supplier'] = 'pi_flexform';
65
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_catalog-supplier', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogSupplier.xml');
66
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'catalog-supplier', 'Aimeos Shop - Catalog supplier');
65
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_catalog-supplier', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogSupplier.xml' );
66
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'catalog-supplier', 'Aimeos Shop - Catalog supplier' );
67 67
 
68 68
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_catalog-tree'] = 'pi_flexform';
69
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_catalog-tree', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogTree.xml');
70
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'catalog-tree', 'Aimeos Shop - Catalog tree');
69
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_catalog-tree', 'FILE:EXT:aimeos/Configuration/FlexForms/CatalogTree.xml' );
70
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'catalog-tree', 'Aimeos Shop - Catalog tree' );
71 71
 
72 72
 
73 73
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_basket-bulk'] = 'pi_flexform';
74
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_basket-bulk', 'FILE:EXT:aimeos/Configuration/FlexForms/BasketBulk.xml');
75
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'basket-bulk', 'Aimeos Shop - Basket bulk order');
74
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_basket-bulk', 'FILE:EXT:aimeos/Configuration/FlexForms/BasketBulk.xml' );
75
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'basket-bulk', 'Aimeos Shop - Basket bulk order' );
76 76
 
77 77
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_basket-related'] = 'pi_flexform';
78
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_basket-related', 'FILE:EXT:aimeos/Configuration/FlexForms/BasketRelated.xml');
79
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'basket-related', 'Aimeos Shop - Basket related');
78
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_basket-related', 'FILE:EXT:aimeos/Configuration/FlexForms/BasketRelated.xml' );
79
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'basket-related', 'Aimeos Shop - Basket related' );
80 80
 
81 81
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_basket-small'] = 'pi_flexform';
82
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_basket-small', 'FILE:EXT:aimeos/Configuration/FlexForms/BasketSmall.xml');
83
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'basket-small', 'Aimeos Shop - Basket small');
82
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_basket-small', 'FILE:EXT:aimeos/Configuration/FlexForms/BasketSmall.xml' );
83
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'basket-small', 'Aimeos Shop - Basket small' );
84 84
 
85 85
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_basket-standard'] = 'pi_flexform';
86
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_basket-standard', 'FILE:EXT:aimeos/Configuration/FlexForms/BasketStandard.xml');
87
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'basket-standard', 'Aimeos Shop - Basket standard');
86
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_basket-standard', 'FILE:EXT:aimeos/Configuration/FlexForms/BasketStandard.xml' );
87
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'basket-standard', 'Aimeos Shop - Basket standard' );
88 88
 
89 89
 
90 90
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_checkout-confirm'] = 'pi_flexform';
91
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_checkout-confirm', 'FILE:EXT:aimeos/Configuration/FlexForms/CheckoutConfirm.xml');
92
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'checkout-confirm', 'Aimeos Shop - Checkout confirm');
91
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_checkout-confirm', 'FILE:EXT:aimeos/Configuration/FlexForms/CheckoutConfirm.xml' );
92
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'checkout-confirm', 'Aimeos Shop - Checkout confirm' );
93 93
 
94 94
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_checkout-standard'] = 'pi_flexform';
95
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_checkout-standard', 'FILE:EXT:aimeos/Configuration/FlexForms/CheckoutStandard.xml');
96
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'checkout-standard', 'Aimeos Shop - Checkout standard');
95
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_checkout-standard', 'FILE:EXT:aimeos/Configuration/FlexForms/CheckoutStandard.xml' );
96
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'checkout-standard', 'Aimeos Shop - Checkout standard' );
97 97
 
98 98
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_checkout-update'] = 'pi_flexform';
99
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_checkout-update', 'FILE:EXT:aimeos/Configuration/FlexForms/CheckoutUpdate.xml');
100
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'checkout-update', 'Aimeos Shop - Checkout payment update');
99
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_checkout-update', 'FILE:EXT:aimeos/Configuration/FlexForms/CheckoutUpdate.xml' );
100
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'checkout-update', 'Aimeos Shop - Checkout payment update' );
101 101
 
102 102
 
103 103
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_account-basket'] = 'pi_flexform';
104
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_account-basket', 'FILE:EXT:aimeos/Configuration/FlexForms/AccountBasket.xml');
105
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'account-basket', 'Aimeos Shop - Account basket');
104
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_account-basket', 'FILE:EXT:aimeos/Configuration/FlexForms/AccountBasket.xml' );
105
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'account-basket', 'Aimeos Shop - Account basket' );
106 106
 
107 107
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_account-download'] = 'pi_flexform';
108
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_account-download', 'FILE:EXT:aimeos/Configuration/FlexForms/AccountDownload.xml');
109
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'account-download', 'Aimeos Shop - Account download');
108
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_account-download', 'FILE:EXT:aimeos/Configuration/FlexForms/AccountDownload.xml' );
109
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'account-download', 'Aimeos Shop - Account download' );
110 110
 
111 111
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_account-history'] = 'pi_flexform';
112
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_account-history', 'FILE:EXT:aimeos/Configuration/FlexForms/AccountHistory.xml');
113
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'account-history', 'Aimeos Shop - Account history');
112
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_account-history', 'FILE:EXT:aimeos/Configuration/FlexForms/AccountHistory.xml' );
113
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'account-history', 'Aimeos Shop - Account history' );
114 114
 
115 115
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_account-favorite'] = 'pi_flexform';
116
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_account-favorite', 'FILE:EXT:aimeos/Configuration/FlexForms/AccountFavorite.xml');
117
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'account-favorite', 'Aimeos Shop - Account favorite');
116
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_account-favorite', 'FILE:EXT:aimeos/Configuration/FlexForms/AccountFavorite.xml' );
117
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'account-favorite', 'Aimeos Shop - Account favorite' );
118 118
 
119 119
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_account-profile'] = 'pi_flexform';
120
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_account-profile', 'FILE:EXT:aimeos/Configuration/FlexForms/AccountProfile.xml');
121
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'account-profile', 'Aimeos Shop - Account profile');
120
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_account-profile', 'FILE:EXT:aimeos/Configuration/FlexForms/AccountProfile.xml' );
121
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'account-profile', 'Aimeos Shop - Account profile' );
122 122
 
123 123
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_account-review'] = 'pi_flexform';
124
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_account-review', 'FILE:EXT:aimeos/Configuration/FlexForms/AccountReview.xml');
125
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'account-review', 'Aimeos Shop - Account review');
124
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_account-review', 'FILE:EXT:aimeos/Configuration/FlexForms/AccountReview.xml' );
125
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'account-review', 'Aimeos Shop - Account review' );
126 126
 
127 127
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_account-subscription'] = 'pi_flexform';
128
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_account-subscription', 'FILE:EXT:aimeos/Configuration/FlexForms/AccountSubscription.xml');
129
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'account-subscription', 'Aimeos Shop - Account subscriptions');
128
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_account-subscription', 'FILE:EXT:aimeos/Configuration/FlexForms/AccountSubscription.xml' );
129
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'account-subscription', 'Aimeos Shop - Account subscriptions' );
130 130
 
131 131
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_account-watch'] = 'pi_flexform';
132
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_account-watch', 'FILE:EXT:aimeos/Configuration/FlexForms/AccountWatch.xml');
133
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'account-watch', 'Aimeos Shop - Account watch list');
132
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_account-watch', 'FILE:EXT:aimeos/Configuration/FlexForms/AccountWatch.xml' );
133
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'account-watch', 'Aimeos Shop - Account watch list' );
134 134
 
135 135
 
136 136
 $GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['aimeos_supplier-detail'] = 'pi_flexform';
137
-\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('aimeos_supplier-detail', 'FILE:EXT:aimeos/Configuration/FlexForms/SupplierDetail.xml');
138
-\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin('aimeos', 'supplier-detail', 'Aimeos Shop - Supplier detail');
137
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue( 'aimeos_supplier-detail', 'FILE:EXT:aimeos/Configuration/FlexForms/SupplierDetail.xml' );
138
+\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'aimeos', 'supplier-detail', 'Aimeos Shop - Supplier detail' );
139 139
 
140 140
 
141 141
 ?>
142 142
\ No newline at end of file
Please login to merge, or discard this patch.
Configuration/ContentSecurityPolicies.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 use TYPO3\CMS\Core\Type\Map;
12 12
 
13 13
 
14
-return Map::fromEntries([
14
+return Map::fromEntries( [
15 15
     // Provide declarations for the backend
16 16
     Scope::backend(),
17 17
 
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
             SourceKeyword::self,
24 24
             SourceScheme::data,
25 25
             SourceScheme::blob,
26
-            new UriValue('https://cdnjs.cloudflare.com'),
27
-            new UriValue('https://cdn.jsdelivr.net')
26
+            new UriValue( 'https://cdnjs.cloudflare.com' ),
27
+            new UriValue( 'https://cdn.jsdelivr.net' )
28 28
         ),
29 29
 
30 30
         // Results in `style-src 'self' 'unsafe-inline' 'https://cdnjs.cloudflare.com' 'https://cdn.jsdelivr.net'`
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
             Directive::StyleSrc,
34 34
             SourceKeyword::self,
35 35
             SourceKeyword::unsafeInline,
36
-            new UriValue('https://cdnjs.cloudflare.com'),
37
-            new UriValue('https://cdn.jsdelivr.net')
36
+            new UriValue( 'https://cdnjs.cloudflare.com' ),
37
+            new UriValue( 'https://cdn.jsdelivr.net' )
38 38
         ),
39 39
 
40 40
         // Results in `script-src 'self' 'unsafe-eval' 'https://cdnjs.cloudflare.com' 'https://cdn.jsdelivr.net'`
@@ -43,9 +43,9 @@  discard block
 block discarded – undo
43 43
             Directive::ScriptSrc,
44 44
             SourceKeyword::self,
45 45
             SourceKeyword::unsafeEval,
46
-            new UriValue('https://cdnjs.cloudflare.com'),
47
-            new UriValue('https://cdn.jsdelivr.net'),
48
-            new UriValue('https://cdn.jsdelivr.net')
46
+            new UriValue( 'https://cdnjs.cloudflare.com' ),
47
+            new UriValue( 'https://cdn.jsdelivr.net' ),
48
+            new UriValue( 'https://cdn.jsdelivr.net' )
49 49
         ),
50 50
 
51 51
         // Results in `connect-src 'self' https://*.deepl.com https://api.openai.com`
@@ -53,8 +53,8 @@  discard block
 block discarded – undo
53 53
             MutationMode::Extend,
54 54
             Directive::ConnectSrc,
55 55
             SourceKeyword::self,
56
-            new UriValue('https://*.deepl.com'),
57
-            new UriValue('https://api.openai.com')
56
+            new UriValue( 'https://*.deepl.com' ),
57
+            new UriValue( 'https://api.openai.com' )
58 58
         ),
59 59
 
60 60
         // img-src \'self\' data: blob: https://cdnjs.cloudflare.com https://cdn.jsdelivr.net https://*.tile.openstreetmap.org https://aimeos.org
@@ -64,18 +64,18 @@  discard block
 block discarded – undo
64 64
             SourceKeyword::self,
65 65
             SourceScheme::data,
66 66
             SourceScheme::blob,
67
-            new UriValue('https://cdnjs.cloudflare.com'),
68
-            new UriValue('https://cdn.jsdelivr.net'),
69
-            new UriValue('https://*.tile.openstreetmap.org'),
70
-            new UriValue('https://aimeos.org')
67
+            new UriValue( 'https://cdnjs.cloudflare.com' ),
68
+            new UriValue( 'https://cdn.jsdelivr.net' ),
69
+            new UriValue( 'https://*.tile.openstreetmap.org' ),
70
+            new UriValue( 'https://aimeos.org' )
71 71
         ),
72 72
 
73 73
         // Results in `frame-src https://www.youtube.com https://player.vimeo.com`
74 74
         new Mutation(
75 75
             MutationMode::Extend,
76 76
             Directive::FrameSrc,
77
-            new UriValue('https://www.youtube.com'),
78
-            new UriValue('https://player.vimeo.com')
77
+            new UriValue( 'https://www.youtube.com' ),
78
+            new UriValue( 'https://player.vimeo.com' )
79 79
         ),
80 80
     ),
81
-]);
82 81
\ No newline at end of file
82
+] );
83 83
\ No newline at end of file
Please login to merge, or discard this patch.
Configuration/Backend/Modules.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
         'iconIdentifier' => 'aimeos-shop',
11 11
         'path' => '/module/web/aimeos',
12 12
         'labels' => 'LLL:EXT:aimeos/Resources/Private/Language/admin.xlf',
13
-        'inheritNavigationComponentFromMainModule' => \Aimeos\Aimeos\Base::getExtConfig('showPageTree', false) ? true : false,
13
+        'inheritNavigationComponentFromMainModule' => \Aimeos\Aimeos\Base::getExtConfig( 'showPageTree', false ) ? true : false,
14 14
         'controllerActions' => [
15 15
             \Aimeos\Aimeos\Controller\AdminController::class => [
16 16
                 'index'
Please login to merge, or discard this patch.
ext_tables.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-defined('TYPO3') or die();
3
+defined( 'TYPO3' ) or die();
4 4
 
5 5
 
6
-$aimeosExtPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('aimeos');
6
+$aimeosExtPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath( 'aimeos' );
7 7
 
8
-if (file_exists($aimeosExtPath . '/Resources/Libraries/autoload.php') === true) {
8
+if( file_exists( $aimeosExtPath . '/Resources/Libraries/autoload.php' ) === true ) {
9 9
     require_once $aimeosExtPath . '/Resources/Libraries/autoload.php';
10 10
 }
11 11
 
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     'labels' => 'LLL:EXT:aimeos/Resources/Private/Language/admin.xlf',
21 21
 ];
22 22
 
23
-if ((bool) \Aimeos\Aimeos\Base::getExtConfig('showPageTree', false) == false) {
23
+if( (bool) \Aimeos\Aimeos\Base::getExtConfig( 'showPageTree', false ) == false ) {
24 24
     $_aimeosConfiguration['navigationComponentId'] = null;
25 25
     $_aimeosConfiguration['inheritNavigationComponentFromMainModule'] = false;
26 26
 }
Please login to merge, or discard this patch.
Resources/Private/Config/resource.php 2 patches
Indentation   +72 added lines, -72 removed lines patch added patch discarded remove patch
@@ -7,82 +7,82 @@
 block discarded – undo
7 7
 $driver = $defaultConnection['driver'] ?? null;
8 8
 
9 9
 switch($driver) {
10
-	case 'mysqli':
11
-	case 'pdo_mysql': $adapter = 'mysql'; break;
12
-	case 'pdo_oci': $adapter = 'oracle'; break;
13
-	case 'pdo_pgsql': $adapter = 'pgsql'; break;
14
-	case 'pdo_sqlite': $adapter = 'sqlite'; break;
15
-	case 'pdo_sqlsrv': $adapter = 'sqlsrv'; break;
16
-	default: $adapter = $driver;
10
+    case 'mysqli':
11
+    case 'pdo_mysql': $adapter = 'mysql'; break;
12
+    case 'pdo_oci': $adapter = 'oracle'; break;
13
+    case 'pdo_pgsql': $adapter = 'pgsql'; break;
14
+    case 'pdo_sqlite': $adapter = 'sqlite'; break;
15
+    case 'pdo_sqlsrv': $adapter = 'sqlsrv'; break;
16
+    default: $adapter = $driver;
17 17
 }
18 18
 
19 19
 switch($adapter) {
20
-	case 'mysql': $stmt = ["SET SESSION sort_buffer_size=2097144; SET NAMES 'utf8'; SET SESSION sql_mode='ANSI'; SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED"]; break;
21
-	default: $stmt = [];
20
+    case 'mysql': $stmt = ["SET SESSION sort_buffer_size=2097144; SET NAMES 'utf8'; SET SESSION sql_mode='ANSI'; SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED"]; break;
21
+    default: $stmt = [];
22 22
 }
23 23
 
24 24
 return [
25
-	'db' => [
26
-		'adapter' => $adapter,
27
-		'host' => $defaultConnection['host'] ?? null,
28
-		'port' => $defaultConnection['port'] ?? null,
29
-		'socket' => $defaultConnection['socket'] ?? null,
30
-		'database' => $defaultConnection['dbname'] ?? null,
31
-		'username' => $defaultConnection['user'] ?? null,
32
-		'password' => $defaultConnection['password'] ?? null,
33
-		'stmt' => $stmt,
34
-		'defaultTableOptions' => [
35
-			'charset' => $defaultConnection['tableoptions']['charset'] ?? 'utf8',
36
-			'collate' => $defaultConnection['tableoptions']['collate'] ?? 'utf8_unicode_ci',
37
-		],
38
-		'limit' => 3,
39
-	],
40
-	'fs' => [
41
-		'adapter' => 'Standard',
42
-		'baseurl' => '/uploads/tx_aimeos',
43
-		'basedir' => $publicPath . '/uploads/tx_aimeos',
44
-		'tempdir' => $publicPath . '/typo3temp',
45
-	],
46
-	'fs-media' => [
47
-		'adapter' => 'Standard',
48
-		'baseurl' => '/uploads/tx_aimeos',
49
-		'basedir' => $publicPath . '/uploads/tx_aimeos',
50
-		'tempdir' => $publicPath . '/typo3temp',
51
-	],
52
-	'fs-mimeicon' => [
53
-		'adapter' => 'Standard',
54
-		'baseurl' => $assetPath . '/Images/Mimeicons',
55
-		'basedir' => $assetPath . '/Images/Mimeicons',
56
-		'tempdir' => $publicPath . '/typo3temp',
57
-	],
58
-	'fs-theme' => [
59
-		'adapter' => 'Standard',
60
-		'baseurl' => $assetPath . '/Themes',
61
-		'basedir' => $assetPath . '/Themes',
62
-		'tempdir' => $publicPath . '/typo3temp',
63
-	],
64
-	'fs-admin' => [
65
-		'adapter' => 'Standard',
66
-		'basedir' => $publicPath . '/uploads/tx_aimeos/.secure/admin',
67
-		'tempdir' => $publicPath . '/typo3temp',
68
-	],
69
-	'fs-export' => [
70
-		'adapter' => 'Standard',
71
-		'basedir' => $publicPath . '/uploads/tx_aimeos/.secure/export',
72
-		'tempdir' => $publicPath . '/typo3temp',
73
-	],
74
-	'fs-import' => [
75
-		'adapter' => 'Standard',
76
-		'basedir' => $publicPath . '/uploads/tx_aimeos/.secure/import',
77
-		'tempdir' => $publicPath . '/typo3temp',
78
-	],
79
-	'fs-secure' => [
80
-		'adapter' => 'Standard',
81
-		'basedir' => $publicPath . '/uploads/tx_aimeos/.secure',
82
-		'tempdir' => $publicPath . '/typo3temp',
83
-	],
84
-	'mq' => [
85
-		'adapter' => 'Standard',
86
-		'db' => 'db',
87
-	],
25
+    'db' => [
26
+        'adapter' => $adapter,
27
+        'host' => $defaultConnection['host'] ?? null,
28
+        'port' => $defaultConnection['port'] ?? null,
29
+        'socket' => $defaultConnection['socket'] ?? null,
30
+        'database' => $defaultConnection['dbname'] ?? null,
31
+        'username' => $defaultConnection['user'] ?? null,
32
+        'password' => $defaultConnection['password'] ?? null,
33
+        'stmt' => $stmt,
34
+        'defaultTableOptions' => [
35
+            'charset' => $defaultConnection['tableoptions']['charset'] ?? 'utf8',
36
+            'collate' => $defaultConnection['tableoptions']['collate'] ?? 'utf8_unicode_ci',
37
+        ],
38
+        'limit' => 3,
39
+    ],
40
+    'fs' => [
41
+        'adapter' => 'Standard',
42
+        'baseurl' => '/uploads/tx_aimeos',
43
+        'basedir' => $publicPath . '/uploads/tx_aimeos',
44
+        'tempdir' => $publicPath . '/typo3temp',
45
+    ],
46
+    'fs-media' => [
47
+        'adapter' => 'Standard',
48
+        'baseurl' => '/uploads/tx_aimeos',
49
+        'basedir' => $publicPath . '/uploads/tx_aimeos',
50
+        'tempdir' => $publicPath . '/typo3temp',
51
+    ],
52
+    'fs-mimeicon' => [
53
+        'adapter' => 'Standard',
54
+        'baseurl' => $assetPath . '/Images/Mimeicons',
55
+        'basedir' => $assetPath . '/Images/Mimeicons',
56
+        'tempdir' => $publicPath . '/typo3temp',
57
+    ],
58
+    'fs-theme' => [
59
+        'adapter' => 'Standard',
60
+        'baseurl' => $assetPath . '/Themes',
61
+        'basedir' => $assetPath . '/Themes',
62
+        'tempdir' => $publicPath . '/typo3temp',
63
+    ],
64
+    'fs-admin' => [
65
+        'adapter' => 'Standard',
66
+        'basedir' => $publicPath . '/uploads/tx_aimeos/.secure/admin',
67
+        'tempdir' => $publicPath . '/typo3temp',
68
+    ],
69
+    'fs-export' => [
70
+        'adapter' => 'Standard',
71
+        'basedir' => $publicPath . '/uploads/tx_aimeos/.secure/export',
72
+        'tempdir' => $publicPath . '/typo3temp',
73
+    ],
74
+    'fs-import' => [
75
+        'adapter' => 'Standard',
76
+        'basedir' => $publicPath . '/uploads/tx_aimeos/.secure/import',
77
+        'tempdir' => $publicPath . '/typo3temp',
78
+    ],
79
+    'fs-secure' => [
80
+        'adapter' => 'Standard',
81
+        'basedir' => $publicPath . '/uploads/tx_aimeos/.secure',
82
+        'tempdir' => $publicPath . '/typo3temp',
83
+    ],
84
+    'mq' => [
85
+        'adapter' => 'Standard',
86
+        'db' => 'db',
87
+    ],
88 88
 ];
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 $publicPath = \TYPO3\CMS\Core\Core\Environment::getPublicPath();
4
-$assetPath = \TYPO3\CMS\Core\Utility\PathUtility::getAbsoluteWebPath(\TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName('EXT:aimeos/Resources/Public'));
4
+$assetPath = \TYPO3\CMS\Core\Utility\PathUtility::getAbsoluteWebPath( \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName( 'EXT:aimeos/Resources/Public' ) );
5 5
 
6 6
 $defaultConnection = $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default'] ?? [];
7 7
 $driver = $defaultConnection['driver'] ?? null;
8 8
 
9
-switch($driver) {
9
+switch( $driver ) {
10 10
 	case 'mysqli':
11 11
 	case 'pdo_mysql': $adapter = 'mysql'; break;
12 12
 	case 'pdo_oci': $adapter = 'oracle'; break;
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 	default: $adapter = $driver;
17 17
 }
18 18
 
19
-switch($adapter) {
19
+switch( $adapter ) {
20 20
 	case 'mysql': $stmt = ["SET SESSION sort_buffer_size=2097144; SET NAMES 'utf8'; SET SESSION sql_mode='ANSI'; SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED"]; break;
21 21
 	default: $stmt = [];
22 22
 }
Please login to merge, or discard this patch.
Classes/Setup.php 1 patch
Spacing   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -72,16 +72,16 @@  discard block
 block discarded – undo
72 72
     {
73 73
         try {
74 74
             ob_start();
75
-            $exectimeStart = microtime(true);
75
+            $exectimeStart = microtime( true );
76 76
 
77 77
             self::execute();
78 78
 
79
-            $this->output->writeln(ob_get_clean());
80
-            $this->output->writeln(sprintf('Setup process lasted %1$f sec', (microtime(true) - $exectimeStart)));
81
-        } catch(\Throwable $t) {
82
-            $this->output->writeln(ob_get_clean());
83
-            $this->output->writeln($t->getMessage());
84
-            $this->output->writeln($t->getTraceAsString());
79
+            $this->output->writeln( ob_get_clean() );
80
+            $this->output->writeln( sprintf( 'Setup process lasted %1$f sec', ( microtime( true ) - $exectimeStart ) ) );
81
+        } catch( \Throwable $t ) {
82
+            $this->output->writeln( ob_get_clean() );
83
+            $this->output->writeln( $t->getMessage() );
84
+            $this->output->writeln( $t->getTraceAsString() );
85 85
 
86 86
             return false;
87 87
         }
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
      *
107 107
      * @param OutputInterface $output
108 108
      */
109
-    public function setOutput(OutputInterface $output) : void
109
+    public function setOutput( OutputInterface $output ) : void
110 110
     {
111 111
         $this->output = $output;
112 112
     }
@@ -128,26 +128,26 @@  discard block
 block discarded – undo
128 128
      */
129 129
     public static function execute()
130 130
     {
131
-        ini_set('max_execution_time', 0);
131
+        ini_set( 'max_execution_time', 0 );
132 132
 
133
-        $extconf = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Configuration\ExtensionConfiguration::class);
134
-        $demo = $extconf->get('aimeos', 'useDemoData') ?: false;
133
+        $extconf = GeneralUtility::makeInstance( \TYPO3\CMS\Core\Configuration\ExtensionConfiguration::class );
134
+        $demo = $extconf->get( 'aimeos', 'useDemoData' ) ?: false;
135 135
 
136
-        \Aimeos\MShop::cache(false);
137
-        \Aimeos\MAdmin::cache(false);
136
+        \Aimeos\MShop::cache( false );
137
+        \Aimeos\MAdmin::cache( false );
138 138
 
139
-        $site = $extconf->get('aimeos', 'siteCode') ?: 'default';
140
-        $template = $extconf->get('aimeos', 'siteTpl') ?: 'default';
141
-        $codelen = $extconf->get('aimeos', 'codeLength') ?: 64;
139
+        $site = $extconf->get( 'aimeos', 'siteCode' ) ?: 'default';
140
+        $template = $extconf->get( 'aimeos', 'siteTpl' ) ?: 'default';
141
+        $codelen = $extconf->get( 'aimeos', 'codeLength' ) ?: 64;
142 142
 
143 143
         $boostrap = \Aimeos\Aimeos\Base::aimeos();
144
-        $ctx = self::context(['setup' => ['default' => ['demo' => (string) $demo]]])->setEditor('setup');
144
+        $ctx = self::context( ['setup' => ['default' => ['demo' => (string) $demo]]] )->setEditor( 'setup' );
145 145
 
146
-        \Aimeos\Setup::use($boostrap, ['codelength' => $codelen])->verbose('vvv')
147
-            ->context($ctx->setEditor('aimeos:setup'))
148
-            ->up($site, $template);
146
+        \Aimeos\Setup::use( $boostrap, ['codelength' => $codelen] )->verbose( 'vvv' )
147
+            ->context( $ctx->setEditor( 'aimeos:setup' ) )
148
+            ->up( $site, $template );
149 149
 
150
-        $extconf->set('aimeos', ['useDemoData' => '']);
150
+        $extconf->set( 'aimeos', ['useDemoData' => ''] );
151 151
     }
152 152
 
153 153
 
@@ -157,45 +157,45 @@  discard block
 block discarded – undo
157 157
      * @param array $list List of SQL statements
158 158
      * @return array SQL statements required for the install tool
159 159
      */
160
-    public static function schema(array $list) : array
160
+    public static function schema( array $list ) : array
161 161
     {
162 162
         $ctx = self::context();
163
-        $connectionNames = array_keys($ctx->config()->get( 'resource'));
164
-        $connectionNames = array_filter($connectionNames, fn (string $key): bool => str_starts_with($key, 'db'));
163
+        $connectionNames = array_keys( $ctx->config()->get( 'resource' ) );
164
+        $connectionNames = array_filter( $connectionNames, fn ( string $key ): bool => str_starts_with( $key, 'db' ) );
165 165
 
166
-        foreach ($connectionNames as $connectionName) {
167
-            $conn = $ctx->db($connectionName);
168
-            $adapter = $ctx->config('resource/' . $connectionName . '/adapter');
166
+        foreach( $connectionNames as $connectionName ) {
167
+            $conn = $ctx->db( $connectionName );
168
+            $adapter = $ctx->config( 'resource/' . $connectionName . '/adapter' );
169 169
 
170 170
             $tables = [];
171
-            foreach(['fe_users_', 'madmin_', 'mshop_'] as $prefix) {
172
-                switch ($adapter) {
171
+            foreach( ['fe_users_', 'madmin_', 'mshop_'] as $prefix ) {
172
+                switch( $adapter ) {
173 173
                     case "pgsql": $sql = 'SELECT tablename FROM pg_catalog.pg_tables where tablename ~ \'^' . $prefix . '\''; break;
174 174
                     default: $sql = 'SHOW TABLES like \'' . $prefix . '%\'';
175 175
                 }
176 176
 
177
-                $result = $conn->create($sql)->execute();
177
+                $result = $conn->create( $sql )->execute();
178 178
 
179
-                while(($row = $result->fetch(\Aimeos\Base\DB\Result\Base::FETCH_NUM)) !== null) {
179
+                while( ( $row = $result->fetch( \Aimeos\Base\DB\Result\Base::FETCH_NUM ) ) !== null ) {
180 180
                     $tables[] = $row[0];
181 181
                 }
182 182
             }
183 183
 
184
-            foreach($tables as $table) {
185
-                switch ($adapter) {
184
+            foreach( $tables as $table ) {
185
+                switch( $adapter ) {
186 186
                     case "pgsql":  $sql = 'CREATE TABLE IF NOT EXISTS ' . $table . '()'; break;
187 187
                     default: $sql = 'SHOW CREATE TABLE `' . $table . '`';
188 188
                 }
189 189
 
190
-                $result = $conn->create($sql)->execute();
190
+                $result = $conn->create( $sql )->execute();
191 191
 
192
-                while(($row = $result->fetch(\Aimeos\Base\DB\Result\Base::FETCH_NUM)) !== null) {
192
+                while( ( $row = $result->fetch( \Aimeos\Base\DB\Result\Base::FETCH_NUM ) ) !== null ) {
193 193
                     $str = $row[1];
194 194
 
195
-                    $str = str_replace('"', '`', $str);
196
-                    $str = preg_replace('/CONSTRAINT `[a-zA-Z0-9_-]+` /', '', $str);
197
-                    $str = preg_replace('/ DEFAULT CHARSET=[^ ;]+/', '', $str);
198
-                    $str = preg_replace('/ COLLATE=[^ ;]+/', '', $str);
195
+                    $str = str_replace( '"', '`', $str );
196
+                    $str = preg_replace( '/CONSTRAINT `[a-zA-Z0-9_-]+` /', '', $str );
197
+                    $str = preg_replace( '/ DEFAULT CHARSET=[^ ;]+/', '', $str );
198
+                    $str = preg_replace( '/ COLLATE=[^ ;]+/', '', $str );
199 199
 
200 200
                     $list[] = $str . ";\n";
201 201
                 }
@@ -211,12 +211,12 @@  discard block
 block discarded – undo
211 211
      *
212 212
      * @param AlterTableDefinitionStatementsEvent $event Event object
213 213
      */
214
-    public function schemaEvent(AlterTableDefinitionStatementsEvent $event)
214
+    public function schemaEvent( AlterTableDefinitionStatementsEvent $event )
215 215
     {
216
-        $list = self::schema([]);
216
+        $list = self::schema( [] );
217 217
 
218
-        foreach ($list['sqlString'] ?? [] as $sql) {
219
-            $event->addSqlData($sql);
218
+        foreach( $list['sqlString'] ?? [] as $sql ) {
219
+            $event->addSqlData( $sql );
220 220
         }
221 221
     }
222 222
 
@@ -226,9 +226,9 @@  discard block
 block discarded – undo
226 226
      *
227 227
      * @param AfterPackageActivationEvent $event Event object
228 228
      */
229
-    public function setupEvent(AfterPackageActivationEvent $event)
229
+    public function setupEvent( AfterPackageActivationEvent $event )
230 230
     {
231
-        if ($event->getPackageKey() === 'aimeos' && \Aimeos\Aimeos\Base::getExtConfig('autoSetup', true)) {
231
+        if( $event->getPackageKey() === 'aimeos' && \Aimeos\Aimeos\Base::getExtConfig( 'autoSetup', true ) ) {
232 232
             self::execute();
233 233
         }
234 234
     }
@@ -240,34 +240,34 @@  discard block
 block discarded – undo
240 240
      * @param array $config Nested array of configuration settings
241 241
      * @return \Aimeos\MShop\ContextIface Context object
242 242
      */
243
-    protected static function context(array $config = []) : \Aimeos\MShop\ContextIface
243
+    protected static function context( array $config = [] ) : \Aimeos\MShop\ContextIface
244 244
     {
245
-        $aimeosExtPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('aimeos');
245
+        $aimeosExtPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath( 'aimeos' );
246 246
 
247
-        if (file_exists($aimeosExtPath . '/Resources/Libraries/autoload.php') === true) {
247
+        if( file_exists( $aimeosExtPath . '/Resources/Libraries/autoload.php' ) === true ) {
248 248
             require_once $aimeosExtPath . '/Resources/Libraries/autoload.php';
249 249
         }
250 250
 
251 251
         $ctx = new \Aimeos\MShop\Context();
252
-        $conf = \Aimeos\Aimeos\Base::config($config);
252
+        $conf = \Aimeos\Aimeos\Base::config( $config );
253 253
 
254
-        $ctx->setConfig($conf);
255
-        $ctx->setDatabaseManager(new \Aimeos\Base\DB\Manager\Standard($conf->get('resource', []), 'DBAL'));
256
-        $ctx->setFilesystemManager(new \Aimeos\Base\Filesystem\Manager\Standard($conf->get('resource', [])));
257
-        $ctx->setLogger(new \Aimeos\Base\Logger\Errorlog(\Aimeos\Base\Logger\Iface::INFO));
258
-        $ctx->setSession(new \Aimeos\Base\Session\None());
259
-        $ctx->setCache(new \Aimeos\Base\Cache\None());
254
+        $ctx->setConfig( $conf );
255
+        $ctx->setDatabaseManager( new \Aimeos\Base\DB\Manager\Standard( $conf->get( 'resource', [] ), 'DBAL' ) );
256
+        $ctx->setFilesystemManager( new \Aimeos\Base\Filesystem\Manager\Standard( $conf->get( 'resource', [] ) ) );
257
+        $ctx->setLogger( new \Aimeos\Base\Logger\Errorlog( \Aimeos\Base\Logger\Iface::INFO ) );
258
+        $ctx->setSession( new \Aimeos\Base\Session\None() );
259
+        $ctx->setCache( new \Aimeos\Base\Cache\None() );
260 260
 
261 261
         // Reset before child processes are spawned to avoid lost DB connections afterwards (TYPO3 9.4 and above)
262
-        if (php_sapi_name() === 'cli' && class_exists('\TYPO3\CMS\Core\Database\ConnectionPool')
263
-            && method_exists('\TYPO3\CMS\Core\Database\ConnectionPool', 'resetConnections')
262
+        if( php_sapi_name() === 'cli' && class_exists( '\TYPO3\CMS\Core\Database\ConnectionPool' )
263
+            && method_exists( '\TYPO3\CMS\Core\Database\ConnectionPool', 'resetConnections' )
264 264
         ) {
265
-            $ctx->setProcess(new \Aimeos\Base\Process\Pcntl(\Aimeos\Aimeos\Base::getExtConfig('pcntlMax', 4)));
265
+            $ctx->setProcess( new \Aimeos\Base\Process\Pcntl( \Aimeos\Aimeos\Base::getExtConfig( 'pcntlMax', 4 ) ) );
266 266
         } else {
267
-            $ctx->setProcess(new \Aimeos\Base\Process\None());
267
+            $ctx->setProcess( new \Aimeos\Base\Process\None() );
268 268
         }
269 269
 
270
-        $factory = GeneralUtility::makeInstance('TYPO3\CMS\Core\Crypto\PasswordHashing\PasswordHashFactory');
271
-        return $ctx->setPassword(new \Aimeos\Base\Password\Typo3($factory->getDefaultHashInstance('FE')));
270
+        $factory = GeneralUtility::makeInstance( 'TYPO3\CMS\Core\Crypto\PasswordHashing\PasswordHashFactory' );
271
+        return $ctx->setPassword( new \Aimeos\Base\Password\Typo3( $factory->getDefaultHashInstance( 'FE' ) ) );
272 272
     }
273 273
 }
Please login to merge, or discard this patch.
Classes/Base/Context.php 2 patches
Spacing   +131 added lines, -131 removed lines patch added patch discarded remove patch
@@ -29,33 +29,33 @@  discard block
 block discarded – undo
29 29
      * @param \Aimeos\Base\Config\Iface Configuration object
30 30
      * @return \Aimeos\MShop\ContextIface Context object
31 31
      */
32
-    public static function get(\Aimeos\Base\Config\Iface $config) : \Aimeos\MShop\ContextIface
32
+    public static function get( \Aimeos\Base\Config\Iface $config ) : \Aimeos\MShop\ContextIface
33 33
     {
34
-        if (self::$context === null) {
34
+        if( self::$context === null ) {
35 35
             // TYPO3 specifc context with password hasher
36 36
             $context = new \Aimeos\MShop\Context\Item\Typo3();
37
-            $context->setConfig($config);
38
-
39
-            self::addDataBaseManager($context);
40
-            self::addFilesystemManager($context);
41
-            self::addMessageQueueManager($context);
42
-            self::addLogger($context);
43
-            self::addCache($context);
44
-            self::addMailer($context);
45
-            self::addNonce($context);
46
-            self::addProcess($context);
47
-            self::addSession($context);
48
-            self::addHasher($context);
49
-            self::addToken($context);
50
-            self::addUser($context);
51
-            self::addGroups($context);
52
-            self::addDateTime($context);
37
+            $context->setConfig( $config );
38
+
39
+            self::addDataBaseManager( $context );
40
+            self::addFilesystemManager( $context );
41
+            self::addMessageQueueManager( $context );
42
+            self::addLogger( $context );
43
+            self::addCache( $context );
44
+            self::addMailer( $context );
45
+            self::addNonce( $context );
46
+            self::addProcess( $context );
47
+            self::addSession( $context );
48
+            self::addHasher( $context );
49
+            self::addToken( $context );
50
+            self::addUser( $context );
51
+            self::addGroups( $context );
52
+            self::addDateTime( $context );
53 53
 
54 54
             self::$context = $context;
55 55
         }
56 56
 
57 57
         // Use local TS configuration from plugins
58
-        self::$context->setConfig($config);
58
+        self::$context->setConfig( $config );
59 59
 
60 60
         return self::$context;
61 61
     }
@@ -67,32 +67,32 @@  discard block
 block discarded – undo
67 67
      * @param \Aimeos\MShop\ContextIface $context Context object including config
68 68
      * @return \Aimeos\MShop\ContextIface Modified context object
69 69
      */
70
-    protected static function addCache(\Aimeos\MShop\ContextIface $context) : \Aimeos\MShop\ContextIface
70
+    protected static function addCache( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface
71 71
     {
72
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_cache'])
73
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_cache']))
72
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_cache'] )
73
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_cache'] ) )
74 74
         ) {
75
-            return $fcn($context);
75
+            return $fcn( $context );
76 76
         }
77 77
 
78
-        $cacheName = \Aimeos\Aimeos\Base::getExtConfig('cacheName', 'Typo3');
78
+        $cacheName = \Aimeos\Aimeos\Base::getExtConfig( 'cacheName', 'Typo3' );
79 79
 
80
-        switch ($cacheName) {
80
+        switch( $cacheName ) {
81 81
             case 'None':
82
-                $context->config()->set('client/html/basket/cache/enable', false);
83
-                $cache = \Aimeos\Base\Cache\Factory::create('None');
82
+                $context->config()->set( 'client/html/basket/cache/enable', false );
83
+                $cache = \Aimeos\Base\Cache\Factory::create( 'None' );
84 84
                 break;
85 85
 
86 86
             case 'Typo3':
87
-                $manager = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Cache\CacheManager::class);
88
-                $cache = new \Aimeos\Base\Cache\Typo3($manager->getCache('aimeos'));
87
+                $manager = GeneralUtility::makeInstance( \TYPO3\CMS\Core\Cache\CacheManager::class );
88
+                $cache = new \Aimeos\Base\Cache\Typo3( $manager->getCache( 'aimeos' ) );
89 89
                 break;
90 90
 
91 91
             default:
92
-                $cache = (new \Aimeos\MAdmin\Cache\Manager\Standard($context))->getCache();
92
+                $cache = ( new \Aimeos\MAdmin\Cache\Manager\Standard( $context ) )->getCache();
93 93
         }
94 94
 
95
-        return $context->setCache($cache);
95
+        return $context->setCache( $cache );
96 96
     }
97 97
 
98 98
 
@@ -102,16 +102,16 @@  discard block
 block discarded – undo
102 102
      * @param \Aimeos\MShop\ContextIface $context Context object
103 103
      * @return \Aimeos\MShop\ContextIface Modified context object
104 104
      */
105
-    protected static function addDatabaseManager(\Aimeos\MShop\ContextIface $context) : \Aimeos\MShop\ContextIface
105
+    protected static function addDatabaseManager( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface
106 106
     {
107
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_dbm'])
108
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_dbm']))
107
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_dbm'] )
108
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_dbm'] ) )
109 109
         ) {
110
-            return $fcn($context);
110
+            return $fcn( $context );
111 111
         }
112 112
 
113
-        $dbm = new \Aimeos\Base\DB\Manager\Standard($context->config()->get('resource', []), 'DBAL');
114
-        return $context->setDatabaseManager($dbm);
113
+        $dbm = new \Aimeos\Base\DB\Manager\Standard( $context->config()->get( 'resource', [] ), 'DBAL' );
114
+        return $context->setDatabaseManager( $dbm );
115 115
     }
116 116
 
117 117
 
@@ -121,16 +121,16 @@  discard block
 block discarded – undo
121 121
      * @param \Aimeos\MShop\ContextIface $context Context object
122 122
      * @return \Aimeos\MShop\ContextIface Modified context object
123 123
      */
124
-    protected static function addFilesystemManager(\Aimeos\MShop\ContextIface $context) : \Aimeos\MShop\ContextIface
124
+    protected static function addFilesystemManager( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface
125 125
     {
126
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_fsm'])
127
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_fsm']))
126
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_fsm'] )
127
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_fsm'] ) )
128 128
         ) {
129
-            return $fcn($context);
129
+            return $fcn( $context );
130 130
         }
131 131
 
132
-        $fsm = new \Aimeos\Base\Filesystem\Manager\Standard($context->config()->get('resource', []));
133
-        return $context->setFilesystemManager($fsm);
132
+        $fsm = new \Aimeos\Base\Filesystem\Manager\Standard( $context->config()->get( 'resource', [] ) );
133
+        return $context->setFilesystemManager( $fsm );
134 134
     }
135 135
 
136 136
 
@@ -140,16 +140,16 @@  discard block
 block discarded – undo
140 140
      * @param \Aimeos\MShop\ContextIface $context Context object
141 141
      * @return \Aimeos\MShop\ContextIface Modified context object
142 142
      */
143
-    protected static function addHasher(\Aimeos\MShop\ContextIface $context) : \Aimeos\MShop\ContextIface
143
+    protected static function addHasher( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface
144 144
     {
145
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_hasher'])
146
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_hasher']))
145
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_hasher'] )
146
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_hasher'] ) )
147 147
         ) {
148
-            return $fcn($context);
148
+            return $fcn( $context );
149 149
         }
150 150
 
151
-        $factory = GeneralUtility::makeInstance('TYPO3\CMS\Core\Crypto\PasswordHashing\PasswordHashFactory');
152
-        return $context->setPassword(new \Aimeos\Base\Password\Typo3($factory->getDefaultHashInstance('FE')));
151
+        $factory = GeneralUtility::makeInstance( 'TYPO3\CMS\Core\Crypto\PasswordHashing\PasswordHashFactory' );
152
+        return $context->setPassword( new \Aimeos\Base\Password\Typo3( $factory->getDefaultHashInstance( 'FE' ) ) );
153 153
     }
154 154
 
155 155
 
@@ -159,15 +159,15 @@  discard block
 block discarded – undo
159 159
      * @param \Aimeos\MShop\ContextIface $context Context object
160 160
      * @return \Aimeos\MShop\ContextIface Modified context object
161 161
      */
162
-    protected static function addLogger(\Aimeos\MShop\ContextIface $context) : \Aimeos\MShop\ContextIface
162
+    protected static function addLogger( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface
163 163
     {
164
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_logger'])
165
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_logger']))
164
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_logger'] )
165
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_logger'] ) )
166 166
         ) {
167
-            return $fcn($context);
167
+            return $fcn( $context );
168 168
         }
169 169
 
170
-        return $context->setLogger(\Aimeos\MAdmin::create($context, 'log'));
170
+        return $context->setLogger( \Aimeos\MAdmin::create( $context, 'log' ) );
171 171
     }
172 172
 
173 173
 
@@ -177,17 +177,17 @@  discard block
 block discarded – undo
177 177
      * @param \Aimeos\MShop\ContextIface $context Context object
178 178
      * @return \Aimeos\MShop\ContextIface Modified context object
179 179
      */
180
-    protected static function addMailer(\Aimeos\MShop\ContextIface $context) : \Aimeos\MShop\ContextIface
180
+    protected static function addMailer( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface
181 181
     {
182
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_mailer'])
183
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_mailer']))
182
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_mailer'] )
183
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_mailer'] ) )
184 184
         ) {
185
-            return $fcn($context);
185
+            return $fcn( $context );
186 186
         }
187 187
 
188
-        return $context->setMail(new \Aimeos\Base\Mail\Typo3(function() {
189
-            return GeneralUtility::makeInstance(\TYPO3\CMS\Core\Mail\MailMessage::class);
190
-        }));
188
+        return $context->setMail( new \Aimeos\Base\Mail\Typo3( function() {
189
+            return GeneralUtility::makeInstance( \TYPO3\CMS\Core\Mail\MailMessage::class );
190
+        }) );
191 191
     }
192 192
 
193 193
 
@@ -197,16 +197,16 @@  discard block
 block discarded – undo
197 197
      * @param \Aimeos\MShop\ContextIface $context Context object
198 198
      * @return \Aimeos\MShop\ContextIface Modified context object
199 199
      */
200
-    protected static function addMessageQueueManager(\Aimeos\MShop\ContextIface $context) : \Aimeos\MShop\ContextIface
200
+    protected static function addMessageQueueManager( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface
201 201
     {
202
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_mqueue'])
203
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_mqueue']))
202
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_mqueue'] )
203
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_mqueue'] ) )
204 204
         ) {
205
-            return $fcn($context);
205
+            return $fcn( $context );
206 206
         }
207 207
 
208
-        $mqm = new \Aimeos\Base\MQueue\Manager\Standard($context->config()->get('resource', []));
209
-        return $context->setMessageQueueManager($mqm);
208
+        $mqm = new \Aimeos\Base\MQueue\Manager\Standard( $context->config()->get( 'resource', [] ) );
209
+        return $context->setMessageQueueManager( $mqm );
210 210
     }
211 211
 
212 212
 
@@ -216,15 +216,15 @@  discard block
 block discarded – undo
216 216
      * @param \Aimeos\MShop\ContextIface $context Context object
217 217
      * @return \Aimeos\MShop\ContextIface Modified context object
218 218
      */
219
-    protected static function addNonce(\Aimeos\MShop\ContextIface $context) : \Aimeos\MShop\ContextIface
219
+    protected static function addNonce( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface
220 220
     {
221
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_nounce'])
222
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_nounce']))
221
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_nounce'] )
222
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_nounce'] ) )
223 223
         ) {
224
-            return $fcn($context);
224
+            return $fcn( $context );
225 225
         }
226 226
 
227
-        return $context->setNonce(base64_encode(random_bytes(16)));
227
+        return $context->setNonce( base64_encode( random_bytes( 16 ) ) );
228 228
     }
229 229
 
230 230
 
@@ -234,24 +234,24 @@  discard block
 block discarded – undo
234 234
      * @param \Aimeos\MShop\ContextIface $context Context object
235 235
      * @return \Aimeos\MShop\ContextIface Modified context object
236 236
      */
237
-    protected static function addProcess(\Aimeos\MShop\ContextIface $context) : \Aimeos\MShop\ContextIface
237
+    protected static function addProcess( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface
238 238
     {
239
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_process'])
240
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_process']))
239
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_process'] )
240
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_process'] ) )
241 241
         ) {
242
-            return $fcn($context);
242
+            return $fcn( $context );
243 243
         }
244 244
 
245
-        $process = new \Aimeos\Base\Process\Pcntl(\Aimeos\Aimeos\Base::getExtConfig('pcntlMax', 4));
245
+        $process = new \Aimeos\Base\Process\Pcntl( \Aimeos\Aimeos\Base::getExtConfig( 'pcntlMax', 4 ) );
246 246
 
247 247
         // Reset before child processes are spawned to avoid lost DB connections afterwards
248
-        if (method_exists('\TYPO3\CMS\Core\Database\ConnectionPool', 'resetConnections') === false
248
+        if( method_exists( '\TYPO3\CMS\Core\Database\ConnectionPool', 'resetConnections' ) === false
249 249
             || $process->isAvailable() === false
250 250
         ) {
251 251
             $process = new \Aimeos\Base\Process\None();
252 252
         }
253 253
 
254
-        return $context->setProcess($process);
254
+        return $context->setProcess( $process );
255 255
     }
256 256
 
257 257
 
@@ -261,25 +261,25 @@  discard block
 block discarded – undo
261 261
      * @param \Aimeos\MShop\ContextIface $context Context object
262 262
      * @return \Aimeos\MShop\ContextIface Modified context object
263 263
      */
264
-    protected static function addSession(\Aimeos\MShop\ContextIface $context) : \Aimeos\MShop\ContextIface
264
+    protected static function addSession( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface
265 265
     {
266
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_session'])
267
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_session']))
266
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_session'] )
267
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_session'] ) )
268 268
         ) {
269
-            return $fcn($context);
269
+            return $fcn( $context );
270 270
         }
271 271
 
272 272
         $class = \TYPO3\CMS\Core\Authentication\CommandLineUserAuthentication::class;
273 273
 
274
-        if (isset($GLOBALS['TSFE']->fe_user)) {
275
-            $session = new \Aimeos\Base\Session\Typo3($GLOBALS['TSFE']->fe_user);
276
-        } elseif (isset($GLOBALS['BE_USER']) && !($GLOBALS['BE_USER'] instanceof $class)) {
277
-            $session = new \Aimeos\Base\Session\Typo3($GLOBALS['BE_USER']);
274
+        if( isset( $GLOBALS['TSFE']->fe_user ) ) {
275
+            $session = new \Aimeos\Base\Session\Typo3( $GLOBALS['TSFE']->fe_user );
276
+        } elseif( isset( $GLOBALS['BE_USER'] ) && !( $GLOBALS['BE_USER'] instanceof $class ) ) {
277
+            $session = new \Aimeos\Base\Session\Typo3( $GLOBALS['BE_USER'] );
278 278
         } else {
279 279
             $session = new \Aimeos\Base\Session\None();
280 280
         }
281 281
 
282
-        return $context->setSession($session);
282
+        return $context->setSession( $session );
283 283
     }
284 284
 
285 285
 
@@ -289,22 +289,22 @@  discard block
 block discarded – undo
289 289
      * @param \Aimeos\MShop\ContextIface $context Context object
290 290
      * @return \Aimeos\MShop\ContextIface Modified context object
291 291
      */
292
-    protected static function addToken(\Aimeos\MShop\ContextIface $context) : \Aimeos\MShop\ContextIface
292
+    protected static function addToken( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface
293 293
     {
294
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_token'])
295
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_token']))
294
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_token'] )
295
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_token'] ) )
296 296
         ) {
297
-            return $fcn($context);
297
+            return $fcn( $context );
298 298
         }
299 299
 
300 300
         $session = $context->session();
301 301
 
302
-        if (($token = $session->get('token')) === null) {
303
-            $token = $GLOBALS['TSFE']->fe_user->id ?? md5(microtime(true) . getmypid());
304
-            $session->set('token', $token);
302
+        if( ( $token = $session->get( 'token' ) ) === null ) {
303
+            $token = $GLOBALS['TSFE']->fe_user->id ?? md5( microtime( true ) . getmypid() );
304
+            $session->set( 'token', $token );
305 305
         }
306 306
 
307
-        return $context->setToken($token);
307
+        return $context->setToken( $token );
308 308
     }
309 309
 
310 310
 
@@ -314,28 +314,28 @@  discard block
 block discarded – undo
314 314
      * @param \Aimeos\MShop\ContextIface $context Context object
315 315
      * @return \Aimeos\MShop\ContextIface Modified context object
316 316
      */
317
-    protected static function addUser(\Aimeos\MShop\ContextIface $context) : \Aimeos\MShop\ContextIface
317
+    protected static function addUser( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface
318 318
     {
319
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_user'])
320
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_user']))
319
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_user'] )
320
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_user'] ) )
321 321
         ) {
322
-            return $fcn($context);
322
+            return $fcn( $context );
323 323
         }
324 324
 
325 325
         $appType = null;
326
-        $t3context = GeneralUtility::makeInstance('TYPO3\CMS\Core\Context\Context');
326
+        $t3context = GeneralUtility::makeInstance( 'TYPO3\CMS\Core\Context\Context' );
327 327
 
328
-        if (($GLOBALS['TYPO3_REQUEST'] ?? null) instanceof ServerRequestInterface) {
329
-            $appType = \TYPO3\CMS\Core\Http\ApplicationType::fromRequest($GLOBALS['TYPO3_REQUEST']);
328
+        if( ( $GLOBALS['TYPO3_REQUEST'] ?? null ) instanceof ServerRequestInterface ) {
329
+            $appType = \TYPO3\CMS\Core\Http\ApplicationType::fromRequest( $GLOBALS['TYPO3_REQUEST'] );
330 330
         }
331 331
 
332
-        if ($appType && $appType->isFrontend() && $t3context->getPropertyFromAspect('frontend.user', 'isLoggedIn')) {
333
-            $context->setUserId($GLOBALS['TSFE']->fe_user->user[$GLOBALS['TSFE']->fe_user->userid_column]);
334
-            $context->setEditor((string) $GLOBALS['TSFE']->fe_user->user['username']);
335
-        } elseif ($appType && $appType->isBackend() && isset($GLOBALS['BE_USER']->user['username'])) {
336
-            $context->setEditor((string) $GLOBALS['BE_USER']->user['username']);
332
+        if( $appType && $appType->isFrontend() && $t3context->getPropertyFromAspect( 'frontend.user', 'isLoggedIn' ) ) {
333
+            $context->setUserId( $GLOBALS['TSFE']->fe_user->user[$GLOBALS['TSFE']->fe_user->userid_column] );
334
+            $context->setEditor( (string) $GLOBALS['TSFE']->fe_user->user['username'] );
335
+        } elseif( $appType && $appType->isBackend() && isset( $GLOBALS['BE_USER']->user['username'] ) ) {
336
+            $context->setEditor( (string) $GLOBALS['BE_USER']->user['username'] );
337 337
         } else {
338
-            $context->setEditor((string) GeneralUtility::getIndpEnv('REMOTE_ADDR'));
338
+            $context->setEditor( (string) GeneralUtility::getIndpEnv( 'REMOTE_ADDR' ) );
339 339
         }
340 340
 
341 341
         return $context;
@@ -348,27 +348,27 @@  discard block
 block discarded – undo
348 348
      * @param \Aimeos\MShop\ContextIface $context Context object
349 349
      * @return \Aimeos\MShop\ContextIface Modified context object
350 350
      */
351
-    protected static function addGroups(\Aimeos\MShop\ContextIface $context) : \Aimeos\MShop\ContextIface
351
+    protected static function addGroups( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface
352 352
     {
353
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_groups'])
354
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_groups']))
353
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_groups'] )
354
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_context_groups'] ) )
355 355
         ) {
356
-            return $fcn($context);
356
+            return $fcn( $context );
357 357
         }
358 358
 
359
-        $t3context = GeneralUtility::makeInstance('TYPO3\CMS\Core\Context\Context');
359
+        $t3context = GeneralUtility::makeInstance( 'TYPO3\CMS\Core\Context\Context' );
360 360
 
361 361
         $appType = null;
362
-        if (($GLOBALS['TYPO3_REQUEST'] ?? null) instanceof ServerRequestInterface) {
363
-            $appType = \TYPO3\CMS\Core\Http\ApplicationType::fromRequest($GLOBALS['TYPO3_REQUEST']);
362
+        if( ( $GLOBALS['TYPO3_REQUEST'] ?? null ) instanceof ServerRequestInterface ) {
363
+            $appType = \TYPO3\CMS\Core\Http\ApplicationType::fromRequest( $GLOBALS['TYPO3_REQUEST'] );
364 364
         }
365 365
 
366
-        if ($appType && $appType->isFrontend() && $t3context->getPropertyFromAspect('frontend.user', 'isLoggedIn')) {
367
-            $ids = GeneralUtility::trimExplode(',', $GLOBALS['TSFE']->fe_user->user['usergroup']);
368
-            $context->setGroupIds($ids);
369
-        } elseif ($appType && $appType->isBackend() && $GLOBALS['BE_USER']->userGroups) {
370
-            $ids = array_keys($GLOBALS['BE_USER']->userGroups);
371
-            $context->setGroupIds($ids);
366
+        if( $appType && $appType->isFrontend() && $t3context->getPropertyFromAspect( 'frontend.user', 'isLoggedIn' ) ) {
367
+            $ids = GeneralUtility::trimExplode( ',', $GLOBALS['TSFE']->fe_user->user['usergroup'] );
368
+            $context->setGroupIds( $ids );
369
+        } elseif( $appType && $appType->isBackend() && $GLOBALS['BE_USER']->userGroups ) {
370
+            $ids = array_keys( $GLOBALS['BE_USER']->userGroups );
371
+            $context->setGroupIds( $ids );
372 372
         }
373 373
 
374 374
         return $context;
@@ -381,20 +381,20 @@  discard block
 block discarded – undo
381 381
      * @param \Aimeos\MShop\ContextIface $context Context object including config
382 382
      * @return \Aimeos\MShop\ContextIface Modified context object
383 383
      */
384
-    protected static function addDateTime(\Aimeos\MShop\ContextIface $context) : \Aimeos\MShop\ContextIface
384
+    protected static function addDateTime( \Aimeos\MShop\ContextIface $context ) : \Aimeos\MShop\ContextIface
385 385
     {
386 386
         $appType = null;
387
-        if (($GLOBALS['TYPO3_REQUEST'] ?? null) instanceof ServerRequestInterface) {
388
-            $appType = \TYPO3\CMS\Core\Http\ApplicationType::fromRequest($GLOBALS['TYPO3_REQUEST']);
387
+        if( ( $GLOBALS['TYPO3_REQUEST'] ?? null ) instanceof ServerRequestInterface ) {
388
+            $appType = \TYPO3\CMS\Core\Http\ApplicationType::fromRequest( $GLOBALS['TYPO3_REQUEST'] );
389 389
         }
390 390
 
391
-        if ($appType && $appType->isFrontend() && isset($GLOBALS['BE_USER']->adminPanel)
392
-            && class_exists('TYPO3\\CMS\\Adminpanel\\Service\\ConfigurationService')) {
393
-            $service = GeneralUtility::makeInstance('TYPO3\\CMS\\Adminpanel\\Service\\ConfigurationService');
394
-            $tstamp = strtotime($service->getConfigurationOption('preview', 'simulateDate'));
391
+        if( $appType && $appType->isFrontend() && isset( $GLOBALS['BE_USER']->adminPanel )
392
+            && class_exists( 'TYPO3\\CMS\\Adminpanel\\Service\\ConfigurationService' ) ) {
393
+            $service = GeneralUtility::makeInstance( 'TYPO3\\CMS\\Adminpanel\\Service\\ConfigurationService' );
394
+            $tstamp = strtotime( $service->getConfigurationOption( 'preview', 'simulateDate' ) );
395 395
 
396
-            if (!empty($tstamp)) {
397
-                $context->setDateTime(date('Y-m-d H:i:s', $tstamp));
396
+            if( !empty( $tstamp ) ) {
397
+                $context->setDateTime( date( 'Y-m-d H:i:s', $tstamp ) );
398 398
             }
399 399
         }
400 400
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,8 @@
 block discarded – undo
77 77
 
78 78
         $cacheName = \Aimeos\Aimeos\Base::getExtConfig('cacheName', 'Typo3');
79 79
 
80
-        switch ($cacheName) {
80
+        switch ($cacheName)
81
+        {
81 82
             case 'None':
82 83
                 $context->config()->set('client/html/basket/cache/enable', false);
83 84
                 $cache = \Aimeos\Base\Cache\Factory::create('None');
Please login to merge, or discard this patch.
Classes/Base/View.php 1 patch
Spacing   +120 added lines, -120 removed lines patch added patch discarded remove patch
@@ -30,40 +30,40 @@  discard block
 block discarded – undo
30 30
      * @param string|null $locale Code of the current language or null for no translation
31 31
      * @return \Aimeos\Base\View\Iface View object
32 32
      */
33
-    public static function get(\Aimeos\MShop\ContextIface $context, $uriBuilder, array $templatePaths,
34
-        \TYPO3\CMS\Extbase\Mvc\RequestInterface $request = null, string $locale = null) : \Aimeos\Base\View\Iface
33
+    public static function get( \Aimeos\MShop\ContextIface $context, $uriBuilder, array $templatePaths,
34
+        \TYPO3\CMS\Extbase\Mvc\RequestInterface $request = null, string $locale = null ) : \Aimeos\Base\View\Iface
35 35
     {
36
-        $configManager = GeneralUtility::makeInstance(ConfigurationManager::class);
37
-        $config = $configManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_FRAMEWORK);
36
+        $configManager = GeneralUtility::makeInstance( ConfigurationManager::class );
37
+        $config = $configManager->getConfiguration( ConfigurationManager::CONFIGURATION_TYPE_FRAMEWORK );
38 38
 
39
-        $view = GeneralUtility::makeInstance(\TYPO3\CMS\Fluid\View\StandaloneView::class);
39
+        $view = GeneralUtility::makeInstance( \TYPO3\CMS\Fluid\View\StandaloneView::class );
40 40
         $view->setPartialRootPaths( $config['view']['partialRootPaths'] ?? [] );
41 41
         $view->setLayoutRootPaths( $config['view']['layoutRootPaths'] ?? [] );
42 42
 
43
-        $engines = ['.html' => new \Aimeos\Base\View\Engine\Typo3($view)];
43
+        $engines = ['.html' => new \Aimeos\Base\View\Engine\Typo3( $view )];
44 44
 
45 45
         $prefix = 'ai';
46
-        if ($uriBuilder instanceof \TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder) {
46
+        if( $uriBuilder instanceof \TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder ) {
47 47
             $prefix = $uriBuilder->getArgumentPrefix();
48 48
         }
49 49
 
50
-        $view = new \Aimeos\Base\View\Standard($templatePaths, $engines);
50
+        $view = new \Aimeos\Base\View\Standard( $templatePaths, $engines );
51 51
         $view->prefix = $prefix;
52 52
 
53 53
         $config = $context->config();
54 54
         $session = $context->session();
55 55
 
56
-        self::addTranslate($view, $locale, $config->get('i18n', []));
57
-        self::addParam($view, $request);
58
-        self::addConfig($view, $config);
59
-        self::addDate($view, $config, $locale);
60
-        self::addFormparam($view, [$prefix]);
61
-        self::addNumber($view, $config, $locale);
62
-        self::addUrl($view, $config, $uriBuilder, $request);
63
-        self::addSession($view, $session);
64
-        self::addRequest($view, $request);
65
-        self::addResponse($view);
66
-        self::addAccess($view);
56
+        self::addTranslate( $view, $locale, $config->get( 'i18n', [] ) );
57
+        self::addParam( $view, $request );
58
+        self::addConfig( $view, $config );
59
+        self::addDate( $view, $config, $locale );
60
+        self::addFormparam( $view, [$prefix] );
61
+        self::addNumber( $view, $config, $locale );
62
+        self::addUrl( $view, $config, $uriBuilder, $request );
63
+        self::addSession( $view, $session );
64
+        self::addRequest( $view, $request );
65
+        self::addResponse( $view );
66
+        self::addAccess( $view );
67 67
 
68 68
         return $view;
69 69
     }
@@ -75,40 +75,40 @@  discard block
 block discarded – undo
75 75
      * @param \Aimeos\Base\View\Iface $view View object
76 76
      * @return \Aimeos\Base\View\Iface Modified view object
77 77
      */
78
-    protected static function addAccess(\Aimeos\Base\View\Iface $view) : \Aimeos\Base\View\Iface
78
+    protected static function addAccess( \Aimeos\Base\View\Iface $view ) : \Aimeos\Base\View\Iface
79 79
     {
80
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_access'])
81
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_access']))
80
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_access'] )
81
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_access'] ) )
82 82
         ) {
83
-            return $fcn($view);
83
+            return $fcn( $view );
84 84
         }
85 85
 
86 86
         $appType = null;
87
-        if (($GLOBALS['TYPO3_REQUEST'] ?? null) instanceof \TYPO3\CMS\Core\Http\ServerRequest) {
88
-            $appType = \TYPO3\CMS\Core\Http\ApplicationType::fromRequest($GLOBALS['TYPO3_REQUEST']);
87
+        if( ( $GLOBALS['TYPO3_REQUEST'] ?? null ) instanceof \TYPO3\CMS\Core\Http\ServerRequest ) {
88
+            $appType = \TYPO3\CMS\Core\Http\ApplicationType::fromRequest( $GLOBALS['TYPO3_REQUEST'] );
89 89
         }
90 90
 
91
-        if ($appType && $appType->isBackend()) {
92
-            if ($GLOBALS['BE_USER']->isAdmin() === false) {
91
+        if( $appType && $appType->isBackend() ) {
92
+            if( $GLOBALS['BE_USER']->isAdmin() === false ) {
93 93
                 $groups = [];
94
-                foreach ((array) $GLOBALS['BE_USER']->userGroups as $entry) {
94
+                foreach( (array) $GLOBALS['BE_USER']->userGroups as $entry ) {
95 95
                     $groups[] = $entry['title'];
96 96
                 }
97
-                $helper = new \Aimeos\Base\View\Helper\Access\Standard($view, $groups);
97
+                $helper = new \Aimeos\Base\View\Helper\Access\Standard( $view, $groups );
98 98
             } else {
99
-                $helper = new \Aimeos\Base\View\Helper\Access\All($view);
99
+                $helper = new \Aimeos\Base\View\Helper\Access\All( $view );
100 100
             }
101 101
         } else {
102
-            $t3context = GeneralUtility::makeInstance('TYPO3\CMS\Core\Context\Context');
102
+            $t3context = GeneralUtility::makeInstance( 'TYPO3\CMS\Core\Context\Context' );
103 103
 
104
-            if ($t3context->getPropertyFromAspect('frontend.user', 'isLoggedIn')) {
105
-                $helper = new \Aimeos\Base\View\Helper\Access\Standard($view, $GLOBALS['TSFE']->fe_user->groupData['title']);
104
+            if( $t3context->getPropertyFromAspect( 'frontend.user', 'isLoggedIn' ) ) {
105
+                $helper = new \Aimeos\Base\View\Helper\Access\Standard( $view, $GLOBALS['TSFE']->fe_user->groupData['title'] );
106 106
             } else {
107
-                $helper = new \Aimeos\Base\View\Helper\Access\Standard($view, []);
107
+                $helper = new \Aimeos\Base\View\Helper\Access\Standard( $view, [] );
108 108
             }
109 109
         }
110 110
 
111
-        $view->addHelper('access', $helper);
111
+        $view->addHelper( 'access', $helper );
112 112
 
113 113
         return $view;
114 114
     }
@@ -121,17 +121,17 @@  discard block
 block discarded – undo
121 121
      * @param \Aimeos\Base\Config\Iface $config Configuration object
122 122
      * @return \Aimeos\Base\View\Iface Modified view object
123 123
      */
124
-    protected static function addConfig(\Aimeos\Base\View\Iface $view, \Aimeos\Base\Config\Iface $config) : \Aimeos\Base\View\Iface
124
+    protected static function addConfig( \Aimeos\Base\View\Iface $view, \Aimeos\Base\Config\Iface $config ) : \Aimeos\Base\View\Iface
125 125
     {
126
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_config'])
127
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_config']))
126
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_config'] )
127
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_config'] ) )
128 128
         ) {
129
-            return $fcn($view, $config);
129
+            return $fcn( $view, $config );
130 130
         }
131 131
 
132
-        $conf = new \Aimeos\Base\Config\Decorator\Protect(clone $config, ['resource/*/baseurl'], ['resource']);
133
-        $helper = new \Aimeos\Base\View\Helper\Config\Standard($view, $conf);
134
-        $view->addHelper('config', $helper);
132
+        $conf = new \Aimeos\Base\Config\Decorator\Protect( clone $config, ['resource/*/baseurl'], ['resource'] );
133
+        $helper = new \Aimeos\Base\View\Helper\Config\Standard( $view, $conf );
134
+        $view->addHelper( 'config', $helper );
135 135
 
136 136
         return $view;
137 137
     }
@@ -145,19 +145,19 @@  discard block
 block discarded – undo
145 145
      * @param string|null $locale (Country specific) language code
146 146
      * @return \Aimeos\Base\View\Iface Modified view object
147 147
      */
148
-    protected static function addDate(\Aimeos\Base\View\Iface $view, \Aimeos\Base\Config\Iface $config,
149
-        string $locale = null) : \Aimeos\Base\View\Iface
148
+    protected static function addDate( \Aimeos\Base\View\Iface $view, \Aimeos\Base\Config\Iface $config,
149
+        string $locale = null ) : \Aimeos\Base\View\Iface
150 150
     {
151
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_date'])
152
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_date']))
151
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_date'] )
152
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_date'] ) )
153 153
         ) {
154
-            return $fcn($view, $config, $locale);
154
+            return $fcn( $view, $config, $locale );
155 155
         }
156 156
 
157
-        $format = $config->get('client/html/common/date/format');
157
+        $format = $config->get( 'client/html/common/date/format' );
158 158
 
159
-        $helper = new \Aimeos\Base\View\Helper\Date\Standard($view, $format);
160
-        $view->addHelper('date', $helper);
159
+        $helper = new \Aimeos\Base\View\Helper\Date\Standard( $view, $format );
160
+        $view->addHelper( 'date', $helper );
161 161
 
162 162
         return $view;
163 163
     }
@@ -170,16 +170,16 @@  discard block
 block discarded – undo
170 170
      * @param array $prefixes List of prefixes for the form name to build multi-dimensional arrays
171 171
      * @return \Aimeos\Base\View\Iface Modified view object
172 172
      */
173
-    protected static function addFormparam(\Aimeos\Base\View\Iface $view, array $prefixes) : \Aimeos\Base\View\Iface
173
+    protected static function addFormparam( \Aimeos\Base\View\Iface $view, array $prefixes ) : \Aimeos\Base\View\Iface
174 174
     {
175
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_formparam'])
176
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_formparam']))
175
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_formparam'] )
176
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_formparam'] ) )
177 177
         ) {
178
-            return $fcn($view, $prefixes);
178
+            return $fcn( $view, $prefixes );
179 179
         }
180 180
 
181
-        $helper = new \Aimeos\Base\View\Helper\Formparam\Standard($view, $prefixes);
182
-        $view->addHelper('formparam', $helper);
181
+        $helper = new \Aimeos\Base\View\Helper\Formparam\Standard( $view, $prefixes );
182
+        $view->addHelper( 'formparam', $helper );
183 183
 
184 184
         return $view;
185 185
     }
@@ -193,19 +193,19 @@  discard block
 block discarded – undo
193 193
      * @param string|null $locale (Country specific) language code
194 194
      * @return \Aimeos\Base\View\Iface Modified view object
195 195
      */
196
-    protected static function addNumber(\Aimeos\Base\View\Iface $view, \Aimeos\Base\Config\Iface $config,
197
-        string $locale = null) : \Aimeos\Base\View\Iface
196
+    protected static function addNumber( \Aimeos\Base\View\Iface $view, \Aimeos\Base\Config\Iface $config,
197
+        string $locale = null ) : \Aimeos\Base\View\Iface
198 198
     {
199
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_number'])
200
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_number']))
199
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_number'] )
200
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_number'] ) )
201 201
         ) {
202
-            return $fcn($view, $config, $locale);
202
+            return $fcn( $view, $config, $locale );
203 203
         }
204 204
 
205
-        $format = $config->get('client/html/common/number/format');
205
+        $format = $config->get( 'client/html/common/number/format' );
206 206
 
207
-        $helper = new \Aimeos\Base\View\Helper\Number\Locale($view, $locale ?? 'en', $format);
208
-        $view->addHelper('number', $helper);
207
+        $helper = new \Aimeos\Base\View\Helper\Number\Locale( $view, $locale ?? 'en', $format );
208
+        $view->addHelper( 'number', $helper );
209 209
 
210 210
         return $view;
211 211
     }
@@ -218,18 +218,18 @@  discard block
 block discarded – undo
218 218
      * @param \TYPO3\CMS\Extbase\Mvc\RequestInterface|null $request Request object or null if not available
219 219
      * @return \Aimeos\Base\View\Iface Modified view object
220 220
      */
221
-    protected static function addParam(\Aimeos\Base\View\Iface $view,
222
-        \TYPO3\CMS\Extbase\Mvc\RequestInterface $request = null) : \Aimeos\Base\View\Iface
221
+    protected static function addParam( \Aimeos\Base\View\Iface $view,
222
+        \TYPO3\CMS\Extbase\Mvc\RequestInterface $request = null ) : \Aimeos\Base\View\Iface
223 223
     {
224
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_param'])
225
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_param']))
224
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_param'] )
225
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_param'] ) )
226 226
         ) {
227
-            return $fcn($view, $request);
227
+            return $fcn( $view, $request );
228 228
         }
229 229
 
230 230
         $params = $request ? $request->getArguments() : [];
231
-        $helper = new \Aimeos\Base\View\Helper\Param\Standard($view, $params['ai'] ?? $params);
232
-        $view->addHelper('param', $helper);
231
+        $helper = new \Aimeos\Base\View\Helper\Param\Standard( $view, $params['ai'] ?? $params );
232
+        $view->addHelper( 'param', $helper );
233 233
 
234 234
         return $view;
235 235
     }
@@ -242,21 +242,21 @@  discard block
 block discarded – undo
242 242
      * @param \TYPO3\CMS\Extbase\Mvc\RequestInterface|null $request Request object
243 243
      * @return \Aimeos\Base\View\Iface Modified view object
244 244
      */
245
-    protected static function addRequest(\Aimeos\Base\View\Iface $view,
246
-        \TYPO3\CMS\Extbase\Mvc\RequestInterface $request = null) : \Aimeos\Base\View\Iface
245
+    protected static function addRequest( \Aimeos\Base\View\Iface $view,
246
+        \TYPO3\CMS\Extbase\Mvc\RequestInterface $request = null ) : \Aimeos\Base\View\Iface
247 247
     {
248
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_request'])
249
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_request']))
248
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_request'] )
249
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_request'] ) )
250 250
         ) {
251
-            return $fcn($view, $request);
251
+            return $fcn( $view, $request );
252 252
         }
253 253
 
254 254
         $target = $GLOBALS["TSFE"]->id ?? null;
255 255
         $get = GeneralUtility::_GET();
256 256
         $post = GeneralUtility::_POST();
257 257
 
258
-        $helper = new \Aimeos\Base\View\Helper\Request\Typo3($view, $target, $_FILES, $get, $post, $_COOKIE, $_SERVER);
259
-        $view->addHelper('request', $helper);
258
+        $helper = new \Aimeos\Base\View\Helper\Request\Typo3( $view, $target, $_FILES, $get, $post, $_COOKIE, $_SERVER );
259
+        $view->addHelper( 'request', $helper );
260 260
 
261 261
         return $view;
262 262
     }
@@ -268,16 +268,16 @@  discard block
 block discarded – undo
268 268
      * @param \Aimeos\Base\View\Iface $view View object
269 269
      * @return \Aimeos\Base\View\Iface Modified view object
270 270
      */
271
-    protected static function addResponse(\Aimeos\Base\View\Iface $view) : \Aimeos\Base\View\Iface
271
+    protected static function addResponse( \Aimeos\Base\View\Iface $view ) : \Aimeos\Base\View\Iface
272 272
     {
273
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_response'])
274
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_response']))
273
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_response'] )
274
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_response'] ) )
275 275
         ) {
276
-            return $fcn($view);
276
+            return $fcn( $view );
277 277
         }
278 278
 
279
-        $helper = new \Aimeos\Base\View\Helper\Response\Typo3($view);
280
-        $view->addHelper('response', $helper);
279
+        $helper = new \Aimeos\Base\View\Helper\Response\Typo3( $view );
280
+        $view->addHelper( 'response', $helper );
281 281
 
282 282
         return $view;
283 283
     }
@@ -290,10 +290,10 @@  discard block
 block discarded – undo
290 290
      * @param \Aimeos\Base\Session\Iface $session Session object
291 291
      * @return \Aimeos\Base\View\Iface Modified view object
292 292
      */
293
-    protected static function addSession(\Aimeos\Base\View\Iface $view, \Aimeos\Base\Session\Iface $session) : \Aimeos\Base\View\Iface
293
+    protected static function addSession( \Aimeos\Base\View\Iface $view, \Aimeos\Base\Session\Iface $session ) : \Aimeos\Base\View\Iface
294 294
     {
295
-        $helper = new \Aimeos\Base\View\Helper\Session\Standard($view, $session);
296
-        $view->addHelper('session', $helper);
295
+        $helper = new \Aimeos\Base\View\Helper\Session\Standard( $view, $session );
296
+        $view->addHelper( 'session', $helper );
297 297
 
298 298
         return $view;
299 299
     }
@@ -307,23 +307,23 @@  discard block
 block discarded – undo
307 307
      * @param array $local Local translations
308 308
      * @return \Aimeos\Base\View\Iface Modified view object
309 309
      */
310
-    protected static function addTranslate(\Aimeos\Base\View\Iface $view, string $langid = null, array $local) : \Aimeos\Base\View\Iface
310
+    protected static function addTranslate( \Aimeos\Base\View\Iface $view, string $langid = null, array $local ) : \Aimeos\Base\View\Iface
311 311
     {
312
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_translate'])
313
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_translate']))
312
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_translate'] )
313
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_translate'] ) )
314 314
         ) {
315
-            return $fcn($view, $langid, $local);
315
+            return $fcn( $view, $langid, $local );
316 316
         }
317 317
 
318
-        if ($langid) {
319
-            $i18n = \Aimeos\Aimeos\Base::i18n([$langid], $local);
318
+        if( $langid ) {
319
+            $i18n = \Aimeos\Aimeos\Base::i18n( [$langid], $local );
320 320
             $translation = $i18n[$langid];
321 321
         } else {
322
-            $translation = new \Aimeos\Base\Translation\None('en');
322
+            $translation = new \Aimeos\Base\Translation\None( 'en' );
323 323
         }
324 324
 
325
-        $helper = new \Aimeos\Base\View\Helper\Translate\Standard($view, $translation);
326
-        $view->addHelper('translate', $helper);
325
+        $helper = new \Aimeos\Base\View\Helper\Translate\Standard( $view, $translation );
326
+        $view->addHelper( 'translate', $helper );
327 327
 
328 328
         return $view;
329 329
     }
@@ -338,54 +338,54 @@  discard block
 block discarded – undo
338 338
      * @param \TYPO3\CMS\Extbase\Mvc\RequestInterface|null $request Request object
339 339
      * @return \Aimeos\Base\View\Iface Modified view object
340 340
      */
341
-    protected static function addUrl(\Aimeos\Base\View\Iface $view, \Aimeos\Base\Config\Iface $config, $uriBuilder,
342
-        \TYPO3\CMS\Extbase\Mvc\RequestInterface $request = null) : \Aimeos\Base\View\Iface
341
+    protected static function addUrl( \Aimeos\Base\View\Iface $view, \Aimeos\Base\Config\Iface $config, $uriBuilder,
342
+        \TYPO3\CMS\Extbase\Mvc\RequestInterface $request = null ) : \Aimeos\Base\View\Iface
343 343
     {
344
-        if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_url'])
345
-            && is_callable(($fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_url']))
344
+        if( isset( $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_url'] )
345
+            && is_callable( ( $fcn = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['aimeos']['aimeos_view_url'] ) )
346 346
         ) {
347
-            return $fcn($view, $config, $uriBuilder, $request);
347
+            return $fcn( $view, $config, $uriBuilder, $request );
348 348
         }
349 349
 
350 350
         $fixed = [];
351 351
 
352
-        if ($request) {
353
-            $name = $config->get('typo3/param/name/site', 'site');
352
+        if( $request ) {
353
+            $name = $config->get( 'typo3/param/name/site', 'site' );
354 354
 
355
-            if ($request !== null && $request->hasArgument($name) === true) {
356
-                $fixed[$name] = $request->getArgument($name);
357
-            } elseif (($value = GeneralUtility::_GP('S')) !== null) {
355
+            if( $request !== null && $request->hasArgument( $name ) === true ) {
356
+                $fixed[$name] = $request->getArgument( $name );
357
+            } elseif( ( $value = GeneralUtility::_GP( 'S' ) ) !== null ) {
358 358
                 $fixed['S'] = $value;
359 359
             }
360 360
 
361 361
 
362
-            $name = $config->get('typo3/param/name/language', 'locale');
362
+            $name = $config->get( 'typo3/param/name/language', 'locale' );
363 363
 
364
-            if ($request !== null && $request->hasArgument($name) === true) {
365
-                $fixed[$name] = $request->getArgument($name);
364
+            if( $request !== null && $request->hasArgument( $name ) === true ) {
365
+                $fixed[$name] = $request->getArgument( $name );
366 366
             } else { // TYPO3 9+
367
-                $fixed['L'] = GeneralUtility::makeInstance('TYPO3\CMS\Core\Context\Context')->getAspect('language')->getId();
367
+                $fixed['L'] = GeneralUtility::makeInstance( 'TYPO3\CMS\Core\Context\Context' )->getAspect( 'language' )->getId();
368 368
             }
369 369
 
370 370
 
371
-            $name = $config->get('typo3/param/name/currency', 'currency');
371
+            $name = $config->get( 'typo3/param/name/currency', 'currency' );
372 372
 
373
-            if ($request !== null && $request->hasArgument($name) === true) {
374
-                $fixed[$name] = $request->getArgument($name);
375
-            } elseif (($value = GeneralUtility::_GP('C')) !== null) {
373
+            if( $request !== null && $request->hasArgument( $name ) === true ) {
374
+                $fixed[$name] = $request->getArgument( $name );
375
+            } elseif( ( $value = GeneralUtility::_GP( 'C' ) ) !== null ) {
376 376
                 $fixed['C'] = $value;
377 377
             }
378 378
         }
379 379
 
380
-        if ($uriBuilder instanceof \TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder) {
381
-            $url = new \Aimeos\Base\View\Helper\Url\Typo3($view, $uriBuilder, $fixed);
382
-        } elseif ($uriBuilder instanceof \TYPO3\CMS\Core\Routing\RouterInterface) {
383
-            $url = new \Aimeos\Base\View\Helper\Url\T3Router($view, $uriBuilder, $fixed);
380
+        if( $uriBuilder instanceof \TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder ) {
381
+            $url = new \Aimeos\Base\View\Helper\Url\Typo3( $view, $uriBuilder, $fixed );
382
+        } elseif( $uriBuilder instanceof \TYPO3\CMS\Core\Routing\RouterInterface ) {
383
+            $url = new \Aimeos\Base\View\Helper\Url\T3Router( $view, $uriBuilder, $fixed );
384 384
         } else {
385
-            throw new \RuntimeException('No router for generating URLs available');
385
+            throw new \RuntimeException( 'No router for generating URLs available' );
386 386
         }
387 387
 
388
-        $view->addHelper('url', $url);
388
+        $view->addHelper( 'url', $url );
389 389
 
390 390
         return $view;
391 391
     }
Please login to merge, or discard this patch.
Classes/Widgets/LatestOrdersWidget.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     }
36 36
 
37 37
 
38
-    public function setRequest(ServerRequestInterface $request): void
38
+    public function setRequest( ServerRequestInterface $request ): void
39 39
     {
40 40
         $this->request = $request;
41 41
     }
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
      */
49 49
     public function renderWidgetContent(): string
50 50
     {
51
-        $view = $this->backendViewFactory->create($this->request);
52
-        return $this->view->assign('items', $this->getOrderItems())
53
-            ->render('Widgets/LatestOrdersWidget');
51
+        $view = $this->backendViewFactory->create( $this->request );
52
+        return $this->view->assign( 'items', $this->getOrderItems() )
53
+            ->render( 'Widgets/LatestOrdersWidget' );
54 54
     }
55 55
 
56 56
 
@@ -62,11 +62,11 @@  discard block
 block discarded – undo
62 62
     protected function getOrderItems() : array
63 63
     {
64 64
         $config = \Aimeos\Aimeos\Base::config();
65
-        $context = \Aimeos\Aimeos\Base::context($config);
65
+        $context = \Aimeos\Aimeos\Base::context( $config );
66 66
 
67
-        $manager = \Aimeos\MShop::create($context, 'order');
68
-        $filter = $manager->filter()->sort('-order.id')->slice(0, 20);
67
+        $manager = \Aimeos\MShop::create( $context, 'order' );
68
+        $filter = $manager->filter()->sort( '-order.id' )->slice( 0, 20 );
69 69
 
70
-        return $manager->search($filter, ['order/base/address'])->toArray();
70
+        return $manager->search( $filter, ['order/base/address'] )->toArray();
71 71
     }
72 72
 }
73 73
\ No newline at end of file
Please login to merge, or discard this patch.