4 include_once(
"./Services/Object/classes/class.ilObject2GUI.php");
5 include_once(
"./Services/JSON/classes/class.ilJsonUtil.php");
6 include_once(
"class.ilCloudPluginFileTreeGUI.php");
7 include_once(
"class.ilCloudFileTree.php");
8 include_once(
"class.ilCloudConnector.php");
36 public function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0) {
39 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
40 $lng->loadLanguageModule(
"cld");
57 global
$ilCtrl, $ilTabs, $ilNavigationHistory,
$lng;
60 $link = $ilCtrl->getLinkTarget($this,
"render");
69 if ($this->
object != NULL) {
70 $ilNavigationHistory->addItem($this->object->getRefId(), $link,
"cld");
79 if ($this->object->getAuthComplete() ==
false && !
$_GET[
"authMode"]) {
90 $next_class = $ilCtrl->getNextClass($this);
92 $cmd = $ilCtrl->getCmd($this);
95 $next_class =
"ilcloudpluginsettingsgui";
97 case "afterServiceAuth" :
111 switch ($next_class) {
112 case "ilinfoscreengui":
116 case "ilcommonactiondispatchergui":
117 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
119 $this->ctrl->forwardCommand($gui);
121 case "ilpermissiongui":
123 $ilTabs->activateTab(
"id_permissions");
124 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
126 $this->ctrl->forwardCommand($perm_gui);
128 case "ilcloudpluginuploadgui":
131 $this->ctrl->forwardCommand($upload_gui);
134 case "ilcloudplugincreatefoldergui":
137 $this->ctrl->forwardCommand($folder_gui);
140 case "ilcloudplugindeletegui":
143 $this->ctrl->forwardCommand($delete_gui);
146 case "ilcloudpluginsettingsgui":
150 $settings_gui->setCloudObject($this->
object);
151 $this->ctrl->forwardCommand($settings_gui);
154 case "ilcloudpluginactionlistgui":
156 $this->ctrl->forwardCommand($action_list_gui);
158 case "ilcloudpluginitemcreationlistgui":
160 $this->ctrl->forwardCommand($item_creation_gui);
162 case "ilcloudpluginfiletreegui":
164 $this->ctrl->forwardCommand($file_tree_gui);
166 case "ilcloudpluginheaderactiongui":
168 $this->ctrl->forwardCommand($header_action_gui);
170 case "ilcloudplugininitgui":
172 $this->ctrl->forwardCommand($init_gui);
175 return parent::executeCommand();
196 public static function _goto($a_target) {
197 $content = explode(
"_", $a_target);
198 $_GET[
"ref_id"] = $content[0];
199 $_POST[
"path"] = $content[2];
200 $_GET[
"baseClass"] =
"ilrepositorygUI";
201 $_GET[
"cmdClass"] =
"ilobjcloudgui";
202 $_GET[
"cmd"] =
"render";
203 include(
"ilias.php");
213 $this->ctrl->setCmd(
"showSummary");
214 $this->ctrl->setCmdClass(
"ilinfoscreengui");
224 if ($ilAccess->checkAccess(
"read",
"", $this->object->getRefId())) {
225 $ilTabs->addTab(
"content", $lng->txt(
"content"), $ilCtrl->getLinkTarget($this,
"render"));
226 $ilTabs->addTab(
"id_info", $lng->txt(
"info_short"), $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary"));
230 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
231 $ilTabs->addTab(
"settings", $lng->txt(
"settings"), $ilCtrl->getLinkTargetByClass(
"ilcloudpluginsettingsgui",
"editSettings"));
235 if ($ilAccess->checkAccess(
'edit_permission',
"", $this->object->getRefId())) {
236 $ilTabs->addTab(
"id_permissions", $lng->txt(
"perm_settings"), $this->ctrl->getLinkTargetByClass(
"ilpermissiongui",
"perm"));
247 $ilTabs->activateTab(
"id_info");
250 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"));
254 $info = $plugin_info->getInfoScreen($this);
255 $this->ctrl->forwardCommand($info);
287 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
289 $form->setTarget(
"_top");
290 $form->setFormAction($this->ctrl->getFormAction($this,
"save"));
291 $form->setTitle($this->lng->txt($a_new_type .
"_new"));
297 $ti->setRequired(
true);
311 $option->setTitle($hook_object->txt($service));
312 $option->setInfo($hook_object->txt(
"create_info"));
316 $init_gui->initPluginCreationFormSection($option);
318 $services_group->addOption($option);
322 $services_group->setValue(array_shift($services_group->getOptions())->getValue());
324 $form->addItem($services_group);
328 $form->addCommandButton(
"save", $this->lng->txt($a_new_type .
"_add"));
329 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
342 if ($form->checkInput()) {
350 $init_gui->afterSavePluginCreation($a_new_object, $form);
369 $service->authService($ilCtrl->getLinkTarget($this,
"afterServiceAuth") .
"&authMode=true");
380 if ($this->plugin_service->afterAuthService()) {
381 $this->
object->setRootId(
"root",
true);
382 $this->
object->setAuthComplete(
true);
383 $this->
object->update();
385 $ilCtrl->redirectByClass(
"ilCloudPluginSettingsGUI",
"editSettings");
387 include_once(
"./Services/Repository/classes/class.ilRepUtil.php");
407 $header_action_class->addCustomHeaderAction($lg);
419 if (is_object($this->
object)) {
420 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this,
""),
"",
$this->node_id);
434 $response =
new stdClass();
435 $response->message = NULL;
436 $response->locator = NULL;
437 $response->content = NULL;
438 $response->success = NULL;
442 $file_tree->updateFileTree(
$_POST[
"path"]);
443 $node = $file_tree->getNodeFromPath(
$_POST[
"path"]);
447 $response->locator = $file_tree_gui->getLocatorHtml($file_tree->getNodeFromId($node->getId()));
448 $response->success =
true;
450 $response->message = $tpl->getMessageHTML($e->getMessage(),
"failure");
453 header(
'Content-type: application/json');
464 $file_tree->downloadFromService(
$_GET[
'id']);
466 $ilTabs->activateTab(
"content");
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
This class represents an option in a radio group.
asyncGetActionListContent()
getStandardCmd()
Get standard command.
afterSave(ilObjCloud $a_new_object)
serviceAuth(ilObjCloud $object)
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
static getActionListGUIClass(ilCloudPluginService $plugin_service_class)
New implementation of ilObjectGUI.
const TITLE_LENGTH
max length of object title
static getInitGUIClass(ilCloudPluginService $plugin_service_class)
infoScreen()
show information screen
static getDeleteGUIClass(ilCloudPluginService $plugin_service_class)
static getFileTreeFromSession()
static getUploadGUIClass(ilCloudPluginService $plugin_service_class)
static getCreateFolderGUIClass(ilCloudPluginService $plugin_service_class)
static getFileTreeGUIClass(ilCloudPluginService $plugin_service_class, ilCloudFileTree $file_tree)
initHeaderAction($a_sub_type=null, $a_sub_id=null)
Add header action menu.
setServiceName($a_val)
Set service.
setOnline($a_val)
Set online.
$plugin_service
ilCloudPluginService
addLocatorItems()
addLocatorItems
checkPermission($a_perm, $a_cmd="")
static encode($mixed, $suppress_native=false)
static getActiveServices()
initDidacticTemplate(ilPropertyFormGUI $form)
Show didactic template types.
setSize($a_size)
Set Size.
This class represents a text property in a property form.
setCols($a_cols)
Set Cols.
initCreateForm($a_new_type)
Init object creation form.
static _goto($a_target)
_goto Deep link
static checkServiceActive($name)
Class ilCloudPluginService.
initCreationForms($a_new_type)
Init creation froms.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static getPluginHookClass($service_name)
addHeaderAction()
Add header action menu.
redirectToRefId($a_ref_id, $a_cmd="")
redirects to (repository) view per ref id usually to a container and usually used at the end of a sav...
__construct($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
This class represents a text area property in a property form.
static getHeaderActionGUIClass(ilCloudPluginService $plugin_service_class)
static getServiceClass($service_name, $obj_id, $connect=true)
insertHeaderAction($a_list_gui)
Insert header action into main template.
static getInfoScreenGUIClass(ilCloudPluginService $plugin_service_class)
static getSettingsGUIClass(ilCloudPluginService $plugin_service_class)
setRootFolder($a_val, $no_check=false)
Set root_folder, this may only be changed by the owner of the object.
infoScreenObject()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually...
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static getCreationGUIClass(ilCloudPluginService $plugin_service_class)
static getItemCreationListGUIClass(ilCloudPluginService $plugin_service_class)
getServiceName()
Get service.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
setAuthComplete($auth_complete)
static deleteObjects($a_cur_ref_id, $a_ids)
Delete objects.