/** * Makes the AJAX call to expand or collapse the foldertree. * Called by an AJAX Route, see AjaxRequestHandler * * @param ServerRequestInterface $request * @param ResponseInterface $response * @return ResponseInterface */ public function ajaxExpandCollapse(ServerRequestInterface $request, ResponseInterface $response) { $this->init(); $tree = $this->foldertree->getBrowsableTree(); if ($this->foldertree->getAjaxStatus() === false) { $response = $response->withStatus(500); } else { $response->getBody()->write(json_encode($tree)); } return $response; }
/** * Initializes the script path * * @todo Define visibility */ public function __construct() { $this->thisScript = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('SCRIPT_NAME'); parent::__construct(); }
/** * Wrapping $title in a-tags. * * @param string $title Title string * @param \TYPO3\CMS\Core\Resource\Folder $folderObject Folder to work on * @param integer $bank Bank pointer (which mount point number) * @return string * @access private * @todo Define visibility */ public function wrapTitle($title, \TYPO3\CMS\Core\Resource\Folder $folderObject, $bank = 0) { $theFolderTitle = parent::wrapTitle($title, $folderObject, $bank); // Wrap title in a drag/drop span. return '<span class="dragTitle" id="dragTitleID_' . $this->getJumpToParam($folderObject) . '">' . $theFolderTitle . '</span>'; }
/** * Wrap the plus/minus icon in a link * * @param string $icon HTML string to wrap, probably an image tag. * @param string $cmd Command for 'PM' get var * @param bool $isExpand Whether to be expanded * @return string Link-wrapped input string * @internal */ public function PMiconATagWrap($icon, $cmd, $isExpand = true) { if (empty($this->scope)) { $this->scope = ['class' => get_class($this), 'script' => $this->thisScript, 'ext_noTempRecyclerDirs' => $this->ext_noTempRecyclerDirs, 'browser' => $this->linkParameterProvider->getUrlParameters([])]; } return parent::PMiconATagWrap($icon, $cmd, $isExpand); }
/** * Wrapping $title in a-tags. * * @param string $title Title string * @param \TYPO3\CMS\Core\Resource\Folder $folderObject Folder to work on * @param int $bank Bank pointer (which mount point number) * @return string * @access private */ public function wrapTitle($title, $folderObject, $bank = 0) { $theFolderTitle = parent::wrapTitle($title, $folderObject, $bank); // Wrap title in a drag/drop span. return '<span class="list-tree-title dragTitle" id="dragTitleID_' . $this->getJumpToParam($folderObject) . '">' . $theFolderTitle . '</span>'; }
/** * Initializes the script path * * @todo Define visibility */ public function __construct() { $this->determineScriptUrl(); parent::__construct(); }