ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 ()
 
 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)
 
 getCreationMode ()
 
 prepareOutput ($a_show_subobjects=true)
 
 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 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...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. 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 ()
 
 showUpperIcon ()
 
 omitLocator ($a_omit=true)
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 
 setTargetFrame ($a_cmd, $a_target_frame)
 
 getCenterColumnHTML ()
 
 getRightColumnHTML ()
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 
 showPossibleSubObjects ()
 
 redirectToRefId ($a_ref_id, $a_cmd="")
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 
 fillCloneSearchTemplate ($a_tpl_varname, $a_type)
 
 searchCloneSource ()
 
 buildCloneSelect ($existing_objs)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation ($a_cmd, $a_location="")
 Deprecated functions. More...
 
 setReturnLocation ($a_cmd, $a_location)
 
 showActions ()
 
 getTabs ()
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 
 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
 getObjectService ()
 Get object service. More...
 
 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 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...
 
 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
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 

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

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

References $DIC, and ilObjectGUI\$lng.

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

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.

References $_GET, and $_POST.

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

◆ addHeaderAction()

ilObjCloudGUI::addHeaderAction ( )
protected

Add header action menu.

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

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

Referenced by executeCommand().

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

References $DIC, and ilObject2GUI\$node_id.

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

◆ afterServiceAuth()

ilObjCloudGUI::afterServiceAuth ( )
protected

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

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

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

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

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

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

499  {
500  global $DIC;
501  $tpl = $DIC['tpl'];
502 
503  $response = new stdClass();
504  $response->message = null;
505  $response->locator = null;
506  $response->content = null;
507  $response->success = null;
508 
509  try {
511  $file_tree->updateFileTree($_POST["path"]);
512  $node = $file_tree->getNodeFromPath($_POST["path"]);
513  $file_tree_gui = ilCloudConnector::getFileTreeGUIClass($this->plugin_service, $file_tree);
514  $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"));
515 
516  $response->locator = $file_tree_gui->getLocatorHtml($file_tree->getNodeFromId($node->getId()));
517  $response->success = true;
518  } catch (Exception $e) {
519  $response->message = $tpl->getMessageHTML($e->getMessage(), "failure");
520  }
521 
522  header('Content-type: application/json');
524  exit;
525  }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
global $DIC
Definition: saml.php:7
static getFileTreeGUIClass(ilCloudPluginService $plugin_service_class, ilCloudFileTree $file_tree)
static encode($mixed, $suppress_native=false)
exit
Definition: backend.php:16
$response
$_POST["username"]
+ Here is the call graph for this function:

◆ executeCommand()

ilObjCloudGUI::executeCommand ( )
Returns
bool
Exceptions
ilCloudException

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

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

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":
175  $file_tree_gui = ilCloudConnector::getFileTreeGUIClass($this->plugin_service, ilCloudFileTree::getFileTreeFromSession());
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  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
serviceAuth(ilObjCloud $object)
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
static getActionListGUIClass(ilCloudPluginService $plugin_service_class)
global $DIC
Definition: saml.php:7
$_GET["client_id"]
static getInitGUIClass(ilCloudPluginService $plugin_service_class)
static getDeleteGUIClass(ilCloudPluginService $plugin_service_class)
static getUploadGUIClass(ilCloudPluginService $plugin_service_class)
static getCreateFolderGUIClass(ilCloudPluginService $plugin_service_class)
static getFileTreeGUIClass(ilCloudPluginService $plugin_service_class, ilCloudFileTree $file_tree)
global $ilCtrl
Definition: ilias.php:18
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)
prepareOutput($a_show_subobjects=true)
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:

◆ getCtrl()

ilObjCloudGUI::getCtrl ( )
Returns

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

References $ctrl.

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

◆ getFile()

ilObjCloudGUI::getFile ( )

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

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

529  {
530  global $DIC;
531  $ilTabs = $DIC['ilTabs'];
532  if ($this->checkPermissionBool("download")) {
533  try {
535  $file_tree->downloadFromService($_GET['id']);
536  } catch (Exception $e) {
537  $ilTabs->activateTab("content");
538  ilUtil::sendFailure($e->getMessage());
539  }
540  }
541  }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
global $DIC
Definition: saml.php:7
$_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 197 of file class.ilObjCloudGUI.php.

198  {
199  return "render";
200  }

◆ getType()

ilObjCloudGUI::getType ( )
final

Get type.

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

Referenced by ilCloudPluginInfoScreenGUI\getInfoScreen().

55  {
56  return "cld";
57  }
+ Here is the caller graph for this function:

◆ infoScreen()

ilObjCloudGUI::infoScreen ( )

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

233  {
234  return false;
235  }

◆ infoScreenForward()

ilObjCloudGUI::infoScreenForward ( )

show information screen

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

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

Referenced by executeCommand().

286  {
287  global $DIC;
288  $ilTabs = $DIC['ilTabs'];
289  $ilErr = $DIC['ilErr'];
290 
291  $ilTabs->activateTab("id_info");
292 
293  if (!$this->checkPermissionBool("visible")) {
294  $ilErr->raiseError($this->lng->txt("msg_no_perm_read"));
295  }
296 
297  $plugin_info = ilCloudConnector::getInfoScreenGUIClass($this->plugin_service);
298  $info = $plugin_info->getInfoScreen($this);
299  $this->ctrl->forwardCommand($info);
300  }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
global $DIC
Definition: saml.php:7
static getInfoScreenGUIClass(ilCloudPluginService $plugin_service_class)
$info
Definition: index.php:5
+ 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 329 of file class.ilObjCloudGUI.php.

References $DIC, $form, ilObjectGUI\$lng, ilObjectGUI\afterSave(), ilCloudConnector\getActiveServices(), ilCloudConnector\getCreationGUIClass(), ilObject\getId(), ilCloudConnector\getPluginHookClass(), ilObject\getRefId(), ilCloudConnector\getServiceClass(), ilObjectGUI\initDidacticTemplate(), ilUtil\sendFailure(), serviceAuth(), ilTextAreaInputGUI\setCols(), ilFormPropertyGUI\setRequired(), ilTextInputGUI\setSize(), ilObject\TITLE_LENGTH, and ilObject\update().

Referenced by initCreationForms().

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

References initCreateForm().

313  {
314  $forms = array(
315  self::CFORM_NEW => $this->initCreateForm($a_new_type),
316  );
317 
318  return $forms;
319  }
initCreateForm($a_new_type)
Init object creation form.
+ Here is the call graph for this function:

◆ render()

ilObjCloudGUI::render ( )

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

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

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

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

References $DIC, $ilCtrl, ilObject2\getId(), ilCloudConnector\getServiceClass(), ilObjCloud\getServiceName(), ilObjectGUI\redirectToRefId(), and ilUtil\sendFailure().

Referenced by executeCommand(), and initCreateForm().

423  {
424  global $DIC;
425  $ilCtrl = $DIC['ilCtrl'];
426  try {
427  $service = ilCloudConnector::getServiceClass($object->getServiceName(), $object->getId());
428  $service->authService($ilCtrl->getLinkTarget($this, "afterServiceAuth") . "&authMode=true");
429  } catch (Exception $e) {
430  ilUtil::sendFailure($e->getMessage(), true);
431  ilObjectGUI::redirectToRefId($this->parent_id);
432  }
433  }
global $DIC
Definition: saml.php:7
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)
getServiceName()
Get service.
+ 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 276 of file class.ilObjCloudGUI.php.

References $ctrl.

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

◆ setTabs()

ilObjCloudGUI::setTabs ( )

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

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

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

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: