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)
212 $content = explode(
"_", $a_target);
214 $_GET[
"ref_id"] = $content[0];
215 $_GET[
"baseClass"] =
"ilrepositorygUI";
216 $_GET[
"cmdClass"] =
"ilobjcloudgui";
217 $_GET[
"cmd"] =
"render";
219 if (in_array(
"path", $content)) {
225 $_POST[
"path"] = implode(
'_', $content);
229 include(
"ilias.php");
242 $ilTabs = $DIC[
'ilTabs'];
244 $ilAccess = $DIC[
'ilAccess'];
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"));
254 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
255 $ilTabs->addTab(
"settings",
$lng->txt(
"settings"),
$ilCtrl->getLinkTargetByClass(
"ilcloudpluginsettingsgui",
"editSettings"));
259 if ($ilAccess->checkAccess(
'edit_permission',
"", $this->object->getRefId())) {
260 $ilTabs->addTab(
"id_permissions",
$lng->txt(
"perm_settings"), $this->ctrl->getLinkTargetByClass(
"ilpermissiongui",
"perm"));
289 $ilTabs = $DIC[
'ilTabs'];
292 $ilTabs->activateTab(
"id_info");
295 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"));
299 $info = $plugin_info->getInfoScreen($this);
300 $this->ctrl->forwardCommand(
$info);
335 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
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"));
346 $ti->setRequired(
true);
360 $option->setTitle($hook_object->txt($service));
361 $option->setInfo($hook_object->txt(
"create_info"));
365 $init_gui->initPluginCreationFormSection($option);
367 $services_group->addOption($option);
371 $services_group->setValue(array_shift($services_group->getOptions())->getValue());
373 $form->addItem($services_group);
377 $form->addCommandButton(
"save", $this->lng->txt($a_new_type .
"_add"));
378 $form->addCommandButton(
"cancel", $this->lng->txt(
"cancel"));
394 $this->ctrl->setParameter($this,
'ref_id', $this->tree->getParentId($a_new_object->
getRefId()));
396 $this->ctrl->setParameter($this,
'ref_id', $a_new_object->
getRefId());
398 if (
$form->checkInput()) {
399 $a_new_object->setServiceName(
$form->getInput(
"service"));
400 $a_new_object->setRootFolder(
"/");
401 $a_new_object->setOnline(
false);
402 $a_new_object->setAuthComplete(
false);
406 $init_gui->afterSavePluginCreation($a_new_object,
$form);
409 $this->ctrl->setParameter($this,
'new_type',
'');
414 $form->setValuesByPost();
415 $this->tpl->setContent(
$form->getHTML());
429 $service->authService(
$ilCtrl->getLinkTarget($this,
"afterServiceAuth") .
"&authMode=true");
444 if ($this->plugin_service->afterAuthService()) {
445 $this->
object->setRootId(
"root",
true);
446 $this->
object->setAuthComplete(
true);
447 $this->
object->update();
449 $ilCtrl->redirectByClass(
"ilCloudPluginSettingsGUI",
"editSettings");
451 include_once(
"./Services/Repository/classes/class.ilRepUtil.php");
472 $header_action_class->addCustomHeaderAction(
$lg);
484 $ilLocator = $DIC[
'ilLocator'];
486 if (is_object($this->
object)) {
487 $ilLocator->addItem($this->
object->getTitle(), $this->ctrl->getLinkTarget($this,
""),
"",
$this->node_id);
512 $file_tree->updateFileTree(
$_POST[
"path"]);
513 $node = $file_tree->getNodeFromPath(
$_POST[
"path"]);
517 $response->locator = $file_tree_gui->getLocatorHtml($file_tree->getNodeFromId($node->getId()));
520 $response->message =
$tpl->getMessageHTML($e->getMessage(),
"failure");
523 header(
'Content-type: application/json');
532 $ilTabs = $DIC[
'ilTabs'];
536 $file_tree->downloadFromService(
$_GET[
'id']);
538 $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()
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)
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)
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.