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");
40 public function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0) {
44 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
45 $lng->loadLanguageModule(
"cld");
64 $ilTabs = $DIC[
'ilTabs'];
65 $ilNavigationHistory = $DIC[
'ilNavigationHistory'];
69 $link =
$ilCtrl->getLinkTarget($this,
"render");
78 if ($this->
object != null) {
79 $ilNavigationHistory->addItem($this->
object->getRefId(), $link,
"cld");
88 if ($this->
object->getAuthComplete() ==
false && !
$_GET[
"authMode"]) {
99 $next_class =
$ilCtrl->getNextClass($this);
103 case "editSettings" :
104 $next_class =
"ilcloudpluginsettingsgui";
106 case "afterServiceAuth" :
116 switch ($next_class) {
117 case "ilinfoscreengui":
121 case "ilcommonactiondispatchergui":
122 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
124 $this->ctrl->forwardCommand($gui);
126 case "ilpermissiongui":
128 $ilTabs->activateTab(
"id_permissions");
129 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
131 $this->ctrl->forwardCommand($perm_gui);
133 case "ilcloudpluginuploadgui":
136 $this->ctrl->forwardCommand($upload_gui);
139 case "ilcloudplugincreatefoldergui":
142 $this->ctrl->forwardCommand($folder_gui);
145 case "ilcloudplugindeletegui":
148 $this->ctrl->forwardCommand($delete_gui);
151 case "ilcloudpluginsettingsgui":
155 $settings_gui->setCloudObject($this->
object);
156 $this->ctrl->forwardCommand($settings_gui);
159 case "ilcloudpluginactionlistgui":
161 $this->ctrl->forwardCommand($action_list_gui);
163 case "ilcloudpluginitemcreationlistgui":
165 $this->ctrl->forwardCommand($item_creation_gui);
167 case "ilcloudpluginfiletreegui":
169 $this->ctrl->forwardCommand($file_tree_gui);
171 case "ilcloudpluginheaderactiongui":
173 $this->ctrl->forwardCommand($header_action_gui);
175 case "ilcloudplugininitgui":
177 $this->ctrl->forwardCommand($init_gui);
180 return parent::executeCommand();
201 public static function _goto($a_target) {
202 $content = explode(
"_", $a_target);
203 $_GET[
"ref_id"] = $content[0];
204 $_POST[
"path"] = $content[2];
205 $_GET[
"baseClass"] =
"ilrepositorygUI";
206 $_GET[
"cmdClass"] =
"ilobjcloudgui";
207 $_GET[
"cmd"] =
"render";
208 include(
"ilias.php");
219 $ilTabs = $DIC[
'ilTabs'];
221 $ilAccess = $DIC[
'ilAccess'];
225 if ($ilAccess->checkAccess(
"read",
"", $this->object->getRefId())) {
226 $ilTabs->addTab(
"content",
$lng->txt(
"content"),
$ilCtrl->getLinkTarget($this,
"render"));
227 $ilTabs->addTab(
"id_info",
$lng->txt(
"info_short"), $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary"));
231 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
232 $ilTabs->addTab(
"settings",
$lng->txt(
"settings"),
$ilCtrl->getLinkTargetByClass(
"ilcloudpluginsettingsgui",
"editSettings"));
236 if ($ilAccess->checkAccess(
'edit_permission',
"", $this->object->getRefId())) {
237 $ilTabs->addTab(
"id_permissions",
$lng->txt(
"perm_settings"), $this->ctrl->getLinkTargetByClass(
"ilpermissiongui",
"perm"));
263 $ilTabs = $DIC[
'ilTabs'];
266 $ilTabs->activateTab(
"id_info");
269 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"));
273 $info = $plugin_info->getInfoScreen($this);
274 $this->ctrl->forwardCommand(
$info);
307 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
309 $form->setTarget(
"_top");
310 $form->setFormAction($this->ctrl->getFormAction($this,
"save"));
311 $form->setTitle($this->lng->txt($a_new_type .
"_new"));
317 $ti->setRequired(
true);
331 $option->setTitle($hook_object->txt($service));
332 $option->setInfo($hook_object->txt(
"create_info"));
336 $init_gui->initPluginCreationFormSection($option);
338 $services_group->addOption($option);
342 $services_group->setValue(array_shift($services_group->getOptions())->getValue());
344 $form->addItem($services_group);
348 $form->addCommandButton(
"save", $this->lng->txt($a_new_type .
"_add"));
349 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
366 if ($form->checkInput()) {
367 $a_new_object->setServiceName($form->getInput(
"service"));
368 $a_new_object->setRootFolder(
"/");
369 $a_new_object->setOnline(
false);
370 $a_new_object->setAuthComplete(
false);
374 $init_gui->afterSavePluginCreation($a_new_object, $form);
394 $service->authService(
$ilCtrl->getLinkTarget($this,
"afterServiceAuth") .
"&authMode=true");
408 if ($this->plugin_service->afterAuthService()) {
409 $this->
object->setRootId(
"root",
true);
410 $this->
object->setAuthComplete(
true);
411 $this->
object->update();
413 $ilCtrl->redirectByClass(
"ilCloudPluginSettingsGUI",
"editSettings");
415 include_once(
"./Services/Repository/classes/class.ilRepUtil.php");
435 $header_action_class->addCustomHeaderAction(
$lg);
446 $ilLocator = $DIC[
'ilLocator'];
448 if (is_object($this->
object)) {
449 $ilLocator->addItem($this->
object->getTitle(), $this->ctrl->getLinkTarget($this,
""),
"",
$this->node_id);
464 $response =
new stdClass();
465 $response->message = null;
466 $response->locator = null;
467 $response->content = null;
468 $response->success = null;
472 $file_tree->updateFileTree(
$_POST[
"path"]);
473 $node = $file_tree->getNodeFromPath(
$_POST[
"path"]);
477 $response->locator = $file_tree_gui->getLocatorHtml($file_tree->getNodeFromId($node->getId()));
478 $response->success =
true;
480 $response->message =
$tpl->getMessageHTML($e->getMessage(),
"failure");
483 header(
'Content-type: application/json');
491 $ilTabs = $DIC[
'ilTabs'];
495 $file_tree->downloadFromService(
$_GET[
'id']);
497 $ilTabs->activateTab(
"content");
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
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()
Class ilObject Basic functions for all objects.
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)
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)
Add a drawing to the header
Class ilCloudPluginService.
Create styles array
The data for the language used.
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...
Create new PHPExcel object
obj_idprivate
__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)
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.