4include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
    5include_once(
"./Modules/Cloud/exceptions/class.ilCloudException.php");
 
   44                $response = 
new stdClass();
 
   45                $response->success = 
null;
 
   46                $response->message = 
null;
 
   47                $response->content = 
null;
 
   50                        $node = $file_tree->getNodeFromId(
$_POST[
"id"]);
 
   54                                $this->is_dir = $node->getIsDir();
 
   57                        $this->path = $node->getPath();
 
   58                        $this->
id = $node->getId();
 
   60                                $this->path = rtrim($this->path, 
"/");
 
   63                        $response->content = 
"<div id = 'cld_delete_item' >";
 
   65                                $response->content .= 
$tpl->getMessageHTML(
$lng->txt(
"cld_confirm_delete_folder"), 
"question");
 
   67                                $response->content .= 
$tpl->getMessageHTML(
$lng->txt(
"cld_confirm_delete_file"), 
"question");
 
   69                        $response->content .= $this->gui->getHTML();
 
   70                        $response->content .= 
"</div >";
 
   71                        $response->success = 
true;
 
   72                } 
catch (Exception $e) {
 
   73                        $response->message = 
$tpl->getMessageHTML($e->getMessage(), 
"failure");
 
   75                header(
'Content-type: application/json');
 
   86                include_once(
"Services/Utilities/classes/class.ilConfirmationTableGUI.php");
 
   88                $this->gui->setFormName(
"cld_delete_item");
 
   89                $this->gui->getTemplateObject()->setVariable(
"ACTIONTARGET", 
"cld_blank_target");
 
   91                $this->gui->addCommandButton(
'deleteItem', 
$lng->txt(
'confirm'));
 
   92                $this->gui->addCommandButton(
'cancel', 
$lng->txt(
'cancel'));
 
   93                $this->gui->setFormAction(
$ilCtrl->getFormAction($this));
 
   99                                "text" => basename($this->path),
 
  106                                "text" => basename($this->path),
 
  110                $this->gui->setData($item);
 
  122                $response = 
new stdClass();
 
  123                $response->success = 
null;
 
  124                $response->message = 
null;
 
  129                                $node = $file_tree->getNodeFromId(
$_POST[
"id"]);
 
  130                                $file_tree->deleteFromService($node->getId());
 
  131                                $response->message = 
$tpl->getMessageHTML(
$lng->txt(
"cld_file_deleted"), 
"success");
 
  132                                $response->success = 
true;
 
  133                        } 
catch (Exception $e) {
 
  134                                $response->message = 
$tpl->getMessageHTML($e->getMessage(), 
"failure");
 
  137                echo 
"<script language='javascript' type='text/javascript'>window.parent.il.CloudFileList.afterDeleteItem(" . 
ilJsonUtil::encode($response)
 
  147                $response = 
new stdClass();
 
  148                $response->status = 
"cancel";
 
  150                echo 
"<script language='javascript' type='text/javascript'>window.parent.il.CloudFileList.afterDeleteItem(" . 
ilJsonUtil::encode($response)
 
An exception for terminatinating execution or to throw for unit testing.
const ID_DOES_NOT_EXIST_IN_FILE_TREE_IN_SESSION
static getFileTreeFromSession()
Class ilCloudPluginDeleteGUI.
asyncDeleteItem()
is called async and prints the content from the confirmation gui
deleteItem()
Update properties.
cancel()
Update properties.
static encode($mixed, $suppress_native=false)
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)