ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilCloudPluginInitGUI Class Reference

Class ilCloudPluginInitGUI. More...

+ Inheritance diagram for ilCloudPluginInitGUI:
+ Collaboration diagram for ilCloudPluginInitGUI:

Public Member Functions

 setGuiClass ($gui_class)
 getGuiClass ()
 setPermCreateFolders ($perm_create_folders)
 getPermCreateFolders ()
 setPermDeleteFiles ($perm_delete_files)
 getPermDeleteFiles ()
 setPermDeleteFolders ($perm_delete_folders)
 getPermDeleteFolders ()
 setPermDownload ($perm_download)
 getPermDownload ()
 setPermFilesVisible ($perm_files_visible)
 getPermFilesVisible ()
 setPermFoldersVisible ($perm_folders_visible)
 getPermFoldersVisible ()
 setPermUploadItems ($perm_upload_items)
 getPermUploadItems ()
 setTplFileTree ($tpl_file_tree)
 getTplFileTree ()
 initGUI (ilObjCloudGUI $gui_class, $perm_create_folder, $perm_upload_items, $perm_delete_files, $perm_delete_folders, $perm_download, $perm_files_visible, $perm_folders_visible)
 addToolbar ($root_node)
 beforeInitGUI ()
 beforeSetContent ()
 afterInitGUI ()
- Public Member Functions inherited from ilCloudPluginGUI
 __construct ($plugin_service_class)
 getPluginObject ()
 getPluginHookObject ()
 getAdminConfigObject ()
 getService ()
 txt ($var="")
 executeCommand ()

Protected Attributes

 $gui_class = NULL
 $perm_upload_items = false
 $perm_create_folders = false
 $perm_delete_files = false
 $perm_delete_folders = false
 $perm_download = false
 $perm_files_visible = false
 $perm_folders_visible = false
 $tpl_file_tree = NULL
- Protected Attributes inherited from ilCloudPluginGUI
 $service = null

Detailed Description

Class ilCloudPluginInitGUI.

GUI Class for initialization of the object. Can be extended if needed.

Author
Timon Amstutz timon.nosp@m..ams.nosp@m.tutz@.nosp@m.ilub.nosp@m..unib.nosp@m.e.ch
Version
$Id$

Definition at line 16 of file class.ilCloudPluginInitGUI.php.

Member Function Documentation

ilCloudPluginInitGUI::addToolbar (   $root_node)
Parameters
$root_node

Definition at line 309 of file class.ilCloudPluginInitGUI.php.

References $ilLog, $lng, getGuiClass(), ilCloudConnector\getItemCreationListGUIClass(), ilCloudPluginFileTreeGUI\getLinkToFolder(), getPermCreateFolders(), getPermUploadItems(), ilCloudPluginGUI\getService(), and ilAdvancedSelectionListGUI\STYLE_EMPH.

Referenced by initGUI().

{
global $lng, $ilToolbar, $ilLog;
$list_gui_html = $create_list_gui->getGroupedListItemsHTML($this->getPermUploadItems(), $this->getPermCreateFolders());
if ($list_gui_html) {
//toolbar
$toolbar_locator = new ilLocatorGUI();
$toolbar_locator->addItem($this->getGuiClass()->object->getTitle(), ilCloudPluginFileTreeGUI::getLinkToFolder($root_node));
$ilToolbar->setId('xcld_toolbar');
$ilToolbar->addText("<div class='xcld_locator'>" . $toolbar_locator->getHtml() . "</div>");
$ilToolbar->addSeparator();
include_once("./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
$adv->setListTitle($lng->txt("cld_add_new_item"));
$ilCloudGroupedListGUI = $create_list_gui->getGroupedListItems($this->getPermUploadItems(), $this->getPermCreateFolders());
if ($ilCloudGroupedListGUI->hasItems()) {
$adv->setGroupedList($ilCloudGroupedListGUI);
}
$ilToolbar->addText($adv->getHTML());
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilCloudPluginInitGUI::afterInitGUI ( )

Definition at line 345 of file class.ilCloudPluginInitGUI.php.

Referenced by initGUI().

{ }

+ Here is the caller graph for this function:

ilCloudPluginInitGUI::beforeInitGUI ( )

Definition at line 339 of file class.ilCloudPluginInitGUI.php.

Referenced by initGUI().

{ }

+ Here is the caller graph for this function:

ilCloudPluginInitGUI::beforeSetContent ( )

Definition at line 342 of file class.ilCloudPluginInitGUI.php.

Referenced by initGUI().

{ }

+ Here is the caller graph for this function:

ilCloudPluginInitGUI::getGuiClass ( )
Returns

Definition at line 63 of file class.ilCloudPluginInitGUI.php.

References $gui_class.

Referenced by addToolbar(), and initGUI().

{
}

+ Here is the caller graph for this function:

ilCloudPluginInitGUI::getPermCreateFolders ( )
Returns
boolean

Definition at line 79 of file class.ilCloudPluginInitGUI.php.

References $perm_create_folders.

Referenced by addToolbar().

+ Here is the caller graph for this function:

ilCloudPluginInitGUI::getPermDeleteFiles ( )
Returns
boolean

Definition at line 95 of file class.ilCloudPluginInitGUI.php.

References $perm_delete_files.

ilCloudPluginInitGUI::getPermDeleteFolders ( )
Returns
boolean

Definition at line 111 of file class.ilCloudPluginInitGUI.php.

References $perm_delete_folders.

ilCloudPluginInitGUI::getPermDownload ( )
Returns
boolean

Definition at line 127 of file class.ilCloudPluginInitGUI.php.

References $perm_download.

{
}
ilCloudPluginInitGUI::getPermFilesVisible ( )
Returns
boolean

Definition at line 143 of file class.ilCloudPluginInitGUI.php.

References $perm_files_visible.

ilCloudPluginInitGUI::getPermFoldersVisible ( )
Returns
boolean

Definition at line 159 of file class.ilCloudPluginInitGUI.php.

References $perm_folders_visible.

ilCloudPluginInitGUI::getPermUploadItems ( )
Returns
boolean

Definition at line 175 of file class.ilCloudPluginInitGUI.php.

References $perm_upload_items.

Referenced by addToolbar().

+ Here is the caller graph for this function:

ilCloudPluginInitGUI::getTplFileTree ( )
Returns

Definition at line 191 of file class.ilCloudPluginInitGUI.php.

References $tpl_file_tree.

{
}
ilCloudPluginInitGUI::initGUI ( ilObjCloudGUI  $gui_class,
  $perm_create_folder,
  $perm_upload_items,
  $perm_delete_files,
  $perm_delete_folders,
  $perm_download,
  $perm_files_visible,
  $perm_folders_visible 
)
Parameters
ilObjCloudGUI$gui_class
$perm_create_folder
$perm_upload_items
$perm_delete_files
$perm_delete_folders
$perm_download
$perm_files_visible
$perm_folders_visible

else { $file_tree = ilCloudFileTree::getFileTreeFromSession(); if($_GET["current_path"] && $_GET["current_id"] && $file_tree && $file_tree->getId() == $this->getGUIClass()->object->getId()) { $path = $_GET["current_path"]; $id = $_GET["current_id"];

} else { $path = $gui_class->object->getRootFolder(); $id = $gui_class->object->getRootId(); ilCloudFileTree::clearFileTreeSession(); $file_tree = new ilCloudFileTree($this->getGUIClass()->object->getRootFolder(), $this->getGUIClass()->object->getRootId(), $this->getGUIClass()->object->getId(), $this->getGUIClass()->object->getServiceName()); }

$file_tree->updateFileTree($path); $file_tree_gui = ilCloudConnector::getFileTreeGUIClass($this->getService(), $file_tree); $this->content = $file_tree_gui->getFolderHtml($this->getGuiClass(), $id, $this->getPermDeleteFiles(), $this->getPermDeleteFolders(), $this->getPermDownload(), $this->getPermFilesVisible(), $this->getPermCreateFolders()); $tpl->setContent($this->content); }

Definition at line 212 of file class.ilCloudPluginInitGUI.php.

References $_POST, $lng, $perm_delete_files, $perm_delete_folders, $perm_download, $perm_files_visible, $perm_folders_visible, $perm_upload_items, $tpl, addToolbar(), afterInitGUI(), ilCloudException\AUTHENTICATION_FAILED, beforeInitGUI(), beforeSetContent(), ilCloudConnector\checkServiceActive(), getGuiClass(), ilCloudConnector\getPluginClass(), ilYuiUtil\initConnection(), ilUtil\sendFailure(), setGuiClass(), setPermCreateFolders(), setPermDeleteFiles(), setPermDeleteFolders(), setPermDownload(), setPermFilesVisible(), setPermFoldersVisible(), setPermUploadItems(), and ilCloudFileTree\storeFileTreeToSession().

{
global $ilTabs, $lng, $tpl;
$ilTabs->activateTab("content");
$this->setGuiClass($gui_class);
$this->setPermCreateFolders($perm_create_folder);
try {
ilCloudConnector::checkServiceActive($this->getGUIClass()->object->getServiceName());
$this->beforeInitGUI();
//if($this->getPluginObject()->getAsyncDrawing())
{
$tpl->addJavaScript("./Modules/Cloud/js/ilCloudFileList.js");
$tpl->addJavaScript("./Modules/Cloud/js/jquery.address.js");
$tpl->addJavascript("./Services/UIComponent/AdvancedSelectionList/js/AdvancedSelectionList.js");
$tpl->addCss("./Modules/Cloud/templates/css/cloud.css");
include_once("./Services/YUI/classes/class.ilYuiUtil.php");
$this->tpl_file_tree = new ilTemplate("tpl.cloud_file_tree.html", true, true, "Modules/Cloud");
$file_tree = new ilCloudFileTree($this->getGUIClass()->object->getRootFolder(), $this->getGUIClass()->object->getRootId(), $this->getGUIClass()->object->getId(), $this->getGUIClass()->object->getServiceName());
$file_tree->storeFileTreeToSession();
$this->addToolbar($file_tree->getRootNode());
$this->tpl_file_tree->setVariable("ASYNC_GET_BLOCK", json_encode($this->getGUIClass()->ctrl->getLinkTargetByClass("ilobjcloudgui", "asyncGetBlock", true)));
$this->tpl_file_tree->setVariable("ASYNC_CREATE_FOLDER", json_encode($this->getGUIClass()->ctrl->getLinkTargetByClass("ilcloudplugincreatefoldergui", "asyncCreateFolder", true)));
$this->tpl_file_tree->setVariable("ASYNC_UPLOAD_FILE", json_encode($this->getGUIClass()->ctrl->getLinkTargetByClass("ilcloudpluginuploadgui", "asyncUploadFile", true)));
$this->tpl_file_tree->setVariable("ASYNC_DELETE_ITEM", json_encode($this->getGUIClass()->ctrl->getLinkTargetByClass("ilcloudplugindeletegui", "asyncDeleteItem", true)));
$this->tpl_file_tree->setVariable("ROOT_ID", json_encode($file_tree->getRootNode()->getId()));
$this->tpl_file_tree->setVariable("ROOT_PATH", json_encode($file_tree->getRootNode()->getPath()));
if (isset($_POST["path"])) {
$this->tpl_file_tree->setVariable("CURRENT_PATH", json_encode($_POST["path"]));
$file_tree->updateFileTree($_POST["path"]);
$node = $file_tree->getNodeFromPath($_POST["path"]);
$this->tpl_file_tree->setVariable("CURRENT_ID", json_encode($node->getId()));
} else {
$this->tpl_file_tree->setVariable("CURRENT_PATH", json_encode($file_tree->getRootNode()->getPath()));
$this->tpl_file_tree->setVariable("CURRENT_ID", json_encode($file_tree->getRootNode()->getID()));
}
$txt_max_file_size = $lng->txt("file_notice") . " "
. ilCloudConnector::getPluginClass($this->getGUIClass()->object->getServiceName(), $this->getGUIClass()->object->getId())
->getMaxFileSize() . " MB";
$this->tpl_file_tree->setVariable("MAX_FILE_SIZE", json_encode($txt_max_file_size));
$this->beforeSetContent();
$tpl->setContent($this->tpl_file_tree->get());
$tpl->setPermanentLink("cld", $this->getGuiClass()->object->getRefId(), "_path__endPath");
}
$this->afterInitGUI();
} catch (Exception $e) {
$this->getGUIClass()->object->setAuthComplete(false);
$this->getGUIClass()->object->doUpdate();
}
ilUtil::sendFailure($e->getMessage());
}
}

+ Here is the call graph for this function:

ilCloudPluginInitGUI::setGuiClass (   $gui_class)
Parameters
\ilObjCloudGUI$gui_class

Definition at line 55 of file class.ilCloudPluginInitGUI.php.

References $gui_class.

Referenced by initGUI().

{
$this->gui_class = $gui_class;
}

+ Here is the caller graph for this function:

ilCloudPluginInitGUI::setPermCreateFolders (   $perm_create_folders)
Parameters
boolean$perm_create_folders

Definition at line 71 of file class.ilCloudPluginInitGUI.php.

References $perm_create_folders.

Referenced by initGUI().

{
$this->perm_create_folders = $perm_create_folders;
}

+ Here is the caller graph for this function:

ilCloudPluginInitGUI::setPermDeleteFiles (   $perm_delete_files)
Parameters
boolean$perm_delete_files

Definition at line 87 of file class.ilCloudPluginInitGUI.php.

References $perm_delete_files.

Referenced by initGUI().

{
$this->perm_delete_files = $perm_delete_files;
}

+ Here is the caller graph for this function:

ilCloudPluginInitGUI::setPermDeleteFolders (   $perm_delete_folders)
Parameters
boolean$perm_delete_folders

Definition at line 103 of file class.ilCloudPluginInitGUI.php.

References $perm_delete_folders.

Referenced by initGUI().

{
$this->perm_delete_folders = $perm_delete_folders;
}

+ Here is the caller graph for this function:

ilCloudPluginInitGUI::setPermDownload (   $perm_download)
Parameters
boolean$perm_download

Definition at line 119 of file class.ilCloudPluginInitGUI.php.

References $perm_download.

Referenced by initGUI().

{
$this->perm_download = $perm_download;
}

+ Here is the caller graph for this function:

ilCloudPluginInitGUI::setPermFilesVisible (   $perm_files_visible)
Parameters
boolean$perm_files_visible

Definition at line 135 of file class.ilCloudPluginInitGUI.php.

References $perm_files_visible.

Referenced by initGUI().

{
$this->perm_files_visible = $perm_files_visible;
}

+ Here is the caller graph for this function:

ilCloudPluginInitGUI::setPermFoldersVisible (   $perm_folders_visible)
Parameters
boolean$perm_folders_visible

Definition at line 151 of file class.ilCloudPluginInitGUI.php.

References $perm_folders_visible.

Referenced by initGUI().

{
$this->perm_folders_visible = $perm_folders_visible;
}

+ Here is the caller graph for this function:

ilCloudPluginInitGUI::setPermUploadItems (   $perm_upload_items)
Parameters
boolean$perm_upload_items

Definition at line 167 of file class.ilCloudPluginInitGUI.php.

References $perm_upload_items.

Referenced by initGUI().

{
$this->perm_upload_items = $perm_upload_items;
}

+ Here is the caller graph for this function:

ilCloudPluginInitGUI::setTplFileTree (   $tpl_file_tree)
Parameters
\ilTemplate$tpl_file_tree

Definition at line 183 of file class.ilCloudPluginInitGUI.php.

References $tpl_file_tree.

{
$this->tpl_file_tree = $tpl_file_tree;
}

Field Documentation

ilCloudPluginInitGUI::$gui_class = NULL
protected

Definition at line 21 of file class.ilCloudPluginInitGUI.php.

Referenced by getGuiClass(), and setGuiClass().

ilCloudPluginInitGUI::$perm_create_folders = false
protected

Definition at line 29 of file class.ilCloudPluginInitGUI.php.

Referenced by getPermCreateFolders(), and setPermCreateFolders().

ilCloudPluginInitGUI::$perm_delete_files = false
protected

Definition at line 33 of file class.ilCloudPluginInitGUI.php.

Referenced by getPermDeleteFiles(), initGUI(), and setPermDeleteFiles().

ilCloudPluginInitGUI::$perm_delete_folders = false
protected
ilCloudPluginInitGUI::$perm_download = false
protected

Definition at line 41 of file class.ilCloudPluginInitGUI.php.

Referenced by getPermDownload(), initGUI(), and setPermDownload().

ilCloudPluginInitGUI::$perm_files_visible = false
protected
ilCloudPluginInitGUI::$perm_folders_visible = false
protected
ilCloudPluginInitGUI::$perm_upload_items = false
protected

Definition at line 25 of file class.ilCloudPluginInitGUI.php.

Referenced by getPermUploadItems(), initGUI(), and setPermUploadItems().

ilCloudPluginInitGUI::$tpl_file_tree = NULL
protected

Definition at line 199 of file class.ilCloudPluginInitGUI.php.

Referenced by getTplFileTree(), and setTplFileTree().


The documentation for this class was generated from the following file: