forked from aimeos/aimeos-typo3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_tables.php
90 lines (72 loc) · 2.54 KB
/
ext_tables.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?php
if( !defined( 'TYPO3_MODE' ) ) {
die ( 'Access denied.' );
}
$aimeosExtPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath( 'aimeos' );
if( file_exists( $aimeosExtPath . '/Resources/Libraries/autoload.php' ) === true ) {
require_once $aimeosExtPath . '/Resources/Libraries/autoload.php';
}
if( TYPO3_MODE === 'BE' )
{
/**
* Register Aimeos icon
*/
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( \TYPO3\CMS\Core\Imaging\IconRegistry::class );
$iconRegistry->registerIcon(
'aimeos-shop',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:aimeos/Resources/Public/Icons/Extension.svg']
);
/**
* Register backend module
*/
$_aimeosConfiguration = array(
'access' => 'user,group',
'icon' => 'EXT:aimeos/Resources/Public/Icons/Extension.svg',
'labels' => 'LLL:EXT:aimeos/Resources/Private/Language/admin.xlf',
);
if( (bool) \Aimeos\Aimeos\Base::getExtConfig( 'showPageTree', false ) == false )
{
$_aimeosConfiguration['navigationComponentId'] = null;
$_aimeosConfiguration['inheritNavigationComponentFromMainModule'] = false;
}
$name = defined( 'TYPO3_version' ) && version_compare( constant( 'TYPO3_version' ), '11.0.0', '<' ) ? 'Aimeos.' : '';
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
$name . 'aimeos',
'web',
'tx_aimeos_admin',
'', // position
[
'Aimeos\\Aimeos\\Controller\\AdminController' => 'index',
'Aimeos\\Aimeos\\Controller\\JqadmController' => 'search,copy,create,delete,export,get,import,save,file',
'Aimeos\\Aimeos\\Controller\\JsonadmController' => 'index',
],
$_aimeosConfiguration
);
$signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( 'TYPO3\\CMS\\Extbase\\SignalSlot\\Dispatcher' );
/**
* Execute the setup tasks automatically to create the required tables
*/
$signalSlotDispatcher->connect(
'TYPO3\\CMS\\Extensionmanager\\Service\\ExtensionManagementService',
'hasInstalledExtensions', // @deprecated, use "afterExtensionInstall" in TYPO3 10+ and PSR Events in 11+
'Aimeos\\Aimeos\\Setup',
'signal'
);
$signalSlotDispatcher->connect(
'TYPO3\CMS\Extensionmanager\Utility\InstallUtility',
'afterExtensionInstall', // @deprecated, use PSR Events in 11+
'Aimeos\\Aimeos\\Setup',
'signal'
);
/**
* Prevent install tool from dropping Aimeos tables
*/
$signalSlotDispatcher->connect(
'TYPO3\\CMS\\Install\\Service\\SqlExpectedSchemaService',
'tablesDefinitionIsBeingBuilt', // @deprecated, use PSR Events in 11+
'Aimeos\\Aimeos\\Setup',
'schema'
);
}
?>