2 namespace TYPO3\CMS\Recordlist\Browser;
46 $this->pageRenderer->loadRequireJsModule(
'TYPO3/CMS/Recordlist/BrowseFolders');
54 parent::initVariables();
66 if ($this->expandFolder !== null) {
70 $this->expandFolder = $data[
'expandFolder'];
73 return array($data, $store);
81 $selectedFolder = null;
82 if ($this->expandFolder) {
89 $folderTree->setLinkParameterProvider($this);
90 $tree = $folderTree->getBrowsableTree();
93 if ($selectedFolder) {
98 $content = $this->doc->startPage(
'TBE folder selector');
99 $content .= $this->doc->getFlashMessages();
105 Wrapper table for folder tree / folder list:
107 <table border="0" cellpadding="0" cellspacing="0" id="typo3-EBfiles">
109 <td class="c-wCell" valign="top"><h3>' . $this->
getLanguageService()->getLL(
'folderTree',
true) .
':</h3>' . $tree .
'</td>
110 <td class="c-wCell" valign="top">' . $folders .
'</td>
116 if ($selectedFolder) {
121 $content .=
'<br /><br />';
124 $content .= $this->doc->endPage();
125 return $this->doc->insertStylesAndJS($content);
143 $content .=
'<h3>' . sprintf(
$lang->getLL(
'folders',
true) .
' (%s):', count($folders)) .
'</h3>';
147 $folderIcon =
'<a href="#" data-folder-id="' . htmlspecialchars($folderIdentifier) .
'" data-close="1">';
148 $folderIcon .= $this->iconFactory->getIcon(
'apps-filetree-folder-default',
Icon::SIZE_SMALL);
150 $folderIcon .=
'</a>';
151 $content .= $folderIcon .
'<br />';
155 foreach ($folders as $subFolder) {
156 $subFolderIdentifier = $subFolder->getCombinedIdentifier();
158 $icon =
'<span style="width: 16px; height: 16px; display: inline-block;"></span>';
159 $icon .=
'<span title="' . htmlspecialchars($subFolder->getName()) .
'">' . $this->iconFactory->getIcon(
'apps-filetree-folder-default',
Icon::SIZE_SMALL) .
'</span>';
161 $aTag =
'<a href="#" data-folder-id="' . htmlspecialchars($folderIdentifier) .
'" data-close="0">';
162 $aTag_alt =
'<a href="#" data-folder-id="' . htmlspecialchars($folderIdentifier) .
'" data-close="1">';
163 if (strstr($subFolderIdentifier,
',') || strstr($subFolderIdentifier,
'|')) {
165 $errorMessage = sprintf(
$lang->getLL(
'invalidChar',
true),
', |');
166 $aTag =
'<a href="#" class="t3js-folderIdError" data-message="' . $errorMessage .
'">';
172 <tr class="bgColor4">
173 <td nowrap="nowrap">' . $foldernameAndIcon .
' </td>
174 <td>' . $aTag .
'<span title="' .
$lang->getLL(
'addToList',
true) .
'">' . $this->iconFactory->getIcon(
'actions-edit-add',
Icon::SIZE_SMALL)->render() .
'</span>' . $aTag_e .
'</td>
179 <td colspan="3"><span style="width: 1px; height: 3px; display: inline-block;"></span></td>
188 <table border="0" cellpadding="0" cellspacing="1" id="typo3-folderList">
189 ' . implode(
'', $lines) .
'
201 'data-mode' =>
'folder'
213 'expandFolder' => isset($values[
'identifier']) ? $values[
'identifier'] :
$this->expandFolder,