ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
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...
 
 _goto ($a_target)
 _goto Deep link More...
 
 infoScreen ()
 
 setTabs ()
 Set tabs. More...
 
 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)
 
 getCreationMode ()
 
 isVisible ()
 
 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
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public. More...
 
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...
 
 getAdminTabs (&$tabs_gui)
 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 ($in_rep=false)
 cancel action and go back to previous page 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...
 
 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...
 

Protected Member Functions

 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 afterSave (ilObjCloud $a_new_object)
 
 serviceAuth ($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...
 
 prepareOutput ()
 
 setTitleAndDescription ()
 
 showUpperIcon ()
 
 omitLocator ($a_omit=true)
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 
 setTargetFrame ($a_cmd, $a_target_frame)
 
 getCenterColumnHTML ()
 
 getRightColumnHTML ()
 
 setColumnSettings ($column_gui)
 
 checkPermission ($a_perm, $a_cmd="")
 
 showPossibleSubObjects ()
 
 redirectToRefId ()
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 
 fillCloneSearchTemplate ($a_tpl_varname, $a_type)
 
 searchCloneSource ()
 
 buildCloneSelect ($existing_objs)
 
 addAdminLocatorItems ()
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation ()
 Deprecated functions. More...
 
 setReturnLocation ()
 
 showActions ()
 
 getTitlesByRefId ()
 
 getTabs ()
 
 __showButton ()
 
 hitsperpageObject ()
 
 __initTableGUI ()
 
 __setTableGUIBasicData ()
 
 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)
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 prepareOutput ()
 prepare output More...
 
 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 public More...
 
 setAdminTabs ()
 set admin tabs 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...
 
 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)
 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...
 
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste More...
 
 getTabs (&$tabs_gui)
 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 ($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...
 
- Protected Attributes inherited from ilObject2GUI
 $object_id
 
 $node_id
 
 $creation_forms = array()
 
 $id_type = array()
 
 $parent_id
 
 $access_handler
 

Additional Inherited Members

- 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...
 
- 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

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

References ilObjectGUI\$lng.

36  {
37  global $lng;
38 
39  parent::__construct($a_id, $a_id_type, $a_parent_node_id);
40  $lng->loadLanguageModule("cld");
41 
42  }

Member Function Documentation

◆ _goto()

ilObjCloudGUI::_goto (   $a_target)

_goto Deep link

Parameters
string$a_target

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

References $_GET, and $_POST.

207  {
208  $content = explode("_", $a_target);
209  $_GET["ref_id"] = $content[0];
210  $_POST["path"] = $content[2];
211  $_GET["baseClass"] = "ilrepositorygUI";
212  $_GET["cmdClass"] = "ilobjcloudgui";
213  $_GET["cmd"] = "render";
214  include("ilias.php");
215  }
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]

◆ addHeaderAction()

ilObjCloudGUI::addHeaderAction ( )
protected

Add header action menu.

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

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

Referenced by executeCommand().

422  {
423  $lg = $this->initHeaderAction();
424  if($lg)
425  {
426  $header_action_class = ilCloudConnector::getHeaderActionGUIClass($this->plugin_service);
427  $header_action_class->addCustomHeaderAction($lg);
428  $this->insertHeaderAction($lg);
429  }
430  }
initHeaderAction($a_sub_type=null, $a_sub_id=null)
Add header action menu.
static getHeaderActionGUIClass(ilCloudPluginService $plugin_service_class)
insertHeaderAction($a_list_gui)
Insert header action into main template.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addLocatorItems()

ilObjCloudGUI::addLocatorItems ( )
protected

addLocatorItems

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

References ilObject2GUI\$node_id.

436  {
437  global $ilLocator;
438 
439  if (is_object($this->object))
440  {
441  $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, ""), "", $this->node_id);
442  }
443  }

◆ afterSave()

ilObjCloudGUI::afterSave ( ilObjCloud  $a_new_object)
protected

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

References ilCloudConnector\getCreationGUIClass(), ilObject2\getId(), ilObjCloud\getServiceName(), initCreateForm(), ilObjectGUI\redirectToRefId(), ilUtil\sendFailure(), serviceAuth(), ilObjCloud\setAuthComplete(), ilObjCloud\setOnline(), ilObjCloud\setRootFolder(), ilObjCloud\setServiceName(), and ilObject2\update().

347  {
348  try
349  {
350  $form = $this->initCreateForm("cld");
351 
352  if ($form->checkInput())
353  {
354  $a_new_object->setServiceName($form->getInput("service"));
355  $a_new_object->setRootFolder("/");
356  $a_new_object->setOnline(false);
357  $a_new_object->setAuthComplete(false);
358  $this->plugin_service = new ilCloudPluginService($a_new_object->getServiceName(), $a_new_object->getId());
359  $init_gui = ilCloudConnector::getCreationGUIClass($this->plugin_service);
360  if ($init_gui)
361  {
362  $init_gui->afterSavePluginCreation($a_new_object, $form);
363  }
364  $a_new_object->update();
365  $this->serviceAuth($a_new_object);
366  }
367 
368  } catch (Exception $e)
369  {
370  ilUtil::sendFailure($e->getMessage(),true);
371  ilObjectGUI::redirectToRefId($this->parent_id);
372  }
373  }
setServiceName($a_val)
Set service.
setOnline($a_val)
Set online.
initCreateForm($a_new_type)
Init object creation form.
Class ilCloudPluginService.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
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...
setRootFolder($a_val, $no_check=false)
Set root_folder, this may only be changed by the owner of the object.
static getCreationGUIClass(ilCloudPluginService $plugin_service_class)
getServiceName()
Get service.
setAuthComplete($auth_complete)
+ Here is the call graph for this function:

◆ afterServiceAuth()

ilObjCloudGUI::afterServiceAuth ( )
protected

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

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

390  {
391  global $ilCtrl,$lng;
392 
393  try
394  {
395  if($this->plugin_service->afterAuthService())
396  {
397  $this->object->setRootId("root",true);
398  $this->object->setAuthComplete(true);
399  $this->object->update();
400  ilUtil::sendSuccess($lng->txt("cld_object_added"), true);
401  $ilCtrl->redirectByClass("ilCloudPluginSettingsGUI", "editSettings");
402  }
403  else
404  {
405  include_once("./Services/Repository/classes/class.ilRepUtil.php");
406  ilRepUtil::deleteObjects($this->object->getRefId(), $this->object->getRefId());
407 
408  ilUtil::sendFailure($lng->txt("cld_auth_failed_no_object_created"),true);
409  ilObjectGUI::redirectToRefId($this->parent_id);
410  }
411  } catch (Exception $e)
412  {
413  ilUtil::sendFailure($e->getMessage(), true);
414  ilObjectGUI::redirectToRefId($this->parent_id);
415  }
416  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
global $ilCtrl
Definition: ilias.php:18
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
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.
+ Here is the call graph for this function:

◆ asyncGetActionListContent()

ilObjCloudGUI::asyncGetActionListContent ( )

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

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

512  {
513  $action_list = ilCloudConnector::getActionListGUIClass($this->plugin_service);
515  return $action_list->asyncGetContent($this->checkPermissionBool("delete_files"), $this->checkPermissionBool("delete_folders"), $file_tree->getNodeFromId($_GET["node_id"]));
516  }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
static getActionListGUIClass(ilCloudPluginService $plugin_service_class)
$_GET["client_id"]
+ Here is the call graph for this function:

◆ asyncGetBlock()

ilObjCloudGUI::asyncGetBlock ( )

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

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

460  {
461  global $tpl;
462 
463  $response = new stdClass();
464  $response->message = null;
465  $response->locator = null;
466  $response->content = null;
467  $response->success = null;
468 
469  try{
471  $file_tree->updateFileTree($_POST["path"]);
472  $node = $file_tree->getNodeFromPath($_POST["path"]);
473  $file_tree_gui = ilCloudConnector::getFileTreeGUIClass($this->plugin_service,$file_tree);
474  $response->content = $file_tree_gui->getFolderHtml($this,
475  $node->getId(),
476  $this->checkPermissionBool("delete_files"),
477  $this->checkPermissionBool("delete_folders"),
478  $this->checkPermissionBool("download"),
479  $this->checkPermissionBool("files_visible"),
480  $this->checkPermissionBool("folders_visible"));
481 
482  $response->locator = $file_tree_gui->getLocatorHtml($file_tree->getNodeFromId($node->getId()));
483  $response->success = true;
484  }
485  catch(Exception $e)
486  {
487  $response->message = $tpl->getMessageHTML($e->getMessage(),"failure");
488  }
489 
490  header('Content-type: application/json');
491  echo ilJsonUtil::encode($response);
492  exit;
493  }
exit
Definition: login.php:54
$_POST['username']
Definition: cron.php:12
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
static getFileTreeGUIClass(ilCloudPluginService $plugin_service_class, ilCloudFileTree $file_tree)
static encode($mixed, $suppress_native=false)
+ Here is the call graph for this function:

◆ executeCommand()

ilObjCloudGUI::executeCommand ( )

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

References $_GET, $cmd, $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().

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

◆ getFile()

ilObjCloudGUI::getFile ( )

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

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

496  {
497  global $ilTabs;
498  if ($this->checkPermissionBool("download"))
499  {
500  try{
502  $file_tree->downloadFromService($_GET['id']);
503  } catch (Exception $e)
504  {
505  $ilTabs->activateTab("content");
506  ilUtil::sendFailure($e->getMessage());
507  }
508  }
509  }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
$_GET["client_id"]
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ getStandardCmd()

ilObjCloudGUI::getStandardCmd ( )

Get standard command.

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

196  {
197  return "render";
198  }

◆ getType()

ilObjCloudGUI::getType ( )
final

Get type.

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

Referenced by ilCloudPluginInfoScreenGUI\getInfoScreen().

48  {
49  return "cld";
50  }
+ Here is the caller graph for this function:

◆ infoScreen()

ilObjCloudGUI::infoScreen ( )

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

218  {
219  return false;
220  }

◆ infoScreenForward()

ilObjCloudGUI::infoScreenForward ( )

show information screen

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

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

Referenced by executeCommand().

253  {
254  global $ilTabs, $ilErr;
255 
256  $ilTabs->activateTab("id_info");
257 
258  if (!$this->checkPermissionBool("visible"))
259  {
260  $ilErr->raiseError($this->lng->txt("msg_no_perm_read"));
261  }
262 
263  $plugin_info = ilCloudConnector::getInfoScreenGUIClass($this->plugin_service);
264  $info = $plugin_info->getInfoScreen($this);
265  $this->ctrl->forwardCommand($info);
266  }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
static getInfoScreenGUIClass(ilCloudPluginService $plugin_service_class)
+ 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

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

References ilObjectGUI\$lng, ilCloudConnector\getActiveServices(), ilCloudConnector\getCreationGUIClass(), ilCloudConnector\getPluginHookClass(), ilCloudConnector\getServiceClass(), ilObjectGUI\initDidacticTemplate(), ilTextAreaInputGUI\setCols(), ilFormPropertyGUI\setRequired(), ilTextInputGUI\setSize(), and ilObject\TITLE_LENGTH.

Referenced by afterSave(), and initCreationForms().

293  {
294  global $lng;
295 
296  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
297  $form = new ilPropertyFormGUI();
298  $form->setTarget("_top");
299  $form->setFormAction($this->ctrl->getFormAction($this, "save"));
300  $form->setTitle($this->lng->txt($a_new_type . "_new"));
301 
302  // title
303  $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
304  $ti->setSize(min(40, ilObject::TITLE_LENGTH));
305  $ti->setMaxLength(ilObject::TITLE_LENGTH);
306  $ti->setRequired(true);
307  $ti->setValidationRegexp('/^[ a-zA-Z0-9\-]+$/i');
308  $form->addItem($ti);
309 
310  // description
311  $ta = new ilTextAreaInputGUI($this->lng->txt("description"), "desc");
312  $ta->setCols(40);
313  $ta->setRows(2);
314  $form->addItem($ta);
315 
316  $services_group = new ilRadioGroupInputGUI($lng->txt("cld_service"), "service");
317  $services_group->setRequired(true);
318  foreach (ilCloudConnector::getActiveServices() as $service)
319  {
320  $option = new ilRadioOption($service, $service);
321  $hook_object = ilCloudConnector::getPluginHookClass($option->getValue());
322  $option->setTitle($hook_object->txt($service));
323  $option->setInfo($hook_object->txt("create_info"));
324  $this->plugin_service = ilCloudConnector::getServiceClass($service, 0, false);
325  $init_gui = ilCloudConnector::getCreationGUIClass($this->plugin_service);
326  if($init_gui)
327  {
328  $init_gui->initPluginCreationFormSection($option);
329  }
330  $services_group->addOption($option);
331  }
332 
333  $form->addItem($services_group);
334 
335  $form = $this->initDidacticTemplate($form);
336 
337  $form->addCommandButton("save", $this->lng->txt($a_new_type . "_add"));
338  $form->addCommandButton("cancel", $this->lng->txt("cancel"));
339 
340  return $form;
341  }
This class represents an option in a radio group.
This class represents a property form user interface.
const TITLE_LENGTH
max length of object title
This class represents a property in a property form.
initDidacticTemplate(ilPropertyFormGUI $form)
Show didactic template types.
setSize($a_size)
Set Size.
This class represents a text property in a property form.
static getPluginHookClass($service_name)
This class represents a text area property in a property form.
static getServiceClass($service_name, $obj_id, $connect=true)
static getCreationGUIClass(ilCloudPluginService $plugin_service_class)
setRequired($a_required)
Set Required.
+ 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

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

References initCreateForm().

278  {
279  $forms = array(
280  self::CFORM_NEW => $this->initCreateForm($a_new_type)
281  );
282 
283  return $forms;
284  }
initCreateForm($a_new_type)
Init object creation form.
+ Here is the call graph for this function:

◆ render()

ilObjCloudGUI::render ( )

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

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

446  {
447 
448  $init_gui = ilCloudConnector::getInitGUIClass($this->plugin_service);
449  $init_gui->initGUI($this, $this->checkPermissionBool("folders_create"),
450  $this->checkPermissionBool("upload"),
451  $this->checkPermissionBool("delete_files"),
452  $this->checkPermissionBool("delete_folders"),
453  $this->checkPermissionBool("download"),
454  $this->checkPermissionBool("files_visible"),
455  $this->checkPermissionBool("folders_visible"));
456  }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
static getInitGUIClass(ilCloudPluginService $plugin_service_class)
+ Here is the call graph for this function:

◆ serviceAuth()

ilObjCloudGUI::serviceAuth (   $object)
protected

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

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

Referenced by afterSave(), and executeCommand().

376  {
377  global $ilCtrl;
378  try{
379  $service = ilCloudConnector::getServiceClass($object->getServiceName(), $object->getId());
380  $service->authService($ilCtrl->getLinkTarget($this, "afterServiceAuth") . "&authMode=true");
381  } catch (Exception $e)
382  {
383  ilUtil::sendFailure($e->getMessage(), true);
384  ilObjectGUI::redirectToRefId($this->parent_id);
385  }
386 
387  }
global $ilCtrl
Definition: ilias.php:18
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
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 getServiceClass($service_name, $obj_id, $connect=true)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTabs()

ilObjCloudGUI::setTabs ( )

Set tabs.

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

References $ilCtrl, and ilObjectGUI\$lng.

226  {
227  global $ilTabs, $ilCtrl, $ilAccess, $lng;
228 
229  // tab for the "show content" command
230  if ($ilAccess->checkAccess("read", "", $this->object->getRefId()))
231  {
232  $ilTabs->addTab("content", $lng->txt("content"), $ilCtrl->getLinkTarget($this, "render"));
233  $ilTabs->addTab("id_info", $lng->txt("info"), $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"));
234  }
235 
236  // a "properties" tab
237  if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
238  {
239  $ilTabs->addTab("settings", $lng->txt("settings"), $ilCtrl->getLinkTargetByClass("ilcloudpluginsettingsgui", "editSettings"));
240  }
241 
242  // edit permissions
243  if ($ilAccess->checkAccess('edit_permission', "", $this->object->getRefId()))
244  {
245  $ilTabs->addTab("id_permissions", $lng->txt("perm_settings"), $this->ctrl->getLinkTargetByClass("ilpermissiongui", "perm"));
246  }
247  }
global $ilCtrl
Definition: ilias.php:18

Field Documentation

◆ $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: