Class ilCloudPluginCreateFolderGUI.
More...
Class ilCloudPluginCreateFolderGUI.
Standard GUI when creating a new folder. Could be overwritten by the plugin if needed.
- Author
- Timon Amstutz timon.nosp@m..ams.nosp@m.tutz@.nosp@m.ilub.nosp@m..unib.nosp@m.e.ch
- Version
- $Id:
Definition at line 19 of file class.ilCloudPluginCreateFolderGUI.php.
◆ asyncCreateFolder()
ilCloudPluginCreateFolderGUI::asyncCreateFolder |
( |
| ) |
|
Definition at line 22 of file class.ilCloudPluginCreateFolderGUI.php.
References $DIC, $tpl, ilJsonUtil\encode(), exit, header, and initCreateFolder().
26 $response =
new stdClass();
27 $response->success = null;
28 $response->error = null;
29 $response->message = null;
34 $response->content = $this->form->getHTML();
35 $response->success =
true;
39 $response->message =
$tpl->getMessageHTML($e->getMessage(),
"failure");
41 header(
'Content-type: application/json');
initCreateFolder()
Init form.
static encode($mixed, $suppress_native=false)
Add a drawing to the header
◆ cancel()
ilCloudPluginCreateFolderGUI::cancel |
( |
| ) |
|
Update properties.
Definition at line 115 of file class.ilCloudPluginCreateFolderGUI.php.
References exit.
117 $response =
new stdClass();
118 $response->status =
"cancel";
120 echo "<script language='javascript' type='text/javascript'>window.parent.il.CloudFileList.afterCreateFolder(".ilJsonUtil::encode($response).
");</script>";
◆ createFolder()
ilCloudPluginCreateFolderGUI::createFolder |
( |
| ) |
|
Update properties.
Definition at line 83 of file class.ilCloudPluginCreateFolderGUI.php.
References $_POST, $DIC, $lng, $tpl, ilJsonUtil\encode(), exit, and ilCloudFileTree\getFileTreeFromSession().
89 $response =
new stdClass();
90 $response->success = null;
91 $response->message = null;
92 $response->folder_id = null;
95 $response->status =
"done";
96 include_once(
"class.ilCloudFileTree.php");
98 $new_node = $file_tree->addFolderToService(
$_POST[
"parent_folder_id"],
$_POST[
"folder_name"]);
99 $response->folder_id = $new_node->getId();
100 $response->folder_path = $new_node->getPath();
101 $response->success =
true;
102 $response->message =
$tpl->getMessageHTML(
$lng->txt(
"cld_folder_created"),
"success");
105 $response->message =
$tpl->getMessageHTML($e->getMessage(),
"failure");
107 echo "<script language='javascript' type='text/javascript'>window.parent.il.CloudFileList.afterCreateFolder(" .
ilJsonUtil::encode($response) .
");</script>";
static getFileTreeFromSession()
static encode($mixed, $suppress_native=false)
◆ initCreateFolder()
ilCloudPluginCreateFolderGUI::initCreateFolder |
( |
| ) |
|
Init form.
- Parameters
-
Definition at line 51 of file class.ilCloudPluginCreateFolderGUI.php.
References $_POST, $DIC, $ilCtrl, $lng, and ilFormPropertyGUI\setRequired().
Referenced by asyncCreateFolder().
57 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
59 $this->form->setId(
"cld_create_folder");
63 $this->form->addItem($name);
67 $id->setValue(
$_POST[
"id"]);
68 $this->form->addItem($id);
71 $this->form->addCommandButton(
"createFolder",
$lng->txt(
"cld_create_folder"));
72 $this->form->addCommandButton(
"cancel",
$lng->txt(
"cancel"));
74 $this->form->setTitle(
$lng->txt(
"cld_create_folder"));
75 $this->form->setFormAction(
$ilCtrl->getFormAction($this));
76 $this->form->setTarget(
"cld_blank_target");
This class represents a text property in a property form.
The documentation for this class was generated from the following file: