ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilDesktopItemGUI Class Reference

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

+ Collaboration diagram for ilDesktopItemGUI:

Static Public Member Functions

static addToDesktop ()
 Add desktop item public. More...
 
static removeFromDesktop ()
 Remove item from personal desktop 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 public.

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

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

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

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

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

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

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

63  {
64  global $DIC;
65 
66  $ilUser = $DIC->user();
67 
68  if ($_GET["item_ref_id"] and $_GET["type"]) {
69  ilObjUser::_dropDesktopItem($ilUser->getId(), (int) $_GET['item_ref_id'], $_GET['type']);
70  } else {
71  if ($_POST["items"]) {
72  foreach ($_POST["items"] as $item) {
73  $type = ilObject::_lookupType($item, true);
74  ilObjUser::_dropDesktopItem($ilUser->getId(), $item, $type);
75  }
76  }
77  }
78  return true;
79  }
$type
global $DIC
Definition: saml.php:7
$_GET["client_id"]
static _dropDesktopItem($a_usr_id, $a_item_id, $a_type)
drop an item from user's personal desktop
$ilUser
Definition: imgupload.php:18
static _lookupType($a_id, $a_reference=false)
lookup object type
$_POST["username"]
+ 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: