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");
 
   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");
 
   77        } 
catch (Exception $e) {
 
   82        if ($this->
object != 
null) {
 
   83            $ilNavigationHistory->addItem($this->object->getRefId(), $link, 
"cld");
 
   87            } 
catch (Exception $e) {
 
   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);
 
  355        $services_group->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', 
'');
 
  411        } 
catch (Exception $e) {
 
  413            $form->setValuesByPost();
 
  414            $this->tpl->setContent(
$form->getHTML());
 
  428            $service->authService(
$ilCtrl->getLinkTarget($this, 
"afterServiceAuth") . 
"&authMode=true");
 
  429        } 
catch (Exception $e) {
 
  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");
 
  456        } 
catch (Exception $e) {
 
  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"]);
 
  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"));
 
  516            $response->locator = $file_tree_gui->getLocatorHtml($file_tree->getNodeFromId($node->getId()));
 
  518        } 
catch (Exception $e) {
 
  519            $response->message = 
$tpl->getMessageHTML($e->getMessage(), 
"failure");
 
  522        header(
'Content-type: application/json');
 
  531        $ilTabs = 
$DIC[
'ilTabs'];
 
  535                $file_tree->downloadFromService(
$_GET[
'id']);
 
  536            } 
catch (Exception $e) {
 
  537                $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
getRefId()
get reference id @access public
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 sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
if(isset($_POST['submit'])) $form