ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilLDAPRoleGroupMappingSetting Class Reference
+ Collaboration diagram for ilLDAPRoleGroupMappingSetting:

Public Member Functions

 __construct ($a_mapping_id)
 constructor ilDB $ilDB More...
 
 read ()
 read data from db More...
 
 delete ()
 delete mapping by id More...
 
 update ()
 update mapping by id More...
 
 save ()
 create new mapping More...
 
 getMappingId ()
 get mapping id More...
 
 setMappingId ($a_value)
 set mapping id More...
 
 getServerId ()
 get server id More...
 
 setServerId ($a_value)
 set server id More...
 
 getURL ()
 get url More...
 
 setURL ($a_value)
 set url More...
 
 getDN ()
 get group dn More...
 
 setDN ($a_value)
 set group dn More...
 
 getMemberAttribute ()
 get Group Member Attribute More...
 
 setMemberAttribute ($a_value)
 set Group Member Attribute More...
 
 getMemberISDN ()
 get Member Attribute Value is DN More...
 
 setMemberISDN ($a_value)
 set Member Attribute Value is DN More...
 
 getRole ()
 get ILIAS Role Name id More...
 
 setRole ($a_value)
 set ILIAS Role Name id More...
 
 getRoleName ()
 get ILIAS Role Name type $ilObjDataCache More...
 
 setRoleByName ($a_value)
 set ILIAS Role Name ilRbacReview $rbacreview More...
 
 getMappingInfo ()
 get Information Text More...
 
 setMappingInfo ($a_value)
 set Information Text More...
 
 getMappingInfoType ()
 get Show Information also in the Repository/Personal Desktop More...
 
 setMappingInfoType ($a_value)
 set Show Information also in the Repository/Personal Desktop More...
 

Detailed Description

Author
Fabian Wolf wolf@.nosp@m.leif.nosp@m.os.de
Version
Id

/

Definition at line 12 of file class.ilLDAPRoleGroupMappingSetting.php.

Constructor & Destructor Documentation

◆ __construct()

ilLDAPRoleGroupMappingSetting::__construct (   $a_mapping_id)

constructor ilDB $ilDB

Parameters
int$a_mapping_id

Definition at line 19 of file class.ilLDAPRoleGroupMappingSetting.php.

References $ilDB.

20  {
21  global $ilDB;
22  $this->db = $ilDB;
23  $this->mapping_id = $a_mapping_id;
24  }
global $ilDB

Member Function Documentation

◆ delete()

ilLDAPRoleGroupMappingSetting::delete ( )

delete mapping by id

Definition at line 50 of file class.ilLDAPRoleGroupMappingSetting.php.

References $query, $res, and getMappingId().

51  {
52  $query = "DELETE FROM ldap_rg_mapping " .
53  "WHERE mapping_id = " . $this->db->quote($this->getMappingId(), 'integer');
54  $res = $this->db->manipulate($query);
55  }
foreach($_POST as $key=> $value) $res
$query
+ Here is the call graph for this function:

◆ getDN()

ilLDAPRoleGroupMappingSetting::getDN ( )

get group dn

Returns
string

Definition at line 154 of file class.ilLDAPRoleGroupMappingSetting.php.

Referenced by save(), and update().

155  {
156  return $this->dn;
157  }
+ Here is the caller graph for this function:

◆ getMappingId()

ilLDAPRoleGroupMappingSetting::getMappingId ( )

get mapping id

Returns
int mapping id

Definition at line 100 of file class.ilLDAPRoleGroupMappingSetting.php.

Referenced by delete(), read(), save(), and update().

101  {
102  return $this->mapping_id;
103  }
+ Here is the caller graph for this function:

◆ getMappingInfo()

ilLDAPRoleGroupMappingSetting::getMappingInfo ( )

get Information Text

Returns
string

Definition at line 248 of file class.ilLDAPRoleGroupMappingSetting.php.

Referenced by save(), and update().

249  {
250  return $this->mapping_info;
251  }
+ Here is the caller graph for this function:

◆ getMappingInfoType()

ilLDAPRoleGroupMappingSetting::getMappingInfoType ( )

get Show Information also in the Repository/Personal Desktop

Returns
bool

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

Referenced by save(), and update().

267  {
268  return $this->mapping_info_type;
269  }
+ Here is the caller graph for this function:

◆ getMemberAttribute()

ilLDAPRoleGroupMappingSetting::getMemberAttribute ( )

get Group Member Attribute

Returns
string

Definition at line 172 of file class.ilLDAPRoleGroupMappingSetting.php.

Referenced by save(), and update().

173  {
174  return $this->member_attribute;
175  }
+ Here is the caller graph for this function:

◆ getMemberISDN()

ilLDAPRoleGroupMappingSetting::getMemberISDN ( )

get Member Attribute Value is DN

Returns
bool

Definition at line 190 of file class.ilLDAPRoleGroupMappingSetting.php.

Referenced by save(), and update().

191  {
192  return $this->member_isdn;
193  }
+ Here is the caller graph for this function:

◆ getRole()

ilLDAPRoleGroupMappingSetting::getRole ( )

get ILIAS Role Name id

Returns
int

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

Referenced by save(), and update().

209  {
210  return $this->role;
211  }
+ Here is the caller graph for this function:

◆ getRoleName()

ilLDAPRoleGroupMappingSetting::getRoleName ( )

get ILIAS Role Name type $ilObjDataCache

Returns
string

Definition at line 227 of file class.ilLDAPRoleGroupMappingSetting.php.

228  {
229  global $ilObjDataCache;
230  return $ilObjDataCache->lookupTitle($this->role);
231  }

◆ getServerId()

ilLDAPRoleGroupMappingSetting::getServerId ( )

get server id

Returns
int server id id

Definition at line 118 of file class.ilLDAPRoleGroupMappingSetting.php.

Referenced by save(), and update().

119  {
120  return $this->server_id;
121  }
+ Here is the caller graph for this function:

◆ getURL()

ilLDAPRoleGroupMappingSetting::getURL ( )

get url

Returns
string url

Definition at line 136 of file class.ilLDAPRoleGroupMappingSetting.php.

References $url.

Referenced by save(), and update().

137  {
138  return $this->url;
139  }
$url
+ Here is the caller graph for this function:

◆ read()

ilLDAPRoleGroupMappingSetting::read ( )

read data from db

Definition at line 29 of file class.ilLDAPRoleGroupMappingSetting.php.

References $query, getMappingId(), setDN(), setMappingId(), setMappingInfo(), setMappingInfoType(), setMemberAttribute(), setMemberISDN(), setRole(), setServerId(), and setURL().

30  {
31  $query = "SELECT * FROM ldap_rg_mapping "
32  . "WHERE mapping_id = " . $this->db->quote($this->getMappingId(), 'integer');
33  $set = $this->db->query($query);
34  $rec = $this->db->fetchAssoc($set);
35 
36  $this->setMappingId($rec["mapping_id"]);
37  $this->setServerId($rec["server_id"]);
38  $this->setURL($rec["url"]);
39  $this->setDN($rec["dn"]);
40  $this->setMemberAttribute($rec["member_attribute"]);
41  $this->setMemberISDN($rec["member_isdn"]);
42  $this->setRole($rec["role"]);
43  $this->setMappingInfo($rec["mapping_info"]);
44  $this->setMappingInfoType($rec["mapping_info_type"]);
45  }
setMemberISDN($a_value)
set Member Attribute Value is DN
setMappingInfoType($a_value)
set Show Information also in the Repository/Personal Desktop
$query
setMemberAttribute($a_value)
set Group Member Attribute
+ Here is the call graph for this function:

◆ save()

ilLDAPRoleGroupMappingSetting::save ( )

create new mapping

Definition at line 78 of file class.ilLDAPRoleGroupMappingSetting.php.

References $query, $res, getDN(), getMappingId(), getMappingInfo(), getMappingInfoType(), getMemberAttribute(), getMemberISDN(), getRole(), getServerId(), getURL(), and setMappingId().

79  {
80  $this->setMappingId($this->db->nextId('ldap_rg_mapping'));
81  $query = "INSERT INTO ldap_rg_mapping (mapping_id,server_id,url,dn,member_attribute,member_isdn,role,mapping_info,mapping_info_type) " .
82  "VALUES ( " .
83  $this->db->quote($this->getMappingId(), 'integer') . ", " .
84  $this->db->quote($this->getServerId(), 'integer') . ", " .
85  $this->db->quote($this->getURL(), 'text') . ", " .
86  $this->db->quote($this->getDN(), 'text') . ", " .
87  $this->db->quote($this->getMemberAttribute(), 'text') . ", " .
88  $this->db->quote($this->getMemberISDN(), 'integer') . ", " .
89  $this->db->quote($this->getRole(), 'integer') . ", " .
90  $this->db->quote($this->getMappingInfo(), 'text') . ", " .
91  $this->db->quote($this->getMappingInfoType(), 'integer') .
92  ")";
93  $res = $this->db->manipulate($query);
94  }
foreach($_POST as $key=> $value) $res
getMappingInfoType()
get Show Information also in the Repository/Personal Desktop
$query
getMemberISDN()
get Member Attribute Value is DN
+ Here is the call graph for this function:

◆ setDN()

ilLDAPRoleGroupMappingSetting::setDN (   $a_value)

set group dn

Parameters
string$a_value

Definition at line 163 of file class.ilLDAPRoleGroupMappingSetting.php.

Referenced by read().

164  {
165  $this->dn = $a_value;
166  }
+ Here is the caller graph for this function:

◆ setMappingId()

ilLDAPRoleGroupMappingSetting::setMappingId (   $a_value)

set mapping id

Parameters
int$a_valuemapping id

Definition at line 109 of file class.ilLDAPRoleGroupMappingSetting.php.

Referenced by read(), and save().

110  {
111  $this->mapping_id = $a_value;
112  }
+ Here is the caller graph for this function:

◆ setMappingInfo()

ilLDAPRoleGroupMappingSetting::setMappingInfo (   $a_value)

set Information Text

Parameters
string$a_value

Definition at line 257 of file class.ilLDAPRoleGroupMappingSetting.php.

Referenced by read().

258  {
259  $this->mapping_info = $a_value;
260  }
+ Here is the caller graph for this function:

◆ setMappingInfoType()

ilLDAPRoleGroupMappingSetting::setMappingInfoType (   $a_value)

set Show Information also in the Repository/Personal Desktop

Parameters
bool$a_value

Definition at line 275 of file class.ilLDAPRoleGroupMappingSetting.php.

Referenced by read().

276  {
277  $this->mapping_info_type = $a_value;
278  }
+ Here is the caller graph for this function:

◆ setMemberAttribute()

ilLDAPRoleGroupMappingSetting::setMemberAttribute (   $a_value)

set Group Member Attribute

Parameters
string$a_value

Definition at line 181 of file class.ilLDAPRoleGroupMappingSetting.php.

Referenced by read().

182  {
183  $this->member_attribute = $a_value;
184  }
+ Here is the caller graph for this function:

◆ setMemberISDN()

ilLDAPRoleGroupMappingSetting::setMemberISDN (   $a_value)

set Member Attribute Value is DN

Parameters
bool$a_value

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

Referenced by read().

200  {
201  $this->member_isdn = $a_value;
202  }
+ Here is the caller graph for this function:

◆ setRole()

ilLDAPRoleGroupMappingSetting::setRole (   $a_value)

set ILIAS Role Name id

Parameters
int$a_value

Definition at line 217 of file class.ilLDAPRoleGroupMappingSetting.php.

Referenced by read().

218  {
219  $this->role = $a_value;
220  }
+ Here is the caller graph for this function:

◆ setRoleByName()

ilLDAPRoleGroupMappingSetting::setRoleByName (   $a_value)

set ILIAS Role Name ilRbacReview $rbacreview

Parameters
string$a_value

Definition at line 238 of file class.ilLDAPRoleGroupMappingSetting.php.

References ilUtil\stripSlashes().

239  {
240  global $rbacreview;
241  $this->role = $rbacreview->roleExists(ilUtil::stripSlashes($a_value));
242  }
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
+ Here is the call graph for this function:

◆ setServerId()

ilLDAPRoleGroupMappingSetting::setServerId (   $a_value)

set server id

Parameters
int$a_valueserver id

Definition at line 127 of file class.ilLDAPRoleGroupMappingSetting.php.

Referenced by read().

128  {
129  $this->server_id = $a_value;
130  }
+ Here is the caller graph for this function:

◆ setURL()

ilLDAPRoleGroupMappingSetting::setURL (   $a_value)

set url

Parameters
string$a_valueurl

Definition at line 145 of file class.ilLDAPRoleGroupMappingSetting.php.

Referenced by read().

146  {
147  $this->url = $a_value;
148  }
+ Here is the caller graph for this function:

◆ update()

ilLDAPRoleGroupMappingSetting::update ( )

update mapping by id

Definition at line 60 of file class.ilLDAPRoleGroupMappingSetting.php.

References $query, $res, getDN(), getMappingId(), getMappingInfo(), getMappingInfoType(), getMemberAttribute(), getMemberISDN(), getRole(), getServerId(), and getURL().

61  {
62  $query = "UPDATE ldap_rg_mapping " .
63  "SET server_id = " . $this->db->quote($this->getServerId(), 'integer') . ", " .
64  "url = " . $this->db->quote($this->getURL(), 'text') . ", " .
65  "dn =" . $this->db->quote($this->getDN(), 'text') . ", " .
66  "member_attribute = " . $this->db->quote($this->getMemberAttribute(), 'text') . ", " .
67  "member_isdn = " . $this->db->quote($this->getMemberISDN(), 'integer') . ", " .
68  "role = " . $this->db->quote($this->getRole(), 'integer') . ", " .
69  "mapping_info = " . $this->db->quote($this->getMappingInfo(), 'text') . ", " .
70  "mapping_info_type = " . $this->db->quote($this->getMappingInfoType(), 'integer') . " " .
71  "WHERE mapping_id = " . $this->db->quote($this->getMappingId(), 'integer');
72  $res = $this->db->manipulate($query);
73  }
foreach($_POST as $key=> $value) $res
getMappingInfoType()
get Show Information also in the Repository/Personal Desktop
$query
getMemberISDN()
get Member Attribute Value is DN
+ Here is the call graph for this function:

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