forked from jonathanheilmann/ext-jh_magnificpopup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_tables.php
46 lines (39 loc) · 2.19 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
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
// get extension configuration
$confArr = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['jh_magnificpopup']);
// Add frontend plugin
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
$_EXTKEY,
'Pi1',
'Magnific Popup'
);
// Add flexform for frontend plugin
$extensionName = \TYPO3\CMS\Core\Utility\GeneralUtility::underscoredToUpperCamelCase($_EXTKEY);
$pluginSignature = strtolower($extensionName) . '_pi1';
$TCA['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($pluginSignature, 'FILE:EXT:'.$_EXTKEY.'/Configuration/FlexForms/MagnificpopupPlugin.xml');
$TCA['tt_content']['types']['list']['subtypes_excludelist'][$pluginSignature]='layout,select_key,pages,recursive';
// Add static files
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript/Default', 'Magnific Popup');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript/RTELightbox', 'Magnific Popup for RTE');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript/Inline', 'Magnific Popup - Content Element');
// Wizard for frontend plugin
if (TYPO3_MODE == 'BE') {
$TBE_MODULES_EXT['xMOD_db_new_content_el']['addElClasses'][$pluginSignature . '_wizicon'] =
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Resources/Private/Php/class.' . $_EXTKEY . '_wizicon.php';
}
// Add colPos for content elements
if (TYPO3_MODE == 'BE') {
if (! isset($TCA['tt_content']['columns']['colPos']['config']['items'][$confArr['colPosOfIrreContent']])) {
// Add the new colPos to the array, only if the ID does not exist...
$TCA['tt_content']['columns']['colPos']['config']['items'][$confArr['colPosOfIrreContent']] = array($_EXTKEY, $confArr['colPosOfIrreContent']);
}
}
// Add special mfp palette
$GLOBALS['TCA']['sys_file_reference']['palettes']['mfpPalette'] = array(
'showitem' => 'title, alternative;;;;3-3-3,--linebreak--, description',
'canNotCollapse' => true
);