33        $this->role_id = $a_role_id;
 
   42        $this->role_id = $a_role_id;
 
   45    public function add($a_item_id, $a_item_type)
 
   51        if ($a_item_type and $a_item_id) {
 
   52            $next_id = 
$ilDB->nextId(
'role_desktop_items');
 
   53            $query = 
"INSERT INTO role_desktop_items (role_item_id,role_id,item_id,item_type) " .
 
   55                $ilDB->quote($next_id, 
'integer') . 
',' .
 
   57                $ilDB->quote($a_item_id, 
'integer') . 
", " .
 
   58                $ilDB->quote($a_item_type, 
'text') . 
" " .
 
   61            $this->
__assign($a_item_id, $a_item_type);
 
   67    public function delete($a_role_item_id)
 
   73        $query = 
"DELETE FROM role_desktop_items " .
 
   74            "WHERE role_item_id = " . 
$ilDB->quote($a_role_item_id, 
'integer');
 
   86        $query = 
"DELETE FROM role_desktop_items " .
 
   99        $query = 
"SELECT * FROM role_desktop_items " .
 
  100            "WHERE role_id = " . 
$ilDB->quote($this->
getRoleId(), 
'integer') . 
" " .
 
  101            "AND item_id = " . 
$ilDB->quote($a_item_ref_id, 
'integer') . 
" ";
 
  104        return $res->numRows() ? true : 
false;
 
  113        $query = 
"SELECT * FROM role_desktop_items " .
 
  114            "WHERE role_id = " . 
$ilDB->quote($this->
getRoleId(), 
'integer') . 
" " .
 
  115            "AND role_item_id = " . 
$ilDB->quote($a_role_item_id, 
'integer') . 
" ";
 
  119            $item[
'item_id'] = 
$row->item_id;
 
  120            $item[
'item_type'] = 
$row->item_type;
 
  123        return $item ? $item : array();
 
  137        $query = 
"SELECT * FROM role_desktop_items " .
 
  138            "WHERE role_id = " . $this->db->quote($this->
getRoleId(), 
'integer') . 
" ";
 
  144                $this->
delete(
$row->role_item_id);
 
  147            $items[
$row->role_item_id][
'item_id'] = 
$row->item_id;
 
  148            $items[
$row->role_item_id][
'item_type'] = 
$row->item_type;
 
  151        return $items ? $items : array();
 
  161        foreach (
$rbacreview->assignedUsers($this->getRoleId()) as $user_id) {
 
  163                if (!$tmp_user->isDesktopItem($a_item_id, $a_item_type)) {
 
  164                    $tmp_user->addDesktopItem($a_item_id, $a_item_type);
 
An exception for terminatinating execution or to throw for unit testing.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
add($a_item_id, $a_item_type)
__construct($a_role_id)
Constructor @access public.
__assign($a_item_id, $a_item_type)
isAssigned($a_item_ref_id)
foreach($_POST as $key=> $value) $res