ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. 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...
 
 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...
 
 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...
 
 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)
 
- 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...
 
 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
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $rbacsystem
 
 $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
 
 $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 41 of file class.ilObjCloudGUI.php.

42 {
43 global $DIC;
44 $lng = $DIC['lng'];
45
46 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
47 $lng->loadLanguageModule("cld");
48 }
global $DIC
Definition: saml.php:7

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 209 of file class.ilObjCloudGUI.php.

210 {
211
212 $content = explode("_", $a_target);
213
214 $_GET["ref_id"] = $content[0];
215 $_GET["baseClass"] = "ilrepositorygUI";
216 $_GET["cmdClass"] = "ilobjcloudgui";
217 $_GET["cmd"] = "render";
218
219 if (in_array("path", $content)) {
220 // remove ref_id, "path" und "endPath"
221 unset($content[0]);
222 unset($content[1]);
223 array_pop($content);
224 // reconstruct and set path
225 $_POST["path"] = implode('_', $content);
226 }
227
228
229 include("ilias.php");
230 }
$_GET["client_id"]
$_POST["username"]

References $_GET, and $_POST.

◆ addHeaderAction()

ilObjCloudGUI::addHeaderAction ( )
protected

Add header action menu.

Reimplemented from ilObjectGUI.

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

468 {
469 $lg = $this->initHeaderAction();
470 if ($lg) {
471 $header_action_class = ilCloudConnector::getHeaderActionGUIClass($this->plugin_service);
472 $header_action_class->addCustomHeaderAction($lg);
473 $this->insertHeaderAction($lg);
474 }
475 }
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 481 of file class.ilObjCloudGUI.php.

482 {
483 global $DIC;
484 $ilLocator = $DIC['ilLocator'];
485
486 if (is_object($this->object)) {
487 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, ""), "", $this->node_id);
488 }
489 }

References $DIC.

◆ afterServiceAuth()

ilObjCloudGUI::afterServiceAuth ( )
protected

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

438 {
439 global $DIC;
440 $ilCtrl = $DIC['ilCtrl'];
441 $lng = $DIC['lng'];
442
443 try {
444 if ($this->plugin_service->afterAuthService()) {
445 $this->object->setRootId("root", true);
446 $this->object->setAuthComplete(true);
447 $this->object->update();
448 ilUtil::sendSuccess($lng->txt("cld_object_added"), true);
449 $ilCtrl->redirectByClass("ilCloudPluginSettingsGUI", "editSettings");
450 } else {
451 include_once("./Services/Repository/classes/class.ilRepUtil.php");
452 ilRepUtil::deleteObjects($this->object->getRefId(), $this->object->getRefId());
453
454 ilUtil::sendFailure($lng->txt("cld_auth_failed_no_object_created"), true);
455 ilObjectGUI::redirectToRefId($this->parent_id);
456 }
457 } catch (Exception $e) {
458 ilUtil::sendFailure($e->getMessage(), true);
459 ilObjectGUI::redirectToRefId($this->parent_id);
460 }
461 }
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 545 of file class.ilObjCloudGUI.php.

546 {
547 $action_list = ilCloudConnector::getActionListGUIClass($this->plugin_service);
549
550 return $action_list->asyncGetContent($this->checkPermissionBool("delete_files"), $this->checkPermissionBool("delete_folders"), $file_tree->getNodeFromId($_GET["node_id"]));
551 }
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 499 of file class.ilObjCloudGUI.php.

500 {
501 global $DIC;
502 $tpl = $DIC['tpl'];
503
504 $response = new stdClass();
505 $response->message = null;
506 $response->locator = null;
507 $response->content = null;
508 $response->success = null;
509
510 try {
512 $file_tree->updateFileTree($_POST["path"]);
513 $node = $file_tree->getNodeFromPath($_POST["path"]);
514 $file_tree_gui = ilCloudConnector::getFileTreeGUIClass($this->plugin_service, $file_tree);
515 $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"));
516
517 $response->locator = $file_tree_gui->getLocatorHtml($file_tree->getNodeFromId($node->getId()));
518 $response->success = true;
519 } catch (Exception $e) {
520 $response->message = $tpl->getMessageHTML($e->getMessage(), "failure");
521 }
522
523 header('Content-type: application/json');
525 exit;
526 }
static getFileTreeGUIClass(ilCloudPluginService $plugin_service_class, ilCloudFileTree $file_tree)
static encode($mixed, $suppress_native=false)
$response

References $_POST, $DIC, $response, 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 64 of file class.ilObjCloudGUI.php.

65 {
66 global $DIC;
67 $ilCtrl = $DIC['ilCtrl'];
68 $ilTabs = $DIC['ilTabs'];
69 $ilNavigationHistory = $DIC['ilNavigationHistory'];
70 $lng = $DIC['lng'];
71
72 // Navigation History
73 $link = $ilCtrl->getLinkTarget($this, "render");
74
75 try {
77 } catch (Exception $e) {
78 ilUtil::sendFailure($lng->txt("cld_no_service_active"), true);
79 ilObjectGUI::redirectToRefId($this->parent_id);
80 }
81
82 if ($this->object != null) {
83 $ilNavigationHistory->addItem($this->object->getRefId(), $link, "cld");
84
85 try {
86 ilCloudConnector::checkServiceActive($this->object->getServiceName());
87 } catch (Exception $e) {
88 ilUtil::sendFailure($lng->txt("cld_plugin_not_active"), true);
89 ilObjectGUI::redirectToRefId($this->parent_id);
90 }
91
92 if ($this->object->getAuthComplete() == false && !$_GET["authMode"]) {
93 if ($this->checkPermissionBool("write")) {
94 $this->serviceAuth($this->object);
95 } else {
96 ilUtil::sendFailure($lng->txt("cld_auth_failed"), true);
97 ilObjectGUI::redirectToRefId($this->parent_id);
98 }
99 }
100 $this->plugin_service = ilCloudConnector::getServiceClass($this->object->getServiceName(), $this->object->getId(), false);
101 }
102
103 $next_class = $ilCtrl->getNextClass($this);
104
105 $cmd = $ilCtrl->getCmd($this);
106 switch ($cmd) {
107 case "editSettings":
108 $next_class = "ilcloudpluginsettingsgui";
109 break;
110 case "afterServiceAuth":
111 $this->checkPermission("write");
112 $this->$cmd();
113
114 return;
115 case "render":
116 $this->addHeaderAction();
117 break;
118 case 'infoScreen':
119 $this->ctrl->redirectByClass(ilInfoScreenGUI::class);
120 break;
121 }
122
123 switch ($next_class) {
124 case "ilinfoscreengui":
125 $this->prepareOutput();
126 $this->infoScreenForward();
127 break;
128 case "ilcommonactiondispatchergui":
129 include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
131 $this->ctrl->forwardCommand($gui);
132 break;
133 case "ilpermissiongui":
134 $this->prepareOutput();
135 $ilTabs->activateTab("id_permissions");
136 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
137 $perm_gui = new ilPermissionGUI($this);
138 $this->ctrl->forwardCommand($perm_gui);
139 break;
140 case "ilcloudpluginuploadgui":
141 if ($this->checkPermissionBool("upload")) {
142 $upload_gui = ilCloudConnector::getUploadGUIClass($this->plugin_service);
143 $this->ctrl->forwardCommand($upload_gui);
144 }
145 break;
146 case "ilcloudplugincreatefoldergui":
147 if ($this->checkPermissionBool("folders_create")) {
148 $folder_gui = ilCloudConnector::getCreateFolderGUIClass($this->plugin_service);
149 $this->ctrl->forwardCommand($folder_gui);
150 }
151 break;
152 case "ilcloudplugindeletegui":
153 if ($this->checkPermissionBool("delete_files") || $this->checkPermissionBool("delete_folders")) {
154 $delete_gui = ilCloudConnector::getDeleteGUIClass($this->plugin_service);
155 $this->ctrl->forwardCommand($delete_gui);
156 }
157 break;
158 case "ilcloudpluginsettingsgui":
159 $this->prepareOutput();
160 if ($this->checkPermissionBool("write")) {
161 $settings_gui = ilCloudConnector::getSettingsGUIClass($this->plugin_service);
162 $settings_gui->setCloudObject($this->object);
163 $this->ctrl->forwardCommand($settings_gui);
164 }
165 break;
166 case "ilcloudpluginactionlistgui":
167 $action_list_gui = ilCloudConnector::getActionListGUIClass($this->plugin_service);
168 $this->ctrl->forwardCommand($action_list_gui);
169 break;
170 case "ilcloudpluginitemcreationlistgui":
171 $item_creation_gui = ilCloudConnector::getItemCreationListGUIClass($this->plugin_service);
172 $this->ctrl->forwardCommand($item_creation_gui);
173 break;
174 case "ilcloudpluginfiletreegui":
176 $this->ctrl->forwardCommand($file_tree_gui);
177 break;
178 case "ilcloudpluginheaderactiongui":
179 $header_action_gui = ilCloudConnector::getHeaderActionGUIClass($this->plugin_service);
180 $this->ctrl->forwardCommand($header_action_gui);
181 break;
182 case "ilcloudplugininitgui":
183 $init_gui = ilCloudConnector::getInitGUIClass($this->plugin_service);
184 $this->ctrl->forwardCommand($init_gui);
185 break;
186 default:
187 return parent::executeCommand();
188 }
189
190 return true;
191 }
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.

References $_GET, $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 268 of file class.ilObjCloudGUI.php.

269 {
270 return $this->ctrl;
271 }

References $ctrl.

◆ getFile()

ilObjCloudGUI::getFile ( )

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

530 {
531 global $DIC;
532 $ilTabs = $DIC['ilTabs'];
533 if ($this->checkPermissionBool("download")) {
534 try {
536 $file_tree->downloadFromService($_GET['id']);
537 } catch (Exception $e) {
538 $ilTabs->activateTab("content");
539 ilUtil::sendFailure($e->getMessage());
540 }
541 }
542 }

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 197 of file class.ilObjCloudGUI.php.

198 {
199 return "render";
200 }

◆ getType()

ilObjCloudGUI::getType ( )
final

Get type.

Reimplemented from ilObject2GUI.

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

55 {
56 return "cld";
57 }

Referenced by ilCloudPluginInfoScreenGUI\getInfoScreen().

+ Here is the caller graph for this function:

◆ infoScreen()

ilObjCloudGUI::infoScreen ( )

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

234 {
235 return false;
236 }

◆ infoScreenForward()

ilObjCloudGUI::infoScreenForward ( )

show information screen

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

287 {
288 global $DIC;
289 $ilTabs = $DIC['ilTabs'];
290 $ilErr = $DIC['ilErr'];
291
292 $ilTabs->activateTab("id_info");
293
294 if (!$this->checkPermissionBool("visible")) {
295 $ilErr->raiseError($this->lng->txt("msg_no_perm_read"));
296 }
297
298 $plugin_info = ilCloudConnector::getInfoScreenGUIClass($this->plugin_service);
299 $info = $plugin_info->getInfoScreen($this);
300 $this->ctrl->forwardCommand($info);
301 }
static getInfoScreenGUIClass(ilCloudPluginService $plugin_service_class)
$info
Definition: index.php:5

References $DIC, ilObjectGUI\$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 330 of file class.ilObjCloudGUI.php.

331 {
332 global $DIC;
333 $lng = $DIC['lng'];
334
335 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
336 $form = new ilPropertyFormGUI();
337 $form->setTarget("_top");
338 $this->ctrl->setParameter($this, 'new_type', 'cld');
339 $form->setFormAction($this->ctrl->getFormAction($this, "save"));
340 $form->setTitle($this->lng->txt($a_new_type . "_new"));
341
342 // title
343 $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
344 $ti->setSize(min(40, ilObject::TITLE_LENGTH));
345 $ti->setMaxLength(ilObject::TITLE_LENGTH);
346 $ti->setRequired(true);
347 $form->addItem($ti);
348
349 // description
350 $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
351 $ta->setCols(40);
352 $ta->setRows(2);
353 $form->addItem($ta);
354
355 $services_group = new ilRadioGroupInputGUI($lng->txt("cld_service"), "service");
356 $services_group->setRequired(true);
358 $option = new ilRadioOption($service, $service);
359 $hook_object = ilCloudConnector::getPluginHookClass($option->getValue());
360 $option->setTitle($hook_object->txt($service));
361 $option->setInfo($hook_object->txt("create_info"));
362 $this->plugin_service = ilCloudConnector::getServiceClass($service, 0, false);
363 $init_gui = ilCloudConnector::getCreationGUIClass($this->plugin_service);
364 if ($init_gui) {
365 $init_gui->initPluginCreationFormSection($option);
366 }
367 $services_group->addOption($option);
368 }
369
370 //Select first radio-button by default
371 $services_group->setValue(array_shift($services_group->getOptions())->getValue());
372
373 $form->addItem($services_group);
374
376
377 $form->addCommandButton("save", $this->lng->txt($a_new_type . "_add"));
378 $form->addCommandButton("cancel", $this->lng->txt("cancel"));
379
380 return $form;
381 }
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.
$service
Definition: login.php:15
if(isset($_POST['submit'])) $form

References $DIC, $form, ilObjectGUI\$lng, $service, 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 313 of file class.ilObjCloudGUI.php.

314 {
315 $forms = array(
316 self::CFORM_NEW => $this->initCreateForm($a_new_type),
317 );
318
319 return $forms;
320 }
initCreateForm($a_new_type)
Init object creation form.

References initCreateForm().

+ Here is the call graph for this function:

◆ render()

ilObjCloudGUI::render ( )

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

493 {
494 $init_gui = ilCloudConnector::getInitGUIClass($this->plugin_service);
495 $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"));
496 }

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 423 of file class.ilObjCloudGUI.php.

424 {
425 global $DIC;
426 $ilCtrl = $DIC['ilCtrl'];
427 try {
428 $service = ilCloudConnector::getServiceClass($object->getServiceName(), $object->getId());
429 $service->authService($ilCtrl->getLinkTarget($this, "afterServiceAuth") . "&authMode=true");
430 } catch (Exception $e) {
431 ilUtil::sendFailure($e->getMessage(), true);
432 ilObjectGUI::redirectToRefId($this->parent_id);
433 }
434 }

References $DIC, $ilCtrl, ilObjectGUI\$object, $service, 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 277 of file class.ilObjCloudGUI.php.

278 {
279 $this->ctrl = $ctrl;
280 }

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 239 of file class.ilObjCloudGUI.php.

240 {
241 global $DIC;
242 $ilTabs = $DIC['ilTabs'];
243 $ilCtrl = $DIC['ilCtrl'];
244 $ilAccess = $DIC['ilAccess'];
245 $lng = $DIC['lng'];
246
247 // tab for the "show content" command
248 if ($ilAccess->checkAccess("read", "", $this->object->getRefId())) {
249 $ilTabs->addTab("content", $lng->txt("content"), $ilCtrl->getLinkTarget($this, "render"));
250 $ilTabs->addTab("id_info", $lng->txt("info_short"), $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"));
251 }
252
253 // a "properties" tab
254 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
255 $ilTabs->addTab("settings", $lng->txt("settings"), $ilCtrl->getLinkTargetByClass("ilcloudpluginsettingsgui", "editSettings"));
256 }
257
258 // edit permissions
259 if ($ilAccess->checkAccess('edit_permission', "", $this->object->getRefId())) {
260 $ilTabs->addTab("id_permissions", $lng->txt("perm_settings"), $this->ctrl->getLinkTargetByClass("ilpermissiongui", "perm"));
261 }
262 }

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

Field Documentation

◆ $ctrl

ilObjCloudGUI::$ctrl
protected

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

Referenced by getCtrl(), and setCtrl().

◆ $plugin_service

ilObjCloudGUI::$plugin_service
protected

ilCloudPluginService

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


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