[BUGFIX] Fix the element browsers
[Packages/TYPO3.CMS.git] / typo3 / sysext / rtehtmlarea / Classes / FolderTree.php
1 <?php
2 namespace TYPO3\CMS\Rtehtmlarea;
3
4 /**
5 * Base extension class which generates the folder tree.
6 * Used directly by the RTE.
7 *
8 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
9 * @package TYPO3
10 * @subpackage core
11 */
12 class FolderTree extends \rteFolderTree {
13
14 /**
15 * Wrapping the title in a link, if applicable.
16 *
17 * @param string Title, ready for output.
18 * @param t3lib_file_Folder The "record
19 * @return string Wrapping title string.
20 * @todo Define visibility
21 */
22 public function wrapTitle($title, \TYPO3\CMS\Core\Resource\Folder $folderObject) {
23 if ($this->ext_isLinkable($folderObject)) {
24 $aOnClick = ((((((((((((('return jumpToUrl(\'' . $this->thisScript) . '?act=') . $GLOBALS['SOBE']->browser->act) . '&mode=') . $GLOBALS['SOBE']->browser->mode) . '&editorNo=') . $GLOBALS['SOBE']->browser->editorNo) . '&contentTypo3Language=') . $GLOBALS['SOBE']->browser->contentTypo3Language) . '&contentTypo3Charset=') . $GLOBALS['SOBE']->browser->contentTypo3Charset) . '&expandFolder=') . rawurlencode($folderObject->getCombinedIdentifier())) . '\');';
25 return ((('<a href="#" onclick="' . htmlspecialchars($aOnClick)) . '">') . $title) . '</a>';
26 } else {
27 return ('<span class="typo3-dimmed">' . $title) . '</span>';
28 }
29 }
30
31 /**
32 * Wrap the plus/minus icon in a link
33 *
34 * @param string HTML string to wrap, probably an image tag.
35 * @param string Command for 'PM' get var
36 * @return string Link-wrapped input string
37 * @access private
38 */
39 public function PMiconATagWrap($icon, $cmd, $isExpand = TRUE) {
40 if ($this->thisScript) {
41 $js = htmlspecialchars(((((('Tree.thisScript=\'' . $GLOBALS['BACK_PATH']) . 'ajax.php\',Tree.load(\'') . $cmd) . '\', ') . intval($isExpand)) . ', this);');
42 return ((('<a class="pm" onclick="' . $js) . '">') . $icon) . '</a>';
43 } else {
44 return $icon;
45 }
46 }
47
48 }
49
50
51 ?>