ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilDesktopItemGUI Class Reference

Handles add/remove to/from desktop requests. More...

+ Collaboration diagram for ilDesktopItemGUI:

Static Public Member Functions

static addToDesktop ()
 Add desktop item @access public. More...
 
static removeFromDesktop ()
 Remove item from personal desktop @access public. More...
 

Detailed Description

Handles add/remove to/from desktop requests.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

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

Member Function Documentation

◆ addToDesktop()

static ilDesktopItemGUI::addToDesktop ( )
static

Add desktop item @access public.

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

40 {
41 global $ilUser;
42
43 if ($_GET["item_ref_id"] and $_GET["type"])
44 {
45 ilObjUser::_addDesktopItem($ilUser->getId(),(int) $_GET['item_ref_id'], $_GET['type']);
46 }
47 else
48 {
49 if ($_POST["items"])
50 {
51 foreach ($_POST["items"] as $item)
52 {
53 $type = ilObject::_lookupType($item, true);
54 ilObjUser::_addDesktopItem($ilUser->getId(),$item,$type);
55 }
56 }
57 }
58 return true;
59 }
$_GET["client_id"]
static _addDesktopItem($a_usr_id, $a_item_id, $a_type, $a_par="")
add an item to user's personal desktop
static _lookupType($a_id, $a_reference=false)
lookup object type
$_POST['username']
Definition: cron.php:12
global $ilUser
Definition: imgupload.php:15

References $_GET, $_POST, $ilUser, ilObjUser\_addDesktopItem(), and ilObject\_lookupType().

Referenced by ilObjBibliographicGUI\addToDeskObject(), ilObjBlogGUI\addToDeskObject(), ilObjSessionGUI\addToDeskObject(), ilContainerGUI\addToDeskObject(), ilPDSelectedItemsBlockGUI\addToDeskObject(), and ilSearchBaseGUI\addToDeskObject().

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

◆ removeFromDesktop()

static ilDesktopItemGUI::removeFromDesktop ( )
static

Remove item from personal desktop @access public.

Definition at line 65 of file class.ilDesktopItemGUI.php.

66 {
67 global $ilUser;
68
69 if ($_GET["item_ref_id"] and $_GET["type"])
70 {
71 ilObjUser::_dropDesktopItem($ilUser->getId(),(int) $_GET['item_ref_id'], $_GET['type']);
72 }
73 else
74 {
75 if ($_POST["items"])
76 {
77 foreach ($_POST["items"] as $item)
78 {
79 $type = ilObject::_lookupType($item, true);
80 ilObjUser::_dropDesktopItem($ilUser->getId(),$item,$type);
81 }
82 }
83 }
84 return true;
85 }
static _dropDesktopItem($a_usr_id, $a_item_id, $a_type)
drop an item from user's personal desktop

References $_GET, $_POST, $ilUser, ilObjUser\_dropDesktopItem(), and ilObject\_lookupType().

Referenced by ilObjBibliographicGUI\removeFromDeskObject(), ilObjBlogGUI\removeFromDeskObject(), ilObjForumGUI\removeFromDeskObject(), ilObjSessionGUI\removeFromDeskObject(), ilContainerGUI\removeFromDeskObject(), ilPDSelectedItemsBlockGUI\removeFromDeskObject(), and ilSearchBaseGUI\removeFromDeskObject().

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

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