4include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
 
    5include_once(
"./Modules/Cloud/exceptions/class.ilCloudException.php");
 
   52            $node = $file_tree->getNodeFromId(
$_POST[
"id"]);
 
   56                $this->is_dir = $node->getIsDir();
 
   59            $this->path = $node->getPath();
 
   60            $this->
id = $node->getId();
 
   62                $this->path = rtrim($this->path, 
"/");
 
   65            $response->content = 
"<div id = 'cld_delete_item' >";
 
   67                $response->content .= 
$tpl->getMessageHTML(
$lng->txt(
"cld_confirm_delete_folder"), 
"question");
 
   69                $response->content .= 
$tpl->getMessageHTML(
$lng->txt(
"cld_confirm_delete_file"), 
"question");
 
   71            $response->content .= $this->gui->getHTML();
 
   74        } 
catch (Exception $e) {
 
   75            $response->message = 
$tpl->getMessageHTML($e->getMessage(), 
"failure");
 
   77        header(
'Content-type: application/json');
 
   89        include_once(
"Services/Utilities/classes/class.ilConfirmationTableGUI.php");
 
   91        $this->gui->setFormName(
"cld_delete_item");
 
   92        $this->gui->getTemplateObject()->setVariable(
"ACTIONTARGET", 
"cld_blank_target");
 
   94        $this->gui->addCommandButton(
'deleteItem', 
$lng->txt(
'confirm'));
 
   95        $this->gui->addCommandButton(
'cancel', 
$lng->txt(
'cancel'));
 
   96        $this->gui->setFormAction(
$ilCtrl->getFormAction($this));
 
  102                "text" => basename($this->path),
 
  109                "text" => basename($this->path),
 
  113        $this->gui->setData($item);
 
  133                $node = $file_tree->getNodeFromId(
$_POST[
"id"]);
 
  134                $file_tree->deleteFromService($node->getId());
 
  135                $response->message = 
$tpl->getMessageHTML(
$lng->txt(
"cld_file_deleted"), 
"success");
 
  137            } 
catch (Exception $e) {
 
  138                $response->message = 
$tpl->getMessageHTML($e->getMessage(), 
"failure");
 
  141        echo 
"<script language='javascript' type='text/javascript'>window.parent.il.CloudFileList.afterDeleteItem(" . 
ilJsonUtil::encode(
$response)
 
  155        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)