ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilObjCloudGUI Class Reference

Class ilObjCloudGUI. More...

+ Inheritance diagram for ilObjCloudGUI:
+ Collaboration diagram for ilObjCloudGUI:

Public Member Functions

 __construct ($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
 
 getType ()
 Get type. More...
 
 executeCommand ()
 
 getStandardCmd ()
 Get standard command. More...
 
 infoScreen ()
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getCtrl ()
 
 setCtrl (\ilCtrl $ctrl)
 
 infoScreenForward ()
 show information screen More...
 
 render ()
 
 asyncGetBlock ()
 
 getFile ()
 
 asyncGetActionListContent ()
 
- Public Member Functions inherited from ilObject2GUI
 __construct ($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
 Constructor. More...
 
 executeCommand ()
 execute command More...
 
 delete ()
 Display delete confirmation form (repository/workspace switch) More...
 
 confirmedDelete ()
 Delete objects (repository/workspace switch) More...
 
 getHTML ()
 
 withReferences ()
 Final/Private declaration of unchanged parent methods. More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 isVisible ($a_ref_id, $a_type)
 
 trash ()
 
 undelete ()
 
 cancelDelete ()
 
 removeFromSystem ()
 
 cloneAll ()
 
 view ()
 view object content (repository/workspace switch) More...
 
 getType ()
 Functions that must be overwritten. More...
 
 create ()
 Deleted in ilObject. More...
 
 save ()
 
 edit ()
 
 update ()
 
 cancel ()
 
 importFile ()
 Import. More...
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page @access public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 

Static Public Member Functions

static _goto ($a_target)
 _goto Deep link More...
 
- Static Public Member Functions inherited from ilObject2GUI
static handleAfterSaveCallback (ilObject $a_obj, $a_callback_ref_id)
 After creation callback. More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 

Protected Member Functions

 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 serviceAuth (ilObjCloud $object)
 
 afterServiceAuth ()
 
 addHeaderAction ()
 Add header action menu. More...
 
 addLocatorItems ()
 addLocatorItems More...
 
- Protected Member Functions inherited from ilObject2GUI
 afterConstructor ()
 Do anything that should be done after constructor in here. More...
 
 assignObject ()
 create object instance as internal property (repository/workspace switch) More...
 
 getAccessHandler ()
 Get access handler. More...
 
 setLocator ()
 set Locator More...
 
 deleteConfirmation ()
 Display delete confirmation form (workspace specific) More...
 
 deleteConfirmedObjects ()
 Delete objects (workspace specific) More...
 
 setTitleAndDescription ()
 called by prepare output More...
 
 showUpperIcon ()
 
 omitLocator ($a_omit=true)
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 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 save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 fillCloneSearchTemplate ($a_tpl_varname, $a_type)
 
 searchCloneSource ()
 
 buildCloneSelect ($existing_objs)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation ($a_cmd, $a_location="")
 Deprecated functions. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 showActions ()
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
 Check permission. More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
 getPermanentLinkWidget ($a_append=null, $a_center=false)
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs @access public More...
 
 setAdminTabs ()
 set admin tabs @access public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 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 save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Protected Attributes

 $plugin_service
 ilCloudPluginService More...
 
 $ctrl
 
- Protected Attributes inherited from ilObject2GUI
 $object_id
 
 $node_id
 
 $creation_forms = array()
 
 $id_type = array()
 
 $parent_id
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 

Additional Inherited Members

- Data Fields inherited from ilObject2GUI
 $tree
 
const OBJECT_ID = 0
 
const REPOSITORY_NODE_ID = 1
 
const WORKSPACE_NODE_ID = 2
 
const REPOSITORY_OBJECT_ID = 3
 
const WORKSPACE_OBJECT_ID = 4
 
const PORTFOLIO_OBJECT_ID = 5
 
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $ilias
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjCloudGUI::__construct (   $a_id = 0,
  $a_id_type = self::REPOSITORY_NODE_ID,
  $a_parent_node_id = 0 
)
Parameters
int$a_id
int$a_id_type
int$a_parent_node_id

Reimplemented from ilObject2GUI.

Definition at line 40 of file class.ilObjCloudGUI.php.

40 {
41 global $DIC;
42 $lng = $DIC['lng'];
43
44 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
45 $lng->loadLanguageModule("cld");
46 }
global $DIC

References $DIC, and ilObjectGUI\$lng.

Member Function Documentation

◆ _goto()

static ilObjCloudGUI::_goto (   $a_target)
static

_goto Deep link

Parameters
string$a_target

Definition at line 201 of file class.ilObjCloudGUI.php.

201 {
202 $content = explode("_", $a_target);
203 $_GET["ref_id"] = $content[0];
204 $_POST["path"] = $content[2];
205 $_GET["baseClass"] = "ilrepositorygUI";
206 $_GET["cmdClass"] = "ilobjcloudgui";
207 $_GET["cmd"] = "render";
208 include("ilias.php");
209 }
$_GET["client_id"]
$_POST["username"]

References $_GET, and $_POST.

◆ addHeaderAction()

ilObjCloudGUI::addHeaderAction ( )
protected

Add header action menu.

Reimplemented from ilObjectGUI.

Definition at line 431 of file class.ilObjCloudGUI.php.

431 {
432 $lg = $this->initHeaderAction();
433 if ($lg) {
434 $header_action_class = ilCloudConnector::getHeaderActionGUIClass($this->plugin_service);
435 $header_action_class->addCustomHeaderAction($lg);
436 $this->insertHeaderAction($lg);
437 }
438 }
static getHeaderActionGUIClass(ilCloudPluginService $plugin_service_class)
initHeaderAction($a_sub_type=null, $a_sub_id=null)
Add header action menu.
insertHeaderAction($a_list_gui)
Insert header action into main template.
$lg
Definition: example_018.php:62

References $lg, ilCloudConnector\getHeaderActionGUIClass(), ilObject2GUI\initHeaderAction(), and ilObjectGUI\insertHeaderAction().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addLocatorItems()

ilObjCloudGUI::addLocatorItems ( )
protected

addLocatorItems

Reimplemented from ilObject2GUI.

Definition at line 444 of file class.ilObjCloudGUI.php.

444 {
445 global $DIC;
446 $ilLocator = $DIC['ilLocator'];
447
448 if (is_object($this->object)) {
449 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, ""), "", $this->node_id);
450 }
451 }

References $DIC.

◆ afterServiceAuth()

ilObjCloudGUI::afterServiceAuth ( )
protected

Definition at line 402 of file class.ilObjCloudGUI.php.

402 {
403 global $DIC;
404 $ilCtrl = $DIC['ilCtrl'];
405 $lng = $DIC['lng'];
406
407 try {
408 if ($this->plugin_service->afterAuthService()) {
409 $this->object->setRootId("root", true);
410 $this->object->setAuthComplete(true);
411 $this->object->update();
412 ilUtil::sendSuccess($lng->txt("cld_object_added"), true);
413 $ilCtrl->redirectByClass("ilCloudPluginSettingsGUI", "editSettings");
414 } else {
415 include_once("./Services/Repository/classes/class.ilRepUtil.php");
416 ilRepUtil::deleteObjects($this->object->getRefId(), $this->object->getRefId());
417
418 ilUtil::sendFailure($lng->txt("cld_auth_failed_no_object_created"), true);
419 ilObjectGUI::redirectToRefId($this->parent_id);
420 }
421 } catch (Exception $e) {
422 ilUtil::sendFailure($e->getMessage(), true);
423 ilObjectGUI::redirectToRefId($this->parent_id);
424 }
425 }
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...
static deleteObjects($a_cur_ref_id, $a_ids)
Delete objects.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
global $ilCtrl
Definition: ilias.php:18

References $DIC, $ilCtrl, ilObjectGUI\$lng, ilRepUtil\deleteObjects(), ilObjectGUI\redirectToRefId(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ asyncGetActionListContent()

ilObjCloudGUI::asyncGetActionListContent ( )

Definition at line 504 of file class.ilObjCloudGUI.php.

504 {
505 $action_list = ilCloudConnector::getActionListGUIClass($this->plugin_service);
507
508 return $action_list->asyncGetContent($this->checkPermissionBool("delete_files"), $this->checkPermissionBool("delete_folders"), $file_tree->getNodeFromId($_GET["node_id"]));
509 }
static getActionListGUIClass(ilCloudPluginService $plugin_service_class)
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.

References $_GET, ilObject2GUI\checkPermissionBool(), ilCloudConnector\getActionListGUIClass(), and ilCloudFileTree\getFileTreeFromSession().

+ Here is the call graph for this function:

◆ asyncGetBlock()

ilObjCloudGUI::asyncGetBlock ( )

Definition at line 460 of file class.ilObjCloudGUI.php.

460 {
461 global $DIC;
462 $tpl = $DIC['tpl'];
463
464 $response = new stdClass();
465 $response->message = null;
466 $response->locator = null;
467 $response->content = null;
468 $response->success = null;
469
470 try {
472 $file_tree->updateFileTree($_POST["path"]);
473 $node = $file_tree->getNodeFromPath($_POST["path"]);
474 $file_tree_gui = ilCloudConnector::getFileTreeGUIClass($this->plugin_service, $file_tree);
475 $response->content = $file_tree_gui->getFolderHtml($this, $node->getId(), $this->checkPermissionBool("delete_files"), $this->checkPermissionBool("delete_folders"), $this->checkPermissionBool("download"), $this->checkPermissionBool("files_visible"), $this->checkPermissionBool("folders_visible"));
476
477 $response->locator = $file_tree_gui->getLocatorHtml($file_tree->getNodeFromId($node->getId()));
478 $response->success = true;
479 } catch (Exception $e) {
480 $response->message = $tpl->getMessageHTML($e->getMessage(), "failure");
481 }
482
483 header('Content-type: application/json');
484 echo ilJsonUtil::encode($response);
485 exit;
486 }
static getFileTreeGUIClass(ilCloudPluginService $plugin_service_class, ilCloudFileTree $file_tree)
static encode($mixed, $suppress_native=false)

References $_POST, $DIC, ilObjectGUI\$tpl, ilJsonUtil\encode(), exit, ilCloudFileTree\getFileTreeFromSession(), and ilCloudConnector\getFileTreeGUIClass().

+ Here is the call graph for this function:

◆ executeCommand()

ilObjCloudGUI::executeCommand ( )
Returns
bool
Exceptions
ilCloudException

Reimplemented from ilObject2GUI.

Definition at line 61 of file class.ilObjCloudGUI.php.

61 {
62 global $DIC;
63 $ilCtrl = $DIC['ilCtrl'];
64 $ilTabs = $DIC['ilTabs'];
65 $ilNavigationHistory = $DIC['ilNavigationHistory'];
66 $lng = $DIC['lng'];
67
68 // Navigation History
69 $link = $ilCtrl->getLinkTarget($this, "render");
70
71 try {
73 } catch (Exception $e) {
74 ilUtil::sendFailure($lng->txt("cld_no_service_active"), true);
75 ilObjectGUI::redirectToRefId($this->parent_id);
76 }
77
78 if ($this->object != null) {
79 $ilNavigationHistory->addItem($this->object->getRefId(), $link, "cld");
80
81 try {
82 ilCloudConnector::checkServiceActive($this->object->getServiceName());
83 } catch (Exception $e) {
84 ilUtil::sendFailure($lng->txt("cld_plugin_not_active"), true);
85 ilObjectGUI::redirectToRefId($this->parent_id);
86 }
87
88 if ($this->object->getAuthComplete() == false && !$_GET["authMode"]) {
89 if ($this->checkPermissionBool("write")) {
90 $this->serviceAuth($this->object);
91 } else {
92 ilUtil::sendFailure($lng->txt("cld_auth_failed"), true);
93 ilObjectGUI::redirectToRefId($this->parent_id);
94 }
95 }
96 $this->plugin_service = ilCloudConnector::getServiceClass($this->object->getServiceName(), $this->object->getId(), false);
97 }
98
99 $next_class = $ilCtrl->getNextClass($this);
100
101 $cmd = $ilCtrl->getCmd($this);
102 switch ($cmd) {
103 case "editSettings" :
104 $next_class = "ilcloudpluginsettingsgui";
105 break;
106 case "afterServiceAuth" :
107 $this->checkPermission("write");
108 $this->$cmd();
109
110 return;
111 case "render" :
112 $this->addHeaderAction();
113 break;
114 }
115
116 switch ($next_class) {
117 case "ilinfoscreengui":
118 $this->prepareOutput();
119 $this->infoScreenForward();
120 break;
121 case "ilcommonactiondispatchergui":
122 include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
124 $this->ctrl->forwardCommand($gui);
125 break;
126 case "ilpermissiongui":
127 $this->prepareOutput();
128 $ilTabs->activateTab("id_permissions");
129 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
130 $perm_gui = new ilPermissionGUI($this);
131 $this->ctrl->forwardCommand($perm_gui);
132 break;
133 case "ilcloudpluginuploadgui":
134 if ($this->checkPermissionBool("upload")) {
135 $upload_gui = ilCloudConnector::getUploadGUIClass($this->plugin_service);
136 $this->ctrl->forwardCommand($upload_gui);
137 }
138 break;
139 case "ilcloudplugincreatefoldergui":
140 if ($this->checkPermissionBool("folders_create")) {
141 $folder_gui = ilCloudConnector::getCreateFolderGUIClass($this->plugin_service);
142 $this->ctrl->forwardCommand($folder_gui);
143 }
144 break;
145 case "ilcloudplugindeletegui":
146 if ($this->checkPermissionBool("delete_files") || $this->checkPermissionBool("delete_folders")) {
147 $delete_gui = ilCloudConnector::getDeleteGUIClass($this->plugin_service);
148 $this->ctrl->forwardCommand($delete_gui);
149 }
150 break;
151 case "ilcloudpluginsettingsgui":
152 $this->prepareOutput();
153 if ($this->checkPermissionBool("write")) {
154 $settings_gui = ilCloudConnector::getSettingsGUIClass($this->plugin_service);
155 $settings_gui->setCloudObject($this->object);
156 $this->ctrl->forwardCommand($settings_gui);
157 }
158 break;
159 case "ilcloudpluginactionlistgui":
160 $action_list_gui = ilCloudConnector::getActionListGUIClass($this->plugin_service);
161 $this->ctrl->forwardCommand($action_list_gui);
162 break;
163 case "ilcloudpluginitemcreationlistgui":
164 $item_creation_gui = ilCloudConnector::getItemCreationListGUIClass($this->plugin_service);
165 $this->ctrl->forwardCommand($item_creation_gui);
166 break;
167 case "ilcloudpluginfiletreegui":
169 $this->ctrl->forwardCommand($file_tree_gui);
170 break;
171 case "ilcloudpluginheaderactiongui":
172 $header_action_gui = ilCloudConnector::getHeaderActionGUIClass($this->plugin_service);
173 $this->ctrl->forwardCommand($header_action_gui);
174 break;
175 case "ilcloudplugininitgui":
176 $init_gui = ilCloudConnector::getInitGUIClass($this->plugin_service);
177 $this->ctrl->forwardCommand($init_gui);
178 break;
179 default:
180 return parent::executeCommand();
181 }
182
183 return true;
184 }
static checkServiceActive($name)
static getServiceClass($service_name, $obj_id, $connect=true)
static getInitGUIClass(ilCloudPluginService $plugin_service_class)
static getCreateFolderGUIClass(ilCloudPluginService $plugin_service_class)
static getUploadGUIClass(ilCloudPluginService $plugin_service_class)
static getItemCreationListGUIClass(ilCloudPluginService $plugin_service_class)
static getSettingsGUIClass(ilCloudPluginService $plugin_service_class)
static getDeleteGUIClass(ilCloudPluginService $plugin_service_class)
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
addHeaderAction()
Add header action menu.
infoScreenForward()
show information screen
serviceAuth(ilObjCloud $object)
prepareOutput($a_show_subobjects=true)
prepare output
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
$cmd
Definition: sahs_server.php:35

References $_GET, $cmd, $DIC, $ilCtrl, ilObjectGUI\$lng, addHeaderAction(), ilObject2GUI\checkPermission(), ilObject2GUI\checkPermissionBool(), ilCloudConnector\checkServiceActive(), ilCloudConnector\getActionListGUIClass(), ilCloudConnector\getActiveServices(), ilCloudConnector\getCreateFolderGUIClass(), ilCloudConnector\getDeleteGUIClass(), ilCloudFileTree\getFileTreeFromSession(), ilCloudConnector\getFileTreeGUIClass(), ilCloudConnector\getHeaderActionGUIClass(), ilCloudConnector\getInitGUIClass(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), ilCloudConnector\getItemCreationListGUIClass(), ilCloudConnector\getServiceClass(), ilCloudConnector\getSettingsGUIClass(), ilCloudConnector\getUploadGUIClass(), infoScreenForward(), ilObject2GUI\prepareOutput(), ilObjectGUI\redirectToRefId(), ilUtil\sendFailure(), and serviceAuth().

+ Here is the call graph for this function:

◆ getCtrl()

ilObjCloudGUI::getCtrl ( )
Returns
\ilCtrl

Definition at line 245 of file class.ilObjCloudGUI.php.

245 {
246 return $this->ctrl;
247 }

References $ctrl.

◆ getFile()

ilObjCloudGUI::getFile ( )

Definition at line 489 of file class.ilObjCloudGUI.php.

489 {
490 global $DIC;
491 $ilTabs = $DIC['ilTabs'];
492 if ($this->checkPermissionBool("download")) {
493 try {
495 $file_tree->downloadFromService($_GET['id']);
496 } catch (Exception $e) {
497 $ilTabs->activateTab("content");
498 ilUtil::sendFailure($e->getMessage());
499 }
500 }
501 }

References $_GET, $DIC, ilObject2GUI\checkPermissionBool(), ilCloudFileTree\getFileTreeFromSession(), and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ getStandardCmd()

ilObjCloudGUI::getStandardCmd ( )

Get standard command.

Definition at line 190 of file class.ilObjCloudGUI.php.

190 {
191 return "render";
192 }

◆ getType()

ilObjCloudGUI::getType ( )
final

Get type.

Reimplemented from ilObject2GUI.

Definition at line 52 of file class.ilObjCloudGUI.php.

52 {
53 return "cld";
54 }

Referenced by ilCloudPluginInfoScreenGUI\getInfoScreen().

+ Here is the caller graph for this function:

◆ infoScreen()

ilObjCloudGUI::infoScreen ( )

Definition at line 212 of file class.ilObjCloudGUI.php.

212 {
213 return false;
214 }

◆ infoScreenForward()

ilObjCloudGUI::infoScreenForward ( )

show information screen

Definition at line 261 of file class.ilObjCloudGUI.php.

261 {
262 global $DIC;
263 $ilTabs = $DIC['ilTabs'];
264 $ilErr = $DIC['ilErr'];
265
266 $ilTabs->activateTab("id_info");
267
268 if (!$this->checkPermissionBool("visible")) {
269 $ilErr->raiseError($this->lng->txt("msg_no_perm_read"));
270 }
271
272 $plugin_info = ilCloudConnector::getInfoScreenGUIClass($this->plugin_service);
273 $info = $plugin_info->getInfoScreen($this);
274 $this->ctrl->forwardCommand($info);
275 }
static getInfoScreenGUIClass(ilCloudPluginService $plugin_service_class)
$info
Definition: example_052.php:80
global $ilErr
Definition: raiseError.php:16

References $DIC, $ilErr, $info, ilObject2GUI\checkPermissionBool(), and ilCloudConnector\getInfoScreenGUIClass().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initCreateForm()

ilObjCloudGUI::initCreateForm (   $a_new_type)
protected

Init object creation form.

Parameters
string$a_new_type
Returns
ilPropertyFormGUI

Reimplemented from ilObjectGUI.

Definition at line 303 of file class.ilObjCloudGUI.php.

303 {
304 global $DIC;
305 $lng = $DIC['lng'];
306
307 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
308 $form = new ilPropertyFormGUI();
309 $form->setTarget("_top");
310 $form->setFormAction($this->ctrl->getFormAction($this, "save"));
311 $form->setTitle($this->lng->txt($a_new_type . "_new"));
312
313 // title
314 $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
315 $ti->setSize(min(40, ilObject::TITLE_LENGTH));
316 $ti->setMaxLength(ilObject::TITLE_LENGTH);
317 $ti->setRequired(true);
318 $form->addItem($ti);
319
320 // description
321 $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
322 $ta->setCols(40);
323 $ta->setRows(2);
324 $form->addItem($ta);
325
326 $services_group = new ilRadioGroupInputGUI($lng->txt("cld_service"), "service");
327 $services_group->setRequired(true);
328 foreach (ilCloudConnector::getActiveServices() as $service) {
329 $option = new ilRadioOption($service, $service);
330 $hook_object = ilCloudConnector::getPluginHookClass($option->getValue());
331 $option->setTitle($hook_object->txt($service));
332 $option->setInfo($hook_object->txt("create_info"));
333 $this->plugin_service = ilCloudConnector::getServiceClass($service, 0, false);
334 $init_gui = ilCloudConnector::getCreationGUIClass($this->plugin_service);
335 if ($init_gui) {
336 $init_gui->initPluginCreationFormSection($option);
337 }
338 $services_group->addOption($option);
339 }
340
341 //Select first radio-button by default
342 $services_group->setValue(array_shift($services_group->getOptions())->getValue());
343
344 $form->addItem($services_group);
345
346 $form = $this->initDidacticTemplate($form);
347
348 $form->addCommandButton("save", $this->lng->txt($a_new_type . "_add"));
349 $form->addCommandButton("cancel", $this->lng->txt("cancel"));
350
351 return $form;
352 }
static getCreationGUIClass(ilCloudPluginService $plugin_service_class)
static getPluginHookClass($service_name)
initDidacticTemplate(ilPropertyFormGUI $form)
Show didactic template types.
const TITLE_LENGTH
max length of object title
This class represents a property form user interface.
This class represents a property in a property form.
This class represents an option in a radio group.
This class represents a text area property in a property form.
This class represents a text property in a property form.

References $DIC, ilObjectGUI\$lng, ilCloudConnector\getActiveServices(), ilCloudConnector\getCreationGUIClass(), ilCloudConnector\getPluginHookClass(), ilCloudConnector\getServiceClass(), ilObjectGUI\initDidacticTemplate(), and ilObject\TITLE_LENGTH.

Referenced by initCreationForms().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initCreationForms()

ilObjCloudGUI::initCreationForms (   $a_new_type)
protected

Init creation froms.

this will create the default creation forms: new, import, clone

Parameters
string$a_new_type
Returns
array

Reimplemented from ilObject2GUI.

Definition at line 287 of file class.ilObjCloudGUI.php.

287 {
288 $forms = array(
289 self::CFORM_NEW => $this->initCreateForm($a_new_type),
290 );
291
292 return $forms;
293 }
initCreateForm($a_new_type)
Init object creation form.

References initCreateForm().

+ Here is the call graph for this function:

◆ render()

ilObjCloudGUI::render ( )

Definition at line 454 of file class.ilObjCloudGUI.php.

454 {
455 $init_gui = ilCloudConnector::getInitGUIClass($this->plugin_service);
456 $init_gui->initGUI($this, $this->checkPermissionBool("folders_create"), $this->checkPermissionBool("upload"), $this->checkPermissionBool("delete_files"), $this->checkPermissionBool("delete_folders"), $this->checkPermissionBool("download"), $this->checkPermissionBool("files_visible"), $this->checkPermissionBool("folders_visible"));
457 }

References ilObject2GUI\checkPermissionBool(), and ilCloudConnector\getInitGUIClass().

+ Here is the call graph for this function:

◆ serviceAuth()

ilObjCloudGUI::serviceAuth ( ilObjCloud  $object)
protected
Parameters
$object

Definition at line 389 of file class.ilObjCloudGUI.php.

389 {
390 global $DIC;
391 $ilCtrl = $DIC['ilCtrl'];
392 try {
393 $service = ilCloudConnector::getServiceClass($object->getServiceName(), $object->getId());
394 $service->authService($ilCtrl->getLinkTarget($this, "afterServiceAuth") . "&authMode=true");
395 } catch (Exception $e) {
396 ilUtil::sendFailure($e->getMessage(), true);
397 ilObjectGUI::redirectToRefId($this->parent_id);
398 }
399 }

References $DIC, $ilCtrl, ilObjectGUI\$object, ilCloudConnector\getServiceClass(), ilObjectGUI\redirectToRefId(), and ilUtil\sendFailure().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setCtrl()

ilObjCloudGUI::setCtrl ( \ilCtrl  $ctrl)
Parameters
\ilCtrl$ctrl

Definition at line 253 of file class.ilObjCloudGUI.php.

253 {
254 $this->ctrl = $ctrl;
255 }

References $ctrl.

◆ setTabs()

ilObjCloudGUI::setTabs ( )

create tabs (repository/workspace switch)

this had to be moved here because of the context-specific permission tab

Reimplemented from ilObject2GUI.

Definition at line 217 of file class.ilObjCloudGUI.php.

217 {
218 global $DIC;
219 $ilTabs = $DIC['ilTabs'];
220 $ilCtrl = $DIC['ilCtrl'];
221 $ilAccess = $DIC['ilAccess'];
222 $lng = $DIC['lng'];
223
224 // tab for the "show content" command
225 if ($ilAccess->checkAccess("read", "", $this->object->getRefId())) {
226 $ilTabs->addTab("content", $lng->txt("content"), $ilCtrl->getLinkTarget($this, "render"));
227 $ilTabs->addTab("id_info", $lng->txt("info_short"), $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"));
228 }
229
230 // a "properties" tab
231 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
232 $ilTabs->addTab("settings", $lng->txt("settings"), $ilCtrl->getLinkTargetByClass("ilcloudpluginsettingsgui", "editSettings"));
233 }
234
235 // edit permissions
236 if ($ilAccess->checkAccess('edit_permission', "", $this->object->getRefId())) {
237 $ilTabs->addTab("id_permissions", $lng->txt("perm_settings"), $this->ctrl->getLinkTargetByClass("ilpermissiongui", "perm"));
238 }
239 }

References $DIC, $ilCtrl, and ilObjectGUI\$lng.

Field Documentation

◆ $ctrl

ilObjCloudGUI::$ctrl
protected

Definition at line 32 of file class.ilObjCloudGUI.php.

Referenced by getCtrl(), and setCtrl().

◆ $plugin_service

ilObjCloudGUI::$plugin_service
protected

ilCloudPluginService

Definition at line 28 of file class.ilObjCloudGUI.php.


The documentation for this class was generated from the following file: