[TASK] Remove closing PHP tags
[Packages/TYPO3.CMS.git] / typo3 / sysext / rtehtmlarea / Classes / Extension / EditorMode.php
1 <?php
2 namespace TYPO3\CMS\Rtehtmlarea\Extension;
3
4 /***************************************************************
5 * Copyright notice
6 *
7 * (c) 2009-2013 Stanislas Rolland <typo3(arobas)sjbr.ca>
8 * All rights reserved
9 *
10 * This script is part of the Typo3 project. The Typo3 project is
11 * free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * The GNU General Public License can be found at
17 * http://www.gnu.org/copyleft/gpl.html.
18 *
19 * This script is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * This copyright notice MUST APPEAR in all copies of the script!
25 ***************************************************************/
26 /**
27 * EditorMode plugin for htmlArea RTE
28 *
29 * @author Stanislas Rolland <typo3(arobas)sjbr.ca>
30 */
31 class EditorMode extends \TYPO3\CMS\Rtehtmlarea\RteHtmlAreaApi {
32
33 protected $extensionKey = 'rtehtmlarea';
34
35 // The key of the extension that is extending htmlArea RTE
36 protected $pluginName = 'EditorMode';
37
38 // The name of the plugin registered by the extension
39 protected $relativePathToLocallangFile = '';
40
41 // Path to this main locallang file of the extension relative to the extension dir.
42 protected $relativePathToSkin = 'extensions/EditorMode/skin/htmlarea.css';
43
44 // Path to the skin (css) file relative to the extension dir.
45 protected $htmlAreaRTE;
46
47 // Reference to the invoking object
48 protected $thisConfig;
49
50 // Reference to RTE PageTSConfig
51 protected $toolbar;
52
53 // Reference to RTE toolbar array
54 protected $LOCAL_LANG;
55
56 // Frontend language array
57 protected $pluginButtons = 'chMode';
58
59 protected $convertToolbarForHtmlAreaArray = array(
60 'chMode' => 'TextMode'
61 );
62
63 // Requiring itself so that it is always loaded.
64 protected $requiredPlugins = 'EditorMode';
65
66 public function main($parentObject) {
67 parent::main($parentObject);
68 // Do not disable this plugin even if the chMode button is disabled
69 $this->pluginAddsButtons = FALSE;
70 return TRUE;
71 }
72
73 }