ILIAS  release_8 Revision v8.24
ilObjWorkspaceFolderGUI Class Reference

Class ilObjWorkspaceFolderGUI. More...

+ Inheritance diagram for ilObjWorkspaceFolderGUI:
+ Collaboration diagram for ilObjWorkspaceFolderGUI:

Public Member Functions

 __construct ($a_id=0, $a_id_type=self::REPOSITORY_NODE_ID, $a_parent_node_id=0)
 
 getType ()
 Functions that must be overwritten. More...
 
 isActiveAdministrationPanel ()
 
 setAdministrationPanel (bool $active)
 
 executeCommand ()
 execute command More...
 
 render ()
 
 edit ()
 
 update ()
 
 cut ()
 
 cut_for_repository ()
 
 cut_for_workspace ()
 
 copy ()
 
 copyShared ()
 
 copy_to_repository ()
 
 copy_to_workspace ()
 
 showMoveIntoObjectTree (bool $repo_switch_allowed=false)
 
 performPasteIntoMultipleObjects ()
 
 shareFilter ()
 
 share (bool $a_load_data=true)
 
 applyShareFilter ()
 
 resetShareFilter ()
 
 listSharedResourcesOfOtherUser ()
 
 cancelDeletion ()
 
 showAdministrationPanel ()
 
 download ()
 
 getBucketTitle ()
 
- Public Member Functions inherited from ilObject2GUI
 __construct (int $id=0, int $id_type=self::REPOSITORY_NODE_ID, int $parent_node_id=0)
 
 executeCommand ()
 execute command More...
 
 getIdType ()
 
 delete ()
 Display delete confirmation form (repository/workspace switch) More...
 
 confirmedDelete ()
 Delete objects (repository/workspace switch) More...
 
 getHTML ()
 
 withReferences ()
 Final/Private declaration of unchanged parent methods. More...
 
 setCreationMode (bool $mode=true)
 if true, a creation screen is displayed the current [ref_id] don't belong to the current class! The mode is determined in ilRepositoryGUI More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 isVisible (int $ref_id, string $type)
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 cancelDelete ()
 
 view ()
 view object content (repository/workspace switch) More...
 
 getType ()
 Functions that must be overwritten. More...
 
 create ()
 CRUD. More...
 
 save ()
 
 edit ()
 
 update ()
 
 cancel ()
 
 importFile ()
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
- Public Member Functions inherited from ilObjectGUI
 __construct ($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
 
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 if true, a creation screen is displayed the current [ref_id] don't belong to the current class! The mode is determined in ilRepositoryGUI More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html Should be overwritten and redirect to settings screen. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Static Public Member Functions

static _goto (string $a_target)
 
- Static Public Member Functions inherited from ilObject2GUI
static handleAfterSaveCallback (ilObject $obj, ?int $callback_ref_id)
 After creation callback. More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 

Protected Member Functions

 setTabs (bool $a_show_settings=true)
 
 addContentSubTabs (bool $a_show_settings)
 
 enableAdminPanel ()
 
 disableAdminPanel ()
 
 initCreationForms ($a_new_type)
 
 passwordForm (int $a_node_id, ?ilPropertyFormGUI $form=null)
 
 initPasswordForm (int $a_node_id)
 
 checkPassword ()
 
 deleteConfirmation ()
 
 setSortation ()
 Set sortation. More...
 
- Protected Member Functions inherited from ilObject2GUI
 afterConstructor ()
 Do anything that should be done after constructor in here. More...
 
 assignObject ()
 create object instance as internal property (repository/workspace switch) More...
 
 getAccessHandler ()
 
 setLocator ()
 set Locator More...
 
 deleteConfirmedObjects ()
 Delete objects (workspace specific) This should probably be moved elsewhere as done with RepUtil. More...
 
 setTitleAndDescription ()
 
 omitLocator (bool $omit=true)
 
 getTargetFrame (string $cmd, string $target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", int $ref_id=null)
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 redirectToRefId (int $ref_id, string $cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current ["ref_id"] value of the request More...
 
 fillCloneTemplate (?string $tpl_varname, string $type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 setTabs ()
 create tabs (repository/workspace switch) More...
 
 getReturnLocation (string $cmd, string $location="")
 Deprecated functions. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 showActions ()
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 addLocatorItems ()
 Functions to be overwritten. More...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $node_id=null)
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 redrawHeaderAction ()
 Updating icons after ajax call. More...
 
 getPermanentLinkWidget (string $append=null, bool $center=false)
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 getCreationFormsHTML (array $forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm (string $new_type)
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm (string $new_type)
 
 importFileObject (int $parent_id=null)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current ["ref_id"] value of the request More...
 
 fillCloneTemplate (?string $tpl_name, string $type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 showCustomIconsEditing ( $input_colspan=1, ilPropertyFormGUI $form=null, $as_section=true)
 show edit section of custom icons for container More...
 

Protected Attributes

ilHelpGUI $help
 
ilTabsGUI $tabs
 
ILIAS DI UIServices $ui
 
ilWorkspaceFolderUserSettings $user_folder_settings
 
int $requested_sortation
 
ilLogger $wsp_log
 
StandardGUIRequest $std_request
 
WorkspaceSessionRepository $session_repo
 
- Protected Attributes inherited from ilObject2GUI
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilCtrl $ctrl
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ilObjectService $object_service
 
ilFavouritesManager $favourites
 
ilErrorHandling $error
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilToolbarGUI $toolbar
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
int $request_ref_id
 
int $id_type
 
int $parent_id
 
string $type
 
string $html
 
int $object_id
 
int $node_id = null
 
array $creation_forms = array()
 
 $access_handler
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Additional Inherited Members

- Data Fields inherited from ilObject2GUI
const OBJECT_ID = 0
 
const REPOSITORY_NODE_ID = 1
 
const WORKSPACE_NODE_ID = 2
 
const REPOSITORY_OBJECT_ID = 3
 
const WORKSPACE_OBJECT_ID = 4
 
const PORTFOLIO_OBJECT_ID = 5
 
- Data Fields inherited from ilObjectGUI
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjWorkspaceFolderGUI::__construct (   $a_id = 0,
  $a_id_type = self::REPOSITORY_NODE_ID,
  $a_parent_node_id = 0 
)

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

42 {
43 global $DIC;
44 parent::__construct($a_id, $a_id_type, $a_parent_node_id);
45
46 $this->lng = $DIC->language();
47 $this->help = $DIC["ilHelp"];
48 $this->tpl = $DIC->ui()->mainTemplate();
49 $this->user = $DIC->user();
50 $this->tabs = $DIC->tabs();
51 $this->ctrl = $DIC->ctrl();
52 $this->ui = $DIC->ui();
53 $this->session_repo = new WorkspaceSessionRepository();
54
55 $this->std_request = new StandardGUIRequest(
56 $DIC->http(),
57 $DIC->refinery()
58 );
59
60 $this->wsp_log = ilLoggerFactory::getLogger("pwsp");
61
62 $this->user_folder_settings = new ilWorkspaceFolderUserSettings(
63 $this->user->getId(),
65 );
66
67 $this->requested_sortation = $this->std_request->getSortation();
68
69 $this->lng->loadLanguageModule("cntr");
70 }
static getLogger(string $a_component_id)
Get component logger.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\ctrl(), ilLoggerFactory\getLogger(), ILIAS\Repository\help(), ILIAS\Repository\lng(), ILIAS\Repository\tabs(), ILIAS\Repository\ui(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjWorkspaceFolderGUI::_goto ( string  $a_target)
static

Definition at line 777 of file class.ilObjWorkspaceFolderGUI.php.

777 : void
778 {
779 global $DIC;
780 $ctrl = $DIC->ctrl();
781 $id = explode("_", $a_target);
783 "ilsharedresourceGUI",
784 "wsp_id",
785 $id[0]
786 );
787 $ctrl->redirectByClass("ilsharedresourceGUI");
788 }
redirectByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
@inheritDoc
setParameterByClass(string $a_class, string $a_parameter, $a_value)
@inheritDoc

References ilObject2GUI\$ctrl, $DIC, ilObjectGUI\$id, ilCtrl\redirectByClass(), and ilCtrl\setParameterByClass().

+ Here is the call graph for this function:

◆ addContentSubTabs()

ilObjWorkspaceFolderGUI::addContentSubTabs ( bool  $a_show_settings)
protected

Definition at line 130 of file class.ilObjWorkspaceFolderGUI.php.

130 : void
131 {
135
136 if ($this->checkPermissionBool("read")) {
137 $tabs->addSubTab("content", $lng->txt("view"), $ctrl->getLinkTarget($this, "disableAdminPanel"));
138 $tabs->addSubTab("manage", $lng->txt("cntr_manage"), $ctrl->getLinkTarget($this, "enableAdminPanel"));
139 }
140
141 if ($this->checkPermissionBool("write") && $a_show_settings) {
142 $this->tabs_gui->addSubTab(
143 "settings",
144 $lng->txt("settings"),
145 $this->ctrl->getLinkTarget($this, "edit")
146 );
147 }
148
149 if ($this->isActiveAdministrationPanel()) {
150 $tabs->activateSubTab("manage");
151 } else {
152 $tabs->activateSubTab("content");
153 }
154 }
getLinkTarget(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
@inheritDoc
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
activateSubTab(string $a_id)
addSubTab(string $a_id, string $a_text, string $a_link, string $a_frame="")

References ilObject2GUI\$ctrl, ilObject2GUI\$lng, $tabs, ilTabsGUI\activateSubTab(), ilTabsGUI\addSubTab(), ilObject2GUI\checkPermissionBool(), ilCtrl\getLinkTarget(), isActiveAdministrationPanel(), and ilLanguage\txt().

Referenced by setTabs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ applyShareFilter()

ilObjWorkspaceFolderGUI::applyShareFilter ( )

Definition at line 681 of file class.ilObjWorkspaceFolderGUI.php.

681 : void
682 {
683 $tbl = new ilWorkspaceShareTableGUI($this, "share", $this->getAccessHandler(), $this->node_id);
684 $tbl->resetOffset();
685 $tbl->writeFilterToSession();
686
687 $this->share();
688 }
Workspace share handler table GUI class.

References ilObject2GUI\getAccessHandler(), and share().

+ Here is the call graph for this function:

◆ cancelDeletion()

ilObjWorkspaceFolderGUI::cancelDeletion ( )

Definition at line 852 of file class.ilObjWorkspaceFolderGUI.php.

853 {
854 $this->session_repo->clearClipboard();
855 parent::cancelDelete();
856 }

◆ checkPassword()

ilObjWorkspaceFolderGUI::checkPassword ( )
protected

Definition at line 746 of file class.ilObjWorkspaceFolderGUI.php.

746 : void
747 {
749
750 $ids = $this->std_request->getItemIds();
751 if (count($ids) != 1) {
752 $this->ctrl->redirect($this, "share");
753 }
754 $node_id = current($ids);
755
756 $form = $this->initPasswordForm($node_id);
757 if ($form->checkInput()) {
759 $input = md5($form->getInput("password"));
760 if ($input == $password) {
761 // we save password and start over
763
764 $this->ctrl->setParameter($this, "item_ref_id", $node_id);
765 $this->ctrl->redirect($this, "copyShared");
766 } else {
767 $item = $form->getItemByPostVar("password");
768 $item->setAlert($lng->txt("wsp_invalid_password"));
769 $this->tpl->setOnScreenMessage('failure', $lng->txt("form_input_not_valid"));
770 }
771 }
772
773 $form->setValuesByPost();
774 $this->passwordForm($node_id, $form);
775 }
passwordForm(int $a_node_id, ?ilPropertyFormGUI $form=null)
static getSharedNodePassword(int $a_node_id)
static keepSharedSessionPassword(int $a_node_id, string $a_password)

References ilObject2GUI\$lng, ilObject2GUI\$node_id, ILIAS\Repository\ctrl(), ilWorkspaceAccessHandler\getSharedNodePassword(), initPasswordForm(), ilWorkspaceAccessHandler\keepSharedSessionPassword(), passwordForm(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ copy()

ilObjWorkspaceFolderGUI::copy ( )

Definition at line 321 of file class.ilObjWorkspaceFolderGUI.php.

321 : void
322 {
324
325 $item_ids = $this->std_request->getItemIds();
326 if (count($item_ids) == 0) {
327 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
328 $this->ctrl->redirect($this);
329 }
330
331 // on cancel or fail we return to parent node
332 $this->ctrl->setParameter($this, "wsp_id", $this->node_id);
333
334 $repo_switch_allowed = true;
335 foreach ($item_ids as $item_id) {
336 $node = $this->tree->getNodeData($item_id);
337 if (ilObject::_lookupType($node["obj_id"]) != "file") {
338 $repo_switch_allowed = false;
339 }
340 $current_node = $item_id;
341 $owner = $this->tree->lookupOwner($current_node);
342 if ($owner != $ilUser->getId()) {
343 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('permission_denied'), true);
344 $this->ctrl->redirect($this);
345 }
346 }
347
348 // remember source node
349 $this->session_repo->setClipboardSourceIds($item_ids);
350 $this->session_repo->setClipboardCmd('copy');
351
352 $this->showMoveIntoObjectTree($repo_switch_allowed);
353 }
showMoveIntoObjectTree(bool $repo_switch_allowed=false)
static _lookupType(int $id, bool $reference=false)
$ilUser
Definition: imgupload.php:34

References $ilUser, ilObject2GUI\$user, ilObject\_lookupType(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and showMoveIntoObjectTree().

Referenced by copy_to_repository(), and copy_to_workspace().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ copy_to_repository()

ilObjWorkspaceFolderGUI::copy_to_repository ( )

Definition at line 384 of file class.ilObjWorkspaceFolderGUI.php.

384 : void
385 {
386 $this->session_repo->setClipboardWsp2Repo(true);
387 $this->copy();
388 }

References copy().

+ Here is the call graph for this function:

◆ copy_to_workspace()

ilObjWorkspaceFolderGUI::copy_to_workspace ( )

Definition at line 390 of file class.ilObjWorkspaceFolderGUI.php.

390 : void
391 {
392 $this->session_repo->setClipboardWsp2Repo(false);
393 $this->copy();
394 }

References copy().

+ Here is the call graph for this function:

◆ copyShared()

ilObjWorkspaceFolderGUI::copyShared ( )

Definition at line 355 of file class.ilObjWorkspaceFolderGUI.php.

355 : void
356 {
357 $ids = $this->std_request->getItemIds();
358 if (count($ids) != 1) {
359 $this->ctrl->redirect($this, "share");
360 }
361
362 $current_node = current($ids);
363 $handler = $this->getAccessHandler();
364 // see ilSharedRessourceGUI::hasAccess()
365 if ($handler->checkAccess("read", "", $current_node)) {
366 // remember source node
367 $this->session_repo->setClipboardSourceIds([$current_node]);
368 $this->session_repo->setClipboardCmd('copy');
369 $this->session_repo->setClipboardShared(true);
370 $this->showMoveIntoObjectTree();
371 return;
372 } else {
373 $perms = $handler->getPermissions($current_node);
374 if (in_array(ilWorkspaceAccessGUI::PERMISSION_ALL_PASSWORD, $perms)) {
375 $this->passwordForm($current_node);
376 return;
377 }
378 }
379
380 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('permission_denied'), true);
381 $this->ctrl->redirect($this, "share");
382 }

References ILIAS\Repository\ctrl(), ilObject2GUI\getAccessHandler(), ILIAS\Repository\lng(), passwordForm(), ilWorkspaceAccessGUI\PERMISSION_ALL_PASSWORD, and showMoveIntoObjectTree().

+ Here is the call graph for this function:

◆ cut()

ilObjWorkspaceFolderGUI::cut ( )

Definition at line 274 of file class.ilObjWorkspaceFolderGUI.php.

274 : void
275 {
276 $item_ids = $this->std_request->getItemIds();
277 if (count($item_ids) == 0) {
278 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
279 $this->ctrl->redirect($this);
280 }
281
282 // check permission
283 $no_cut = array();
284 $repo_switch_allowed = true;
285 foreach ($item_ids as $item_id) {
286 foreach ($this->tree->getSubTree($this->tree->getNodeData($item_id)) as $node) {
287 if (ilObject::_lookupType($node["obj_id"]) != "file") {
288 $repo_switch_allowed = false;
289 }
290 if (!$this->checkPermissionBool("delete", "", "", $node["wsp_id"])) {
291 $obj = ilObjectFactory::getInstanceByObjId($node["obj_id"]);
292 $no_cut[$node["wsp_id"]] = $obj->getTitle();
293 unset($obj);
294 }
295 }
296 }
297 if (count($no_cut)) {
298 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("msg_no_perm_cut") . " " . implode(',', $no_cut), true);
299 $this->ctrl->redirect($this);
300 }
301
302 // remember source node
303 $this->session_repo->setClipboardSourceIds($item_ids);
304 $this->session_repo->setClipboardCmd('cut');
305
306 $this->showMoveIntoObjectTree($repo_switch_allowed);
307 }
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id

References ilObject\_lookupType(), ilObject2GUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ilObjectFactory\getInstanceByObjId(), ILIAS\Repository\lng(), and showMoveIntoObjectTree().

Referenced by cut_for_repository(), and cut_for_workspace().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cut_for_repository()

ilObjWorkspaceFolderGUI::cut_for_repository ( )

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

309 : void
310 {
311 $this->session_repo->setClipboardWsp2Repo(true);
312 $this->cut();
313 }

References cut().

+ Here is the call graph for this function:

◆ cut_for_workspace()

ilObjWorkspaceFolderGUI::cut_for_workspace ( )

Definition at line 315 of file class.ilObjWorkspaceFolderGUI.php.

315 : void
316 {
317 $this->session_repo->setClipboardWsp2Repo(false);
318 $this->cut();
319 }

References cut().

+ Here is the call graph for this function:

◆ deleteConfirmation()

ilObjWorkspaceFolderGUI::deleteConfirmation ( )
protected

Definition at line 799 of file class.ilObjWorkspaceFolderGUI.php.

799 : void
800 {
801 global $DIC;
802
803 $tpl = $DIC["tpl"];
804 $lng = $DIC["lng"];
805
806 $item_ids = $this->std_request->getItemIds();
807
808 if (count($item_ids) == 0) {
809 $this->tpl->setOnScreenMessage('failure', $lng->txt("no_checkbox"), true);
810 $this->ctrl->redirect($this, "");
811 }
812
813 // on cancel or fail we return to parent node
814 //$parent_node = $this->tree->getParentId($node_id);
815 //$this->ctrl->setParameter($this, "wsp_id", $parent_node);
816
817 $cgui = new ilConfirmationGUI();
818 $cgui->setHeaderText($lng->txt("info_delete_sure") . "<br/>" .
819 $lng->txt("info_delete_warning_no_trash"));
820
821 $cgui->setFormAction($this->ctrl->getFormAction($this));
822 $cgui->setCancel($lng->txt("cancel"), "cancelDeletion");
823 $cgui->setConfirm($lng->txt("confirm"), "confirmedDelete");
824
825 foreach ($item_ids as $node_id) {
826 $children = $this->tree->getSubTree($this->tree->getNodeData($node_id));
827 foreach ($children as $child) {
828 $node_id = $child["wsp_id"];
829 $obj_id = $this->tree->lookupObjectId($node_id);
831 $title = call_user_func(array(ilObjectFactory::getClassByType($type),'_lookupTitle'), $obj_id);
832
833 // if anything fails, abort the whole process
834 if (!$this->checkPermissionBool("delete", "", "", $node_id)) {
835 $this->tpl->setOnScreenMessage('failure', $lng->txt("msg_no_perm_delete") . " " . $title, true);
836 $this->ctrl->redirect($this);
837 }
838
839 $cgui->addItem(
840 "id[]",
841 $node_id,
842 $title,
844 $lng->txt("icon") . " " . $lng->txt("obj_" . $type)
845 );
846 }
847 }
848
849 $tpl->setContent($cgui->getHTML());
850 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilGlobalTemplateInterface $tpl
static getClassByType(string $obj_type)
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
setContent(string $a_html)
Sets content for standard template.

References $DIC, ilObject2GUI\$lng, ilObject2GUI\$node_id, ilObjectGUI\$obj_id, ilObject2GUI\$tpl, ilObject2GUI\$type, ilObject\_getIcon(), ilObject\_lookupType(), ilObject2GUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ilObjectFactory\getClassByType(), ilGlobalTemplateInterface\setContent(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ disableAdminPanel()

ilObjWorkspaceFolderGUI::disableAdminPanel ( )
protected

Definition at line 162 of file class.ilObjWorkspaceFolderGUI.php.

162 : void
163 {
164 $this->setAdministrationPanel(false);
165 $this->ctrl->redirect($this, "");
166 }

References ILIAS\Repository\ctrl(), and setAdministrationPanel().

+ Here is the call graph for this function:

◆ download()

ilObjWorkspaceFolderGUI::download ( )

Definition at line 947 of file class.ilObjWorkspaceFolderGUI.php.

947 : void
948 {
949 // This variable determines whether the task has been initiated by a folder's action drop-down to prevent a folder
950 // duplicate inside the zip.
951 $initiated_by_folder_action = false;
952
953 $ids = $this->std_request->getItemIds();
954
955 if (count($ids) == 0) {
956 $this->ctrl->redirect($this, "");
957 }
958
959 $download_job = new ilDownloadWorkspaceFolderBackgroundTask($GLOBALS['DIC']->user()->getId(), $ids, $initiated_by_folder_action);
960
961 $download_job->setBucketTitle($this->getBucketTitle());
962 if ($download_job->run()) {
963 $this->tpl->setOnScreenMessage('success', $this->lng->txt('msg_bt_download_started'), true);
964 }
965 $this->ctrl->redirect($this);
966 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64

References $GLOBALS, ILIAS\Repository\ctrl(), getBucketTitle(), ILIAS\Survey\Mode\getId(), ILIAS\Repository\lng(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ edit()

ilObjWorkspaceFolderGUI::edit ( )

Reimplemented from ilObject2GUI.

Definition at line 258 of file class.ilObjWorkspaceFolderGUI.php.

258 : void
259 {
260 parent::edit();
261
262 $this->tabs_gui->activateTab("wsp");
263 $this->tabs_gui->activateSubTab("settings");
264 }

◆ enableAdminPanel()

ilObjWorkspaceFolderGUI::enableAdminPanel ( )
protected

Definition at line 156 of file class.ilObjWorkspaceFolderGUI.php.

156 : void
157 {
158 $this->setAdministrationPanel(true);
159 $this->ctrl->redirect($this, "");
160 }

References ILIAS\Repository\ctrl(), and setAdministrationPanel().

+ Here is the call graph for this function:

◆ executeCommand()

ilObjWorkspaceFolderGUI::executeCommand ( )

execute command

Reimplemented from ilObject2GUI.

Definition at line 168 of file class.ilObjWorkspaceFolderGUI.php.

168 : void
169 {
170 $next_class = $this->ctrl->getNextClass($this);
171 $cmd = $this->ctrl->getCmd();
172
173 switch ($next_class) {
174 case "ilcommonactiondispatchergui":
176 $this->ctrl->forwardCommand($gui);
177 break;
178
179 case "ilobjectownershipmanagementgui":
180 $this->prepareOutput();
181 $this->tabs_gui->activateTab("ownership");
183 $this->ctrl->forwardCommand($gui);
184 break;
185
186 default:
187 $this->prepareOutput();
188 if ($this->type != "wsrt") {
189 $this->addHeaderAction();
190 }
191 if (!$cmd) {
192 $cmd = "render";
193 }
194 $this->$cmd();
195 break;
196 }
197 }
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
prepareOutput(bool $show_sub_objects=true)
addHeaderAction()
Add header action menu.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ilObjectGUI\addHeaderAction(), ILIAS\Repository\ctrl(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), and ilObject2GUI\prepareOutput().

+ Here is the call graph for this function:

◆ getBucketTitle()

ilObjWorkspaceFolderGUI::getBucketTitle ( )

Definition at line 968 of file class.ilObjWorkspaceFolderGUI.php.

968 : string
969 {
970 $title = ilFileUtils::getASCIIFilename($this->object->getTitle());
971 if ($title === '') { // $this->>object->getTitle() is empty in root of personal and shared resources
972 $title = $this->lng->txt('personal_resources');
973 }
974 return $title;
975 }
static getASCIIFilename(string $a_filename)

References ilFileUtils\getASCIIFilename(), ILIAS\Repository\lng(), and ILIAS\Repository\object().

Referenced by download().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getType()

ilObjWorkspaceFolderGUI::getType ( )

Functions that must be overwritten.

Reimplemented from ilObject2GUI.

Reimplemented in ilObjWorkspaceRootFolderGUI.

Definition at line 72 of file class.ilObjWorkspaceFolderGUI.php.

72 : string
73 {
74 return "wfld";
75 }

◆ initCreationForms()

ilObjWorkspaceFolderGUI::initCreationForms (   $a_new_type)
protected

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

199 : array
200 {
201 $forms = array(
202 self::CFORM_NEW => $this->initCreateForm($a_new_type)
203 );
204
205 return $forms;
206 }
initCreateForm(string $new_type)

References ilObjectGUI\initCreateForm().

+ Here is the call graph for this function:

◆ initPasswordForm()

ilObjWorkspaceFolderGUI::initPasswordForm ( int  $a_node_id)
protected

Definition at line 721 of file class.ilObjWorkspaceFolderGUI.php.

722 {
723 $ilCtrl = $this->ctrl;
725
726 $this->ctrl->setParameter($this, "item_ref_id", $a_node_id);
727
728 $object_data = $this->getAccessHandler()->getObjectDataFromNode($a_node_id);
729
730 $form = new ilPropertyFormGUI();
731 $form->setFormAction($ilCtrl->getFormAction($this, "checkPassword"));
732 $form->setTitle($lng->txt("wsp_password_for") . ": " . $object_data["title"]);
733
734 $password = new ilPasswordInputGUI($lng->txt("password"), "password");
735 $password->setRetype(false);
736 $password->setRequired(true);
737 $password->setSkipSyntaxCheck(true);
738 $form->addItem($password);
739
740 $form->addCommandButton("checkPassword", $lng->txt("submit"));
741 $form->addCommandButton("share", $lng->txt("cancel"));
742
743 return $form;
744 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a property form user interface.

References ilObject2GUI\$ctrl, ilObject2GUI\$lng, ILIAS\Repository\ctrl(), ilObject2GUI\getAccessHandler(), and ilLanguage\txt().

Referenced by checkPassword(), and passwordForm().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isActiveAdministrationPanel()

ilObjWorkspaceFolderGUI::isActiveAdministrationPanel ( )

Definition at line 120 of file class.ilObjWorkspaceFolderGUI.php.

120 : bool
121 {
122 return (bool) ilSession::get("il_wsp_admin_panel");
123 }
static get(string $a_var)

References ilSession\get().

Referenced by addContentSubTabs(), render(), and showAdministrationPanel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listSharedResourcesOfOtherUser()

ilObjWorkspaceFolderGUI::listSharedResourcesOfOtherUser ( )

Definition at line 790 of file class.ilObjWorkspaceFolderGUI.php.

790 : void
791 {
792 $tbl = new ilWorkspaceShareTableGUI($this, "share", $this->getAccessHandler(), $this->node_id);
793 $tbl->resetOffset();
794 $tbl->resetFilter();
795 $tbl->writeFilterToSession();
796 $this->share();
797 }

References ilObject2GUI\getAccessHandler(), and share().

+ Here is the call graph for this function:

◆ passwordForm()

ilObjWorkspaceFolderGUI::passwordForm ( int  $a_node_id,
?ilPropertyFormGUI  $form = null 
)
protected

Definition at line 699 of file class.ilObjWorkspaceFolderGUI.php.

699 : void
700 {
703 $ilTabs = $this->tabs;
704
705 $tpl->setTitle($lng->txt("wsp_password_protected_resource"));
706 $tpl->setDescription($lng->txt("wsp_password_protected_resource_info"));
707
708 $ilTabs->clearTargets();
709 $ilTabs->setBackTarget(
710 $lng->txt("back"),
711 $this->ctrl->getLinkTarget($this, "share")
712 );
713
714 if (!$form) {
715 $form = $this->initPasswordForm($a_node_id);
716 }
717
718 $tpl->setContent($form->getHTML());
719 }
setDescription(string $a_descr)
Sets description below title in standard template.
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.

References ilObject2GUI\$lng, $tabs, ilObject2GUI\$tpl, initPasswordForm(), ilGlobalTemplateInterface\setContent(), ilGlobalTemplateInterface\setDescription(), ilGlobalTemplateInterface\setTitle(), and ilLanguage\txt().

Referenced by checkPassword(), and copyShared().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ performPasteIntoMultipleObjects()

ilObjWorkspaceFolderGUI::performPasteIntoMultipleObjects ( )

Definition at line 505 of file class.ilObjWorkspaceFolderGUI.php.

505 : void
506 {
508 $owner = 0;
509 $mode = $this->session_repo->getClipboardCmd();
510 $source_node_ids = $this->session_repo->getClipboardSourceIds();
511 $target_node_id = $this->std_request->getNode();
512
513 if (!is_array($source_node_ids) || count($source_node_ids) == 0) {
514 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('select_at_least_one_object'), true);
515 $this->ctrl->redirect($this);
516 }
517 if (!$target_node_id) {
518 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('select_at_least_one_object'), true);
519 $this->ctrl->redirect($this, "showMoveIntoObjectTree");
520 }
521
522 if (!$this->session_repo->getClipboardWsp2Repo()) {
523 $target_obj_id = $this->tree->lookupObjectId($target_node_id);
524 } else {
525 $target_obj_id = ilObject::_lookupObjId($target_node_id);
526 }
527 $target_object = ilObjectFactory::getInstanceByObjId($target_obj_id);
528
529 $fail = array();
530 foreach ($source_node_ids as $source_node_id) {
531 // object instances
532 $source_obj_id = $this->tree->lookupObjectId($source_node_id);
533 $source_object = ilObjectFactory::getInstanceByObjId($source_obj_id);
534
535
536 // sanity checks
537 if ($source_node_id == $target_node_id) {
538 $fail[] = sprintf(
539 $this->lng->txt('msg_obj_exists_in_folder'),
540 $source_object->getTitle(),
541 $target_object->getTitle()
542 );
543 }
544
545 if (!in_array($source_object->getType(), array_keys($target_object->getPossibleSubObjects()))) {
546 $fail[] = sprintf(
547 $this->lng->txt('msg_obj_may_not_contain_objects_of_type'),
548 $target_object->getTitle(),
549 $source_object->getType()
550 );
551 }
552
553 // if object is shared permission to copy has been checked above
554 $owner = $this->tree->lookupOwner($source_node_id);
555 if ($mode == "copy" && $ilUser->getId() == $owner && !$this->checkPermissionBool('copy', '', '', $source_node_id)) {
556 $fail[] = $this->lng->txt('permission_denied');
557 }
558
559 if (!$this->session_repo->getClipboardWsp2Repo()) {
560 if ($mode == "cut" && $this->tree->isGrandChild($source_node_id, $target_node_id)) {
561 $fail[] = sprintf(
562 $this->lng->txt('msg_paste_object_not_in_itself'),
563 $source_object->getTitle()
564 );
565 }
566 }
567
568 if ($this->session_repo->getClipboardWsp2Repo() == true) { // see #22959
569 global $ilAccess;
570 if (!$ilAccess->checkAccess("create", "", $target_node_id, $source_object->getType())) {
571 $fail[] = sprintf(
572 $this->lng->txt('msg_no_perm_paste_object_in_folder'),
573 $source_object->getTitle(),
574 $target_object->getTitle()
575 );
576 }
577 } else {
578 if (!$this->checkPermissionBool('create', '', $source_object->getType(), $target_node_id)) {
579 $fail[] = sprintf(
580 $this->lng->txt('msg_no_perm_paste_object_in_folder'),
581 $source_object->getTitle(),
582 $target_object->getTitle()
583 );
584 }
585 }
586 }
587
588 if (sizeof($fail)) {
589 $this->tpl->setOnScreenMessage('failure', implode("<br />", $fail), true);
590 $this->ctrl->redirect($this);
591 }
592
593 foreach ($source_node_ids as $source_node_id) {
594 $source_tree = $this->tree;
595 if ($ilUser->getId() != $owner && $mode == "copy") {
596 $source_tree = new ilWorkspaceTree($owner);
597 }
598 $node_data = $source_tree->getNodeData($source_node_id);
599 $source_object = ilObjectFactory::getInstanceByObjId($node_data["obj_id"]);
600
601 // move the node
602 if ($mode == "cut") {
603 if (!$this->session_repo->getClipboardWsp2Repo()) {
604 $this->tree->moveTree($source_node_id, $target_node_id);
605 } else {
606 $parent_id = $this->tree->getParentId($source_node_id);
607
608 // remove from personal workspace
609 $this->getAccessHandler()->removePermission($source_node_id);
610 $this->tree->deleteReference($source_node_id);
611 $source_node = $this->tree->getNodeData($source_node_id);
612 $this->tree->deleteTree($source_node);
613
614 // add to repository
615 $source_object->createReference();
616 $source_object->putInTree($target_node_id);
617 $source_object->setPermissions($target_node_id);
618
619 $source_node_id = $parent_id;
620 }
621 } // copy the node
622 elseif ($mode == "copy") {
624 $wizard_options = ilCopyWizardOptions::_getInstance($copy_id);
625 $this->wsp_log->debug("Copy ID: " . $copy_id . ", Source Node: " . $source_node_id
626 . ", source object: " . $source_object->getId());
627 if (!$this->session_repo->getClipboardWsp2Repo()) {
628 $wizard_options->disableTreeCopy();
629 }
630 $wizard_options->saveOwner($ilUser->getId());
631 $wizard_options->saveRoot($source_node_id);
632 $wizard_options->read();
633
634 $new_obj = $source_object->cloneObject($target_node_id, $copy_id);
635 // insert into workspace tree
636 if ($new_obj && !$this->session_repo->getClipboardWsp2Repo()) {
637 $this->wsp_log->debug("New Obj ID: " . $new_obj->getId());
638 $new_obj_node_id = $this->tree->insertObject($target_node_id, $new_obj->getId());
639 $this->getAccessHandler()->setPermissions($target_node_id, $new_obj_node_id);
640 }
641
642 $wizard_options->deleteAll();
643 }
644 }
645
646 // redirect to target if not repository
647 if (!$this->session_repo->getClipboardWsp2Repo()) {
648 //$redirect_node = $target_node_id;
649 $redirect_node = $this->node_id; // see bug 34459
650 } else {
651 // reload current folder
652 $redirect_node = $this->node_id;
653 }
654
655 $this->session_repo->clearClipboard();
656
657 // #17746
658 if ($mode == 'cut') {
659 $this->tpl->setOnScreenMessage('success', $this->lng->txt('msg_cut_copied'), true);
660 } else {
661 $this->tpl->setOnScreenMessage('success', $this->lng->txt('msg_cloned'), true);
662 }
663
664 $this->ctrl->setParameter($this, "wsp_id", $redirect_node);
665 $this->ctrl->redirect($this);
666 }
static _allocateCopyId()
Allocate a copy for further entries.
static _getInstance(int $a_copy_id)
static _lookupObjId(int $ref_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $ilUser, ilObject2GUI\$node_id, ilObject2GUI\$parent_id, ilObjectGUI\$tree, ilObject2GUI\$user, ilCopyWizardOptions\_allocateCopyId(), ilCopyWizardOptions\_getInstance(), ilObject\_lookupObjId(), ilObject2GUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ilObject2GUI\getAccessHandler(), ilObjectFactory\getInstanceByObjId(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ render()

ilObjWorkspaceFolderGUI::render ( )

Definition at line 208 of file class.ilObjWorkspaceFolderGUI.php.

208 : void
209 {
212 $ilCtrl = $this->ctrl;
213
214 //$this->addContentSubTabs();
216
217 $this->session_repo->clearClipboard();
218
219 // add new item
220 $gui = new ilObjectAddNewItemGUI($this->node_id);
222 $gui->setCreationUrl($ilCtrl->getLinkTarget($this, "create"));
223 $gui->render();
224
226 "",
227 "",
228 $this->ctrl->getLinkTargetByClass(array("ilcommonactiondispatchergui", "iltagginggui"), "", "", true, false)
229 );
230
231 $gui = new ilWorkspaceContentGUI(
232 $this,
233 $this->node_id,
235 $this->getAccessHandler(),
236 $this->ui,
237 $this->lng,
238 $this->user,
239 $this->obj_definition,
240 $this->ctrl,
241 $this->user_folder_settings
242 );
243 $tpl->setContent($gui->render());
244
245 $exp = new ilWorkspaceExplorerGUI($ilUser->getId(), $this, "render", $this, "", "wsp_id");
246 $exp->setTypeWhiteList(array("wsrt", "wfld"));
247 $exp->setSelectableTypes(array("wsrt", "wfld"));
248 $exp->setLinkToNodeClass(true);
249 $exp->setActivateHighlighting(true);
250 if ($exp->handleCommand()) {
251 return;
252 }
253 $left = $exp->getHTML();
254
255 $tpl->setLeftNavContent($left);
256 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static prepareJsLinks(string $redraw_url, string $notes_url, string $tags_url, ilGlobalTemplateInterface $tpl=null)
Insert js/ajax links into template.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Explorer for selecting a personal workspace item.
setLeftNavContent(string $a_content)
Sets content of left navigation column.

References ilObject2GUI\$ctrl, $ilUser, ilObject2GUI\$tpl, ilObject2GUI\$user, ILIAS\Repository\ctrl(), ilObject2GUI\getAccessHandler(), isActiveAdministrationPanel(), ILIAS\Repository\lng(), ilObjectDefinition\MODE_WORKSPACE, ilObjectListGUI\prepareJsLinks(), ilGlobalTemplateInterface\setContent(), ilGlobalTemplateInterface\setLeftNavContent(), showAdministrationPanel(), ILIAS\Repository\ui(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ resetShareFilter()

ilObjWorkspaceFolderGUI::resetShareFilter ( )

Definition at line 690 of file class.ilObjWorkspaceFolderGUI.php.

690 : void
691 {
692 $tbl = new ilWorkspaceShareTableGUI($this, "share", $this->getAccessHandler(), $this->node_id);
693 $tbl->resetOffset();
694 $tbl->resetFilter();
695
696 $this->shareFilter();
697 }

References ilObject2GUI\getAccessHandler(), and shareFilter().

+ Here is the call graph for this function:

◆ setAdministrationPanel()

ilObjWorkspaceFolderGUI::setAdministrationPanel ( bool  $active)

Definition at line 125 of file class.ilObjWorkspaceFolderGUI.php.

125 : void
126 {
127 ilSession::set("il_wsp_admin_panel", $active);
128 }
static set(string $a_var, $a_val)
Set a value.

References ilSession\set().

Referenced by disableAdminPanel(), and enableAdminPanel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSortation()

ilObjWorkspaceFolderGUI::setSortation ( )
protected

Set sortation.

Definition at line 941 of file class.ilObjWorkspaceFolderGUI.php.

941 : void
942 {
943 $this->user_folder_settings->updateSortation($this->object->getId(), $this->requested_sortation);
944 $this->ctrl->redirect($this, "");
945 }

References ILIAS\Repository\ctrl(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ setTabs()

ilObjWorkspaceFolderGUI::setTabs ( bool  $a_show_settings = true)
protected

Reimplemented in ilObjWorkspaceRootFolderGUI.

Definition at line 77 of file class.ilObjWorkspaceFolderGUI.php.

77 : void
78 {
80 $ilHelp = $this->help;
81
82 $ilHelp->setScreenIdComponent("wfld");
83
84 $this->ctrl->setParameter($this, "wsp_id", $this->node_id);
85
86 $this->tabs_gui->addTab(
87 "wsp",
88 $lng->txt("wsp_tab_personal"),
89 $this->ctrl->getLinkTarget($this, "")
90 );
91
92 $this->ctrl->setParameterByClass(
93 "ilObjWorkspaceRootFolderGUI",
94 "wsp_id",
95 $this->getAccessHandler()->getTree()->getRootId()
96 );
97
98 $this->tabs_gui->addTab(
99 "share",
100 $lng->txt("wsp_tab_shared"),
101 $this->ctrl->getLinkTargetByClass("ilObjWorkspaceRootFolderGUI", "shareFilter")
102 );
103
104 $this->tabs_gui->addTab(
105 "ownership",
106 $lng->txt("wsp_tab_ownership"),
107 $this->ctrl->getLinkTargetByClass(array("ilObjWorkspaceRootFolderGUI", "ilObjectOwnershipManagementGUI"), "listObjects")
108 );
109
110 if (!$this->ctrl->getNextClass($this)) {
111 if (stristr($this->ctrl->getCmd(), "share")) {
112 $this->tabs_gui->activateTab("share");
113 } else {
114 $this->tabs_gui->activateTab("wsp");
115 $this->addContentSubTabs($a_show_settings);
116 }
117 }
118 }
setScreenIdComponent(string $a_comp)
addContentSubTabs(bool $a_show_settings)

References $help, ilObject2GUI\$lng, addContentSubTabs(), ILIAS\Repository\ctrl(), ilObject2GUI\getAccessHandler(), ilHelpGUI\setScreenIdComponent(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ share()

ilObjWorkspaceFolderGUI::share ( bool  $a_load_data = true)

Definition at line 673 of file class.ilObjWorkspaceFolderGUI.php.

673 : void
674 {
676
677 $tbl = new ilWorkspaceShareTableGUI($this, "share", $this->getAccessHandler(), $this->node_id, $a_load_data);
678 $tpl->setContent($tbl->getHTML());
679 }

References ilObject2GUI\$tpl, ilObject2GUI\getAccessHandler(), and ilGlobalTemplateInterface\setContent().

Referenced by applyShareFilter(), listSharedResourcesOfOtherUser(), and shareFilter().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ shareFilter()

ilObjWorkspaceFolderGUI::shareFilter ( )

Definition at line 668 of file class.ilObjWorkspaceFolderGUI.php.

668 : void
669 {
670 $this->share(false);
671 }

References share().

Referenced by resetShareFilter().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showAdministrationPanel()

ilObjWorkspaceFolderGUI::showAdministrationPanel ( )

Definition at line 863 of file class.ilObjWorkspaceFolderGUI.php.

863 : void
864 {
865 global $DIC;
866
868
869 $main_tpl = $DIC->ui()->mainTemplate();
870
871 $lng->loadLanguageModule('cntr');
872
873 if (!$this->session_repo->isClipboardEmpty()) {
874 // #11545
875 $main_tpl->setPageFormAction($this->ctrl->getFormAction($this));
876
877 $toolbar = new ilToolbarGUI();
878 $this->ctrl->setParameter($this, "type", "");
879 $this->ctrl->setParameter($this, "item_ref_id", "");
880
882 $this->lng->txt('paste_clipboard_items'),
883 'paste'
884 );
885
887 $this->lng->txt('clear_clipboard'),
888 'clear'
889 );
890
891 $main_tpl->addAdminPanelToolbar($toolbar, true, false);
892 } elseif ($this->isActiveAdministrationPanel()) {
893 // #11545
894 $main_tpl->setPageFormAction($this->ctrl->getFormAction($this));
895
896 $toolbar = new ilToolbarGUI();
897 $this->ctrl->setParameter($this, "type", "");
898 $this->ctrl->setParameter($this, "item_ref_id", "");
899
900 if ($this->object->gotItems($this->node_id)) {
902 ilUtil::getImagePath("arrow_upright.svg"),
903 $lng->txt("actions")
904 );
906 $this->lng->txt('delete_selected_items'),
907 'delete'
908 );
910 $this->lng->txt('move_selected_items'),
911 'cut'
912 );
914 $this->lng->txt('copy_selected_items'),
915 'copy'
916 );
918 $this->lng->txt('download_selected_items'),
919 'download'
920 );
921 // add download button if multi download enabled
922 }
923
924 $main_tpl->addAdminPanelToolbar(
925 $toolbar,
926 $this->object->gotItems($this->node_id) && $this->session_repo->isClipboardEmpty(),
927 ($this->object->gotItems($this->node_id) && $this->session_repo->isClipboardEmpty())
928 );
929
930 // form action needed, see http://www.ilias.de/mantis/view.php?id=9630
931 if ($this->object->gotItems($this->node_id)) {
932 $main_tpl->setPageFormAction($this->ctrl->getFormAction($this));
933 }
934 }
935 }
loadLanguageModule(string $a_module)
Load language module.
ilToolbarGUI $toolbar
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setLeadingImage(string $a_img, string $a_alt)
addFormButton(string $a_txt, string $a_cmd, ?int $a_acc_key=null, bool $a_primary=false, ?string $a_class=null)
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)

References $DIC, ilObject2GUI\$lng, ilObject2GUI\$toolbar, ilToolbarGUI\addFormButton(), ILIAS\Repository\ctrl(), ilUtil\getImagePath(), isActiveAdministrationPanel(), ILIAS\Repository\lng(), ilLanguage\loadLanguageModule(), ILIAS\Repository\object(), ilToolbarGUI\setLeadingImage(), and ilLanguage\txt().

Referenced by render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showMoveIntoObjectTree()

ilObjWorkspaceFolderGUI::showMoveIntoObjectTree ( bool  $repo_switch_allowed = false)

Definition at line 396 of file class.ilObjWorkspaceFolderGUI.php.

396 : void
397 {
398 $ilTabs = $this->tabs;
400
401 $ilTabs->clearTargets();
402
403 if (!$this->session_repo->getClipboardShared()) {
404 $ilTabs->setBackTarget(
405 $this->lng->txt('back'),
406 $this->ctrl->getLinkTarget($this)
407 );
408 } else {
409 $ilTabs->setBackTarget(
410 $this->lng->txt('back'),
411 $this->ctrl->getLinkTarget($this, 'share')
412 );
413 }
414
415 $mode = $this->session_repo->getClipboardCmd();
416
417 $this->tpl->setOnScreenMessage('info', $this->lng->txt('msg_' . $mode . '_clipboard'));
418
419 $this->tpl->addBlockFile(
420 'ADM_CONTENT',
421 'adm_content',
422 'tpl.paste_into_multiple_objects.html',
423 "Services/Object"
424 );
425
426 // move/copy in personal workspace
427 if (!$this->session_repo->getClipboardWsp2Repo()) {
428 $exp = new ilWorkspaceExplorerGUI($this->user->getId(), $this, "showMoveIntoObjectTree", $this, "");
429 $exp->setTypeWhiteList(array("wsrt", "wfld"));
430 $exp->setSelectableTypes(array("wsrt", "wfld"));
431 $exp->setSelectMode("node", false);
432 if ($exp->handleCommand()) {
433 return;
434 }
435 $this->tpl->setVariable('OBJECT_TREE', $exp->getHTML());
436
437 // switch to repo?
438 if ($repo_switch_allowed) {
439 $switch_cmd = ($mode == "cut")
440 ? "cut_for_repository"
441 : "copy_to_repository";
442 $this->tpl->setCurrentBlock("switch_button");
443 $this->tpl->setVariable('CMD_SWITCH', $switch_cmd);
444 $this->tpl->setVariable('TXT_SWITCH', $this->lng->txt('wsp_switch_to_repo_tree'));
445 $this->tpl->parseCurrentBlock();
446
447 foreach ($this->std_request->getItemIds() as $id) {
448 $this->tpl->setCurrentBlock("hidden");
449 $this->tpl->setVariable('VALUE', (string) $id);
450 $this->tpl->parseCurrentBlock();
451 }
452 }
453 }
454 // move/copy to repository
455 else {
458 '',
459 'paste_' . $mode . '_repexpand'
460 );
461 $exp->setTargetGet('ref_id');
462
463 if ($this->std_request->getPasteExpand($mode) == '') {
464 $expanded = $tree->readRootId();
465 } else {
466 $expanded = $this->std_request->getPasteExpand($mode);
467 }
468 $exp->setCheckedItems(array($this->std_request->getNode()));
469 $exp->setExpandTarget($this->ctrl->getLinkTarget($this, 'showMoveIntoObjectTree'));
470 $exp->setPostVar('node');
471 $exp->setExpand($expanded);
472 $exp->setOutput(0);
473 $this->tpl->setVariable('OBJECT_TREE', $exp->getOutput());
474
475 if (in_array($mode, ["copy", "cut"])) {
476 $switch_cmd = ($mode == "cut")
477 ? "cut_for_workspace"
478 : "copy_to_workspace";
479 $this->tpl->setCurrentBlock("switch_button");
480 $this->tpl->setVariable('CMD_SWITCH', $switch_cmd);
481 $this->tpl->setVariable('TXT_SWITCH', $this->lng->txt('wsp_switch_to_wsp_tree'));
482 $this->tpl->parseCurrentBlock();
483
484 foreach ($this->std_request->getItemIds() as $id) {
485 $this->tpl->setCurrentBlock("hidden");
486 $this->tpl->setVariable('VALUE', (string) $id);
487 $this->tpl->parseCurrentBlock();
488 }
489 }
490 }
491
492
493 unset($exp);
494
495 $this->tpl->setVariable('FORM_TARGET', '_top');
496 $this->tpl->setVariable(
497 'FORM_ACTION',
498 $this->ctrl->getFormAction($this, 'performPasteIntoMultipleObjects')
499 );
500
501 $this->tpl->setVariable('CMD_SUBMIT', 'performPasteIntoMultipleObjects');
502 $this->tpl->setVariable('TXT_SUBMIT', $this->lng->txt('paste'));
503 }
ilPasteIntoMultipleItemsExplorer Explorer

References ilObjectGUI\$id, $tabs, ilObjectGUI\$tree, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilTree\readRootId(), ilPasteIntoMultipleItemsExplorer\SEL_TYPE_RADIO, and ILIAS\Repository\user().

Referenced by copy(), copyShared(), and cut().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ update()

ilObjWorkspaceFolderGUI::update ( )

Reimplemented from ilObject2GUI.

Definition at line 266 of file class.ilObjWorkspaceFolderGUI.php.

266 : void
267 {
268 parent::update();
269
270 $this->tabs_gui->activateTab("wsp");
271 $this->tabs_gui->activateSubTab("settings");
272 }

Field Documentation

◆ $help

ilHelpGUI ilObjWorkspaceFolderGUI::$help
protected

◆ $requested_sortation

int ilObjWorkspaceFolderGUI::$requested_sortation
protected

Definition at line 36 of file class.ilObjWorkspaceFolderGUI.php.

◆ $session_repo

WorkspaceSessionRepository ilObjWorkspaceFolderGUI::$session_repo
protected

Definition at line 39 of file class.ilObjWorkspaceFolderGUI.php.

◆ $std_request

StandardGUIRequest ilObjWorkspaceFolderGUI::$std_request
protected

Definition at line 38 of file class.ilObjWorkspaceFolderGUI.php.

◆ $tabs

ilTabsGUI ilObjWorkspaceFolderGUI::$tabs
protected

◆ $ui

ILIAS DI UIServices ilObjWorkspaceFolderGUI::$ui
protected

Definition at line 34 of file class.ilObjWorkspaceFolderGUI.php.

◆ $user_folder_settings

ilWorkspaceFolderUserSettings ilObjWorkspaceFolderGUI::$user_folder_settings
protected

Definition at line 35 of file class.ilObjWorkspaceFolderGUI.php.

◆ $wsp_log

ilLogger ilObjWorkspaceFolderGUI::$wsp_log
protected

Definition at line 37 of file class.ilObjWorkspaceFolderGUI.php.


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