forked from DMKEBUSINESSGMBH/typo3-mksearch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_tables.php
61 lines (51 loc) · 2.42 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
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
$_EXT_PATH = tx_rnbase_util_Extensions::extPath($_EXTKEY);
// Show tt_content-field pi_flexform
$TCA['tt_content']['types']['list']['subtypes_addlist']['tx_mksearch'] = 'pi_flexform';
// Hide some fields
$TCA['tt_content']['types']['list']['subtypes_excludelist']['tx_mksearch'] = 'select_key';
//add our own header_layout. this one isn't displayed in the FE (like the Hidden type)
//as long as there is no additional configuration how to display this type.
//so this type is just like the 100 type in the FE but this type is indexed instead
//of the standard type (100)
$aTempConfig = $TCA['tt_content']['columns']['header_layout']['config']['items'];
$aTempConfig[] = array('LLL:EXT:'.$_EXTKEY.'/locallang_db.xml:plugin.mksearch.tt_content.header_layout', '101');
$TCA['tt_content']['columns']['header_layout']['config']['items'] = $aTempConfig;
// Add flexform and plugin
tx_rnbase_util_Extensions::addPiFlexFormValue('tx_mksearch', 'FILE:EXT:'.$_EXTKEY.'/flexform_main.xml');
tx_rnbase_util_Extensions::addPlugin(
['LLL:EXT:'.$_EXTKEY.'/locallang_db.xml:plugin.mksearch.label', 'tx_mksearch'],
'list_type',
'mksearch'
);
tx_rnbase_util_Extensions::addStaticFile($_EXTKEY, 'static/static_extension_template/', 'MK Search');
// initalize 'context sensitive help' (csh)
require_once $_EXT_PATH.'res/help/ext_csh.php';
if (TYPO3_MODE == 'BE') {
require_once $_EXT_PATH.'mod1/ext_tables.php';
// Add plugin wizards
// register icon
Tx_Rnbase_Backend_Utility_Icons::getIconRegistry()->registerIcon(
'ext-mksearch-wizard-icon',
'TYPO3\\CMS\Core\\Imaging\\IconProvider\\BitmapIconProvider',
array('source' => 'EXT:mksearch/ext_icon.gif')
);
// Wizardkonfiguration hinzufügen
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
'<INCLUDE_TYPOSCRIPT: source="FILE:EXT:mksearch/Configuration/TSconfig/ContentElementWizard.txt">'
);
// icon für sysfolder registrieren
$GLOBALS['TCA']['pages']['columns']['module']['config']['items'][] = array(
'MK Search',
'mksearch',
'apps-pagetree-folder-contains-mksearch',
);
Tx_Rnbase_Backend_Utility_Icons::getIconRegistry()->registerIcon(
'apps-pagetree-folder-contains-mksearch',
'TYPO3\\CMS\Core\\Imaging\\IconProvider\\BitmapIconProvider',
array('source' => 'EXT:mksearch/icons/icon_folder.gif')
);
}