4include_once(
"./Services/Object/classes/class.ilObject2GUI.php");
 
    5include_once(
"./Services/JSON/classes/class.ilJsonUtil.php");
 
    6include_once(
"class.ilCloudPluginFileTreeGUI.php");
 
    7include_once(
"class.ilCloudFileTree.php");
 
    8include_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");
 
   73                } 
catch (Exception $e) {
 
   78                if ($this->
object != 
null) {
 
   79                        $ilNavigationHistory->addItem($this->object->getRefId(), $link, 
"cld");
 
   83                        } 
catch (Exception $e) {
 
   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);
 
  327                $services_group->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);
 
  379                } 
catch (Exception $e) {
 
  394                        $service->authService(
$ilCtrl->getLinkTarget($this, 
"afterServiceAuth") . 
"&authMode=true");
 
  395                } 
catch (Exception $e) {
 
  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");
 
  421                } 
catch (Exception $e) {
 
  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"]);
 
  475                        $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"));
 
  477                        $response->locator = $file_tree_gui->getLocatorHtml($file_tree->getNodeFromId($node->getId()));
 
  478                        $response->success = 
true;
 
  479                } 
catch (Exception $e) {
 
  480                        $response->message = 
$tpl->getMessageHTML($e->getMessage(), 
"failure");
 
  483                header(
'Content-type: application/json');
 
  491                $ilTabs = 
$DIC[
'ilTabs'];
 
  495                                $file_tree->downloadFromService(
$_GET[
'id']);
 
  496                        } 
catch (Exception $e) {
 
  497                                $ilTabs->activateTab(
"content");
 
An exception for terminatinating execution or to throw for unit testing.
static getHeaderActionGUIClass(ilCloudPluginService $plugin_service_class)
static getActiveServices()
static checkServiceActive($name)
static getInfoScreenGUIClass(ilCloudPluginService $plugin_service_class)
static getCreationGUIClass(ilCloudPluginService $plugin_service_class)
static getServiceClass($service_name, $obj_id, $connect=true)
static getInitGUIClass(ilCloudPluginService $plugin_service_class)
static getFileTreeGUIClass(ilCloudPluginService $plugin_service_class, ilCloudFileTree $file_tree)
static getCreateFolderGUIClass(ilCloudPluginService $plugin_service_class)
static getActionListGUIClass(ilCloudPluginService $plugin_service_class)
static getPluginHookClass($service_name)
static getUploadGUIClass(ilCloudPluginService $plugin_service_class)
static getItemCreationListGUIClass(ilCloudPluginService $plugin_service_class)
static getSettingsGUIClass(ilCloudPluginService $plugin_service_class)
static getDeleteGUIClass(ilCloudPluginService $plugin_service_class)
static getFileTreeFromSession()
Class ilCloudPluginService.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
This class provides processing control methods.
static encode($mixed, $suppress_native=false)
addHeaderAction()
Add header action menu.
$plugin_service
ilCloudPluginService
setTabs()
create tabs (repository/workspace switch)
infoScreenForward()
show information screen
serviceAuth(ilObjCloud $object)
static _goto($a_target)
_goto Deep link
initCreateForm($a_new_type)
Init object creation form.
getStandardCmd()
Get standard command.
addLocatorItems()
addLocatorItems
initCreationForms($a_new_type)
Init creation froms.
__construct($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
asyncGetActionListContent()
New implementation of ilObjectGUI.
prepareOutput($a_show_subobjects=true)
prepare output
initHeaderAction($a_sub_type=null, $a_sub_id=null)
Add header action menu.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
insertHeaderAction($a_list_gui)
Insert header action into main template.
afterSave(ilObject $a_new_object)
Post (successful) object creation hook.
initDidacticTemplate(ilPropertyFormGUI $form)
Show didactic template types.
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...
Class ilObject Basic functions for all objects.
const TITLE_LENGTH
max length of object title
update()
update object in db
getId()
get object id @access public
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
This class represents an option in a radio group.
static deleteObjects($a_cur_ref_id, $a_ids)
Delete objects.
This class represents a text area property in a property form.
This class represents a text property in a property form.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.