4 include_once(
"./Services/Object/classes/class.ilObject2GUI.php");
5 include_once(
"./Services/JSON/classes/class.ilJsonUtil.php");
6 include_once(
"class.ilCloudPluginFileTreeGUI.php");
7 include_once(
"class.ilCloudFileTree.php");
8 include_once(
"class.ilCloudConnector.php");
41 public function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0)
46 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
47 $lng->loadLanguageModule(
"cld");
68 $ilTabs = $DIC[
'ilTabs'];
69 $ilNavigationHistory = $DIC[
'ilNavigationHistory'];
73 $link =
$ilCtrl->getLinkTarget($this,
"render");
82 if ($this->
object != null) {
83 $ilNavigationHistory->addItem($this->object->getRefId(), $link,
"cld");
92 if ($this->object->getAuthComplete() ==
false && !
$_GET[
"authMode"]) {
103 $next_class =
$ilCtrl->getNextClass($this);
108 $next_class =
"ilcloudpluginsettingsgui";
110 case "afterServiceAuth":
119 $this->ctrl->redirectByClass(ilInfoScreenGUI::class);
123 switch ($next_class) {
124 case "ilinfoscreengui":
128 case "ilcommonactiondispatchergui":
129 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
131 $this->ctrl->forwardCommand($gui);
133 case "ilpermissiongui":
135 $ilTabs->activateTab(
"id_permissions");
136 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
138 $this->ctrl->forwardCommand($perm_gui);
140 case "ilcloudpluginuploadgui":
143 $this->ctrl->forwardCommand($upload_gui);
146 case "ilcloudplugincreatefoldergui":
149 $this->ctrl->forwardCommand($folder_gui);
152 case "ilcloudplugindeletegui":
155 $this->ctrl->forwardCommand($delete_gui);
158 case "ilcloudpluginsettingsgui":
162 $settings_gui->setCloudObject($this->
object);
163 $this->ctrl->forwardCommand($settings_gui);
166 case "ilcloudpluginactionlistgui":
168 $this->ctrl->forwardCommand($action_list_gui);
170 case "ilcloudpluginitemcreationlistgui":
172 $this->ctrl->forwardCommand($item_creation_gui);
174 case "ilcloudpluginfiletreegui":
176 $this->ctrl->forwardCommand($file_tree_gui);
178 case "ilcloudpluginheaderactiongui":
180 $this->ctrl->forwardCommand($header_action_gui);
182 case "ilcloudplugininitgui":
184 $this->ctrl->forwardCommand($init_gui);
187 return parent::executeCommand();
209 public static function _goto($a_target)
211 $content = explode(
"_", $a_target);
213 $_GET[
"ref_id"] = $content[0];
214 $_GET[
"baseClass"] =
"ilrepositorygUI";
215 $_GET[
"cmdClass"] =
"ilobjcloudgui";
216 $_GET[
"cmd"] =
"render";
218 if (in_array(
"path", $content)) {
224 $_POST[
"path"] = implode(
'_', $content);
228 include(
"ilias.php");
241 $ilTabs = $DIC[
'ilTabs'];
243 $ilAccess = $DIC[
'ilAccess'];
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"));
253 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
254 $ilTabs->addTab(
"settings",
$lng->txt(
"settings"),
$ilCtrl->getLinkTargetByClass(
"ilcloudpluginsettingsgui",
"editSettings"));
258 if ($ilAccess->checkAccess(
'edit_permission',
"", $this->object->getRefId())) {
259 $ilTabs->addTab(
"id_permissions",
$lng->txt(
"perm_settings"), $this->ctrl->getLinkTargetByClass(
"ilpermissiongui",
"perm"));
288 $ilTabs = $DIC[
'ilTabs'];
291 $ilTabs->activateTab(
"id_info");
294 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"));
298 $info = $plugin_info->getInfoScreen($this);
299 $this->ctrl->forwardCommand(
$info);
334 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
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"));
345 $ti->setRequired(
true);
359 $option->setTitle($hook_object->txt($service));
360 $option->setInfo($hook_object->txt(
"create_info"));
364 $init_gui->initPluginCreationFormSection($option);
366 $services_group->addOption($option);
370 $services_group->setValue(array_shift($services_group->getOptions())->getValue());
372 $form->addItem($services_group);
376 $form->addCommandButton(
"save", $this->lng->txt($a_new_type .
"_add"));
377 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
393 $this->ctrl->setParameter($this,
'ref_id', $this->tree->getParentId($a_new_object->
getRefId()));
395 $this->ctrl->setParameter($this,
'ref_id', $a_new_object->
getRefId());
397 if (
$form->checkInput()) {
398 $a_new_object->setServiceName(
$form->getInput(
"service"));
399 $a_new_object->setRootFolder(
"/");
400 $a_new_object->setOnline(
false);
401 $a_new_object->setAuthComplete(
false);
405 $init_gui->afterSavePluginCreation($a_new_object,
$form);
408 $this->ctrl->setParameter($this,
'new_type',
'');
413 $form->setValuesByPost();
414 $this->tpl->setContent(
$form->getHTML());
428 $service->authService(
$ilCtrl->getLinkTarget($this,
"afterServiceAuth") .
"&authMode=true");
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");
450 include_once(
"./Services/Repository/classes/class.ilRepUtil.php");
471 $header_action_class->addCustomHeaderAction(
$lg);
483 $ilLocator = $DIC[
'ilLocator'];
485 if (is_object($this->
object)) {
486 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this,
""),
"",
$this->node_id);
511 $file_tree->updateFileTree(
$_POST[
"path"]);
512 $node = $file_tree->getNodeFromPath(
$_POST[
"path"]);
516 $response->locator = $file_tree_gui->getLocatorHtml($file_tree->getNodeFromId($node->getId()));
519 $response->message =
$tpl->getMessageHTML($e->getMessage(),
"failure");
522 header(
'Content-type: application/json');
531 $ilTabs = $DIC[
'ilTabs'];
535 $file_tree->downloadFromService(
$_GET[
'id']);
537 $ilTabs->activateTab(
"content");
This class represents an option in a radio group.
asyncGetActionListContent()
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
This class provides processing control methods.
getStandardCmd()
Get standard command.
serviceAuth(ilObjCloud $object)
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
static getActionListGUIClass(ilCloudPluginService $plugin_service_class)
New implementation of ilObjectGUI.
const TITLE_LENGTH
max length of object title
static getInitGUIClass(ilCloudPluginService $plugin_service_class)
static getDeleteGUIClass(ilCloudPluginService $plugin_service_class)
static getFileTreeFromSession()
static getUploadGUIClass(ilCloudPluginService $plugin_service_class)
afterSave(ilObject $a_new_object)
Post (successful) object creation hook.
static getCreateFolderGUIClass(ilCloudPluginService $plugin_service_class)
static getFileTreeGUIClass(ilCloudPluginService $plugin_service_class, ilCloudFileTree $file_tree)
initHeaderAction($a_sub_type=null, $a_sub_id=null)
Add header action menu.
$plugin_service
ilCloudPluginService
addLocatorItems()
addLocatorItems
static encode($mixed, $suppress_native=false)
if(isset($_POST['submit'])) $form
getId()
get object id public
static getActiveServices()
initDidacticTemplate(ilPropertyFormGUI $form)
Show didactic template types.
setSize($a_size)
Set Size.
This class represents a text property in a property form.
setCols($a_cols)
Set Cols.
initCreateForm($a_new_type)
Init object creation form.
static _goto($a_target)
_goto Deep link
static checkServiceActive($name)
Class ilCloudPluginService.
initCreationForms($a_new_type)
Init creation froms.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static getPluginHookClass($service_name)
addHeaderAction()
Add header action menu.
redirectToRefId($a_ref_id, $a_cmd="")
redirects to (repository) view per ref id usually to a container and usually used at the end of a sav...
__construct($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
This class represents a text area property in a property form.
static getHeaderActionGUIClass(ilCloudPluginService $plugin_service_class)
static getServiceClass($service_name, $obj_id, $connect=true)
insertHeaderAction($a_list_gui)
Insert header action into main template.
static getInfoScreenGUIClass(ilCloudPluginService $plugin_service_class)
static getSettingsGUIClass(ilCloudPluginService $plugin_service_class)
getRefId()
get reference id public
prepareOutput($a_show_subobjects=true)
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static getCreationGUIClass(ilCloudPluginService $plugin_service_class)
infoScreenForward()
show information screen
static getItemCreationListGUIClass(ilCloudPluginService $plugin_service_class)
update()
update object in db
getServiceName()
Get service.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
static deleteObjects($a_cur_ref_id, $a_ids)
Delete objects.