コード例 #1
0
 /**
  * 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;
 }
コード例 #2
0
 /**
  * Initializes the script path
  *
  * @todo Define visibility
  */
 public function __construct()
 {
     $this->thisScript = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('SCRIPT_NAME');
     parent::__construct();
 }
コード例 #3
0
 /**
  * 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>';
 }
コード例 #4
0
 /**
  * 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);
 }
コード例 #5
0
 /**
  * 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>';
 }
コード例 #6
0
 /**
  * Initializes the script path
  *
  * @todo Define visibility
  */
 public function __construct()
 {
     $this->determineScriptUrl();
     parent::__construct();
 }