31        $this->role_id = $a_role_id;
 
   40        $this->role_id = $a_role_id;
 
   43    public function add($a_item_id, $a_item_type)
 
   47        if ($a_item_type and $a_item_id) {
 
   48            $next_id = 
$ilDB->nextId(
'role_desktop_items');
 
   49            $query = 
"INSERT INTO role_desktop_items (role_item_id,role_id,item_id,item_type) " .
 
   51                $ilDB->quote($next_id, 
'integer') . 
',' .
 
   53                $ilDB->quote($a_item_id, 
'integer') . 
", " .
 
   54                $ilDB->quote($a_item_type, 
'text') . 
" " .
 
   57            $this->
__assign($a_item_id, $a_item_type);
 
   63    public function delete($a_role_item_id)
 
   67        $query = 
"DELETE FROM role_desktop_items " .
 
   68            "WHERE role_item_id = " . 
$ilDB->quote($a_role_item_id, 
'integer');
 
   78        $query = 
"DELETE FROM role_desktop_items " .
 
   89        $query = 
"SELECT * FROM role_desktop_items " .
 
   90            "WHERE role_id = " . 
$ilDB->quote($this->
getRoleId(), 
'integer') . 
" " .
 
   91            "AND item_id = " . $ilDB->quote($a_item_ref_id, 
'integer') . 
" ";
 
   94        return $res->numRows() ? true : 
false;
 
  101        $query = 
"SELECT * FROM role_desktop_items " .
 
  102            "WHERE role_id = " . 
$ilDB->quote($this->
getRoleId(), 
'integer') . 
" " .
 
  103            "AND role_item_id = " . $ilDB->quote($a_role_item_id, 
'integer') . 
" ";
 
  107            $item[
'item_id'] = 
$row->item_id;
 
  108            $item[
'item_type'] = 
$row->item_type;
 
  111        return $item ? $item : array();
 
  121        $query = 
"SELECT * FROM role_desktop_items " .
 
  122            "WHERE role_id = " . $this->db->quote($this->
getRoleId(), 
'integer') . 
" ";
 
  128                $this->
delete(
$row->role_item_id);
 
  131            $items[
$row->role_item_id][
'item_id'] = 
$row->item_id;
 
  132            $items[
$row->role_item_id][
'item_type'] = 
$row->item_type;
 
  135        return $items ? $items : array();
 
  143        foreach (
$rbacreview->assignedUsers($this->getRoleId()) as $user_id) {
 
  145                if (!$tmp_user->isDesktopItem($a_item_id, $a_item_type)) {
 
  146                    $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