[BUGFIX] Clean up and fix class loading
[Packages/TYPO3.CMS.git] / typo3 / sysext / rtehtmlarea / ext_tables.php
1 <?php
2 defined('TYPO3_MODE') or die();
3
4 // Add static template for Click-enlarge rendering
5 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile('rtehtmlarea', 'static/clickenlarge/', 'Clickenlarge Rendering');
6
7 // Add Abbreviation records (as of 7.0 not working in Configuration/TCA/Overrides)
8 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_rtehtmlarea_acronym');
9 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('tx_rtehtmlarea_acronym', 'EXT:rtehtmlarea/locallang_csh_abbreviation.xlf');
10
11 // Add contextual help files
12 $htmlAreaRteContextHelpFiles = array(
13 'General' => 'EXT:rtehtmlarea/locallang_csh.xlf',
14 'Abbreviation' => 'EXT:rtehtmlarea/Resources/Private/Language/Plugins/Abbreviation/locallang_csh.xlf',
15 'EditElement' => 'EXT:rtehtmlarea/Resources/Private/Language/Plugins/EditElement/locallang_csh.xlf',
16 'Language' => 'EXT:rtehtmlarea/Resources/Private/Language/Plugins/Language/locallang_csh.xlf',
17 'MicrodataSchema' => 'EXT:rtehtmlarea/Resources/Private/Language/Plugins/MicrodataSchema/locallang_csh.xlf',
18 'PlainText' => 'EXT:rtehtmlarea/Resources/Private/Language/Plugins/PlainText/locallang_csh.xlf',
19 'RemoveFormat' => 'EXT:rtehtmlarea/Resources/Private/Language/Plugins/RemoveFormat/locallang_csh.xlf',
20 'TableOperations' => 'EXT:rtehtmlarea/Resources/Private/Language/Plugins/TableOperations/locallang_csh.xlf'
21 );
22 foreach ($htmlAreaRteContextHelpFiles as $key => $file) {
23 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('xEXT_rtehtmlarea_' . $key, $file);
24 }
25 unset($htmlAreaRteContextHelpFiles);
26
27 // Extend TYPO3 User Settings Configuration
28 if (TYPO3_MODE === 'BE' && \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('setup') && is_array($GLOBALS['TYPO3_USER_SETTINGS'])) {
29 $GLOBALS['TYPO3_USER_SETTINGS']['columns'] = array_merge($GLOBALS['TYPO3_USER_SETTINGS']['columns'], array(
30 'rteWidth' => array(
31 'type' => 'text',
32 'label' => 'LLL:EXT:rtehtmlarea/locallang.xlf:rteWidth',
33 'csh' => 'xEXT_rtehtmlarea_General:rteWidth'
34 ),
35 'rteHeight' => array(
36 'type' => 'text',
37 'label' => 'LLL:EXT:rtehtmlarea/locallang.xlf:rteHeight',
38 'csh' => 'xEXT_rtehtmlarea_General:rteHeight'
39 ),
40 'rteResize' => array(
41 'type' => 'check',
42 'label' => 'LLL:EXT:rtehtmlarea/locallang.xlf:rteResize',
43 'csh' => 'xEXT_rtehtmlarea_General:rteResize'
44 ),
45 'rteMaxHeight' => array(
46 'type' => 'text',
47 'label' => 'LLL:EXT:rtehtmlarea/locallang.xlf:rteMaxHeight',
48 'csh' => 'xEXT_rtehtmlarea_General:rteMaxHeight'
49 ),
50 'rteCleanPasteBehaviour' => array(
51 'type' => 'select',
52 'label' => 'LLL:EXT:rtehtmlarea/htmlarea/plugins/PlainText/locallang.xlf:rteCleanPasteBehaviour',
53 'items' => array(
54 'plainText' => 'LLL:EXT:rtehtmlarea/htmlarea/plugins/PlainText/locallang.xlf:plainText',
55 'pasteStructure' => 'LLL:EXT:rtehtmlarea/htmlarea/plugins/PlainText/locallang.xlf:pasteStructure',
56 'pasteFormat' => 'LLL:EXT:rtehtmlarea/htmlarea/plugins/PlainText/locallang.xlf:pasteFormat'
57 ),
58 'csh' => 'xEXT_rtehtmlarea_PlainText:behaviour'
59 )
60 ));
61 $GLOBALS['TYPO3_USER_SETTINGS']['showitem'] .= ',--div--;LLL:EXT:rtehtmlarea/locallang.xlf:rteSettings,rteWidth,rteHeight,rteResize,rteMaxHeight,rteCleanPasteBehaviour';
62 }
63 if (TYPO3_MODE === 'BE') {
64 // Register RTE browse links wizard
65 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath(
66 'rtehtmlarea_wizard_browse_links',
67 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Modules/BrowseLinks/'
68 );
69
70 // Register RTE select image wizard
71 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath(
72 'rtehtmlarea_wizard_select_image',
73 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Modules/SelectImage/'
74 );
75
76 // Register RTE user elements wizard
77 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath(
78 'rtehtmlarea_wizard_user_elements',
79 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Modules/UserElements/'
80 );
81
82 // Register RTE parse html wizard
83 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModulePath(
84 'rtehtmlarea_wizard_parse_html',
85 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Modules/ParseHtml/'
86 );
87 }