/**
  * @param bool            $delete_item
  * @param bool            $delete_folder
  * @param ilCloudFileNode $node
  *
  * @return string
  */
 public function getSelectionListItemsHTML($delete_item = false, $delete_folder = false, ilCloudFileNode $node)
 {
     global $lng, $ilCtrl;
     /**
      * @var ilCtrl $ilCtrl
      */
     $this->node = $node;
     if ($delete_item && !$node->getIsDir() || $delete_folder && $node->getIsDir() || $this->checkHasAction()) {
         include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
         $this->selection_list = new ilAdvancedSelectionListGUI();
         $this->selection_list->setId("id_action_list_" . $this->node->getId());
         $this->selection_list->setListTitle($lng->txt("actions"));
         $this->selection_list->setItemLinkClass("xsmall");
         if ($this->getAsyncMode()) {
             $this->selection_list->setAsynch(true);
             $this->selection_list->setAsynchUrl(html_entity_decode($ilCtrl->getLinkTargetByClass("ilobjcloudgui", "asyncGetActionListContent", false) . "&node_id=" . $node->getId()));
         } else {
             $this->addSelectionListItems($delete_item, $delete_folder);
         }
         return $this->selection_list->getHtml();
     } else {
         return "";
     }
 }
 /**
  * @param ilCloudFileNode $node
  *
  * @return string
  */
 static function getLinkToFolder(ilCloudFileNode $node)
 {
     return "#/open_folder?id_parent=" . $node->getParentId() . "&current_id=" . $node->getId() . "&current_path=" . $node->getPath();
 }
Пример #3
0
 /**
  * @param string $path
  * @param bool $is_dir
  * @return ilCloudFileNode
  */
 protected function createNode($path = "/", $id, $is_dir = false)
 {
     $node = new ilCloudFileNode(ilCloudUtil::normalizePath($path), $id);
     $this->item_list[$node->getPath()] = $node;
     $this->id_to_path_map[$node->getId()] = $node->getPath();
     $node->setIsDir($is_dir);
     return $node;
 }