ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 $DIC, and $ilDB.

20  {
21  global $DIC;
22 
23  $ilDB = $DIC['ilDB'];
24  $this->db = $ilDB;
25  $this->mapping_id = $a_mapping_id;
26  }
global $DIC
Definition: saml.php:7
global $ilDB

Member Function Documentation

◆ delete()

ilLDAPRoleGroupMappingSetting::delete ( )

delete mapping by id

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

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

53  {
54  $query = "DELETE FROM ldap_rg_mapping " .
55  "WHERE mapping_id = " . $this->db->quote($this->getMappingId(), 'integer');
56  $res = $this->db->manipulate($query);
57  }
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 156 of file class.ilLDAPRoleGroupMappingSetting.php.

Referenced by save(), and update().

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

◆ getMappingId()

ilLDAPRoleGroupMappingSetting::getMappingId ( )

get mapping id

Returns
int mapping id

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

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

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

◆ getMappingInfo()

ilLDAPRoleGroupMappingSetting::getMappingInfo ( )

get Information Text

Returns
string

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

Referenced by save(), and update().

255  {
256  return $this->mapping_info;
257  }
+ 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 272 of file class.ilLDAPRoleGroupMappingSetting.php.

Referenced by save(), and update().

273  {
274  return $this->mapping_info_type;
275  }
+ Here is the caller graph for this function:

◆ getMemberAttribute()

ilLDAPRoleGroupMappingSetting::getMemberAttribute ( )

get Group Member Attribute

Returns
string

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

Referenced by save(), and update().

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

◆ getMemberISDN()

ilLDAPRoleGroupMappingSetting::getMemberISDN ( )

get Member Attribute Value is DN

Returns
bool

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

Referenced by save(), and update().

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

◆ getRole()

ilLDAPRoleGroupMappingSetting::getRole ( )

get ILIAS Role Name id

Returns
int

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

Referenced by save(), and update().

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

◆ getRoleName()

ilLDAPRoleGroupMappingSetting::getRoleName ( )

get ILIAS Role Name type $ilObjDataCache

Returns
string

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

References $DIC.

230  {
231  global $DIC;
232 
233  $ilObjDataCache = $DIC['ilObjDataCache'];
234  return $ilObjDataCache->lookupTitle($this->role);
235  }
global $DIC
Definition: saml.php:7

◆ getServerId()

ilLDAPRoleGroupMappingSetting::getServerId ( )

get server id

Returns
int server id id

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

Referenced by save(), and update().

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

◆ getURL()

ilLDAPRoleGroupMappingSetting::getURL ( )

get url

Returns
string url

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

References $url.

Referenced by save(), and update().

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

◆ read()

ilLDAPRoleGroupMappingSetting::read ( )

read data from db

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

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

32  {
33  $query = "SELECT * FROM ldap_rg_mapping "
34  . "WHERE mapping_id = " . $this->db->quote($this->getMappingId(), 'integer');
35  $set = $this->db->query($query);
36  $rec = $this->db->fetchAssoc($set);
37 
38  $this->setMappingId($rec["mapping_id"]);
39  $this->setServerId($rec["server_id"]);
40  $this->setURL($rec["url"]);
41  $this->setDN($rec["dn"]);
42  $this->setMemberAttribute($rec["member_attribute"]);
43  $this->setMemberISDN($rec["member_isdn"]);
44  $this->setRole($rec["role"]);
45  $this->setMappingInfo($rec["mapping_info"]);
46  $this->setMappingInfoType($rec["mapping_info_type"]);
47  }
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 80 of file class.ilLDAPRoleGroupMappingSetting.php.

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

81  {
82  $this->setMappingId($this->db->nextId('ldap_rg_mapping'));
83  $query = "INSERT INTO ldap_rg_mapping (mapping_id,server_id,url,dn,member_attribute,member_isdn,role,mapping_info,mapping_info_type) " .
84  "VALUES ( " .
85  $this->db->quote($this->getMappingId(), 'integer') . ", " .
86  $this->db->quote($this->getServerId(), 'integer') . ", " .
87  $this->db->quote($this->getURL(), 'text') . ", " .
88  $this->db->quote($this->getDN(), 'text') . ", " .
89  $this->db->quote($this->getMemberAttribute(), 'text') . ", " .
90  $this->db->quote($this->getMemberISDN(), 'integer') . ", " .
91  $this->db->quote($this->getRole(), 'integer') . ", " .
92  $this->db->quote($this->getMappingInfo(), 'text') . ", " .
93  $this->db->quote($this->getMappingInfoType(), 'integer') .
94  ")";
95  $res = $this->db->manipulate($query);
96  }
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 165 of file class.ilLDAPRoleGroupMappingSetting.php.

Referenced by read().

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

◆ setMappingId()

ilLDAPRoleGroupMappingSetting::setMappingId (   $a_value)

set mapping id

Parameters
int$a_valuemapping id

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

Referenced by read(), and save().

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

◆ setMappingInfo()

ilLDAPRoleGroupMappingSetting::setMappingInfo (   $a_value)

set Information Text

Parameters
string$a_value

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

Referenced by read().

264  {
265  $this->mapping_info = $a_value;
266  }
+ 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 281 of file class.ilLDAPRoleGroupMappingSetting.php.

Referenced by read().

282  {
283  $this->mapping_info_type = $a_value;
284  }
+ Here is the caller graph for this function:

◆ setMemberAttribute()

ilLDAPRoleGroupMappingSetting::setMemberAttribute (   $a_value)

set Group Member Attribute

Parameters
string$a_value

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

Referenced by read().

184  {
185  $this->member_attribute = $a_value;
186  }
+ 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 201 of file class.ilLDAPRoleGroupMappingSetting.php.

Referenced by read().

202  {
203  $this->member_isdn = $a_value;
204  }
+ 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 219 of file class.ilLDAPRoleGroupMappingSetting.php.

Referenced by read().

220  {
221  $this->role = $a_value;
222  }
+ 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 242 of file class.ilLDAPRoleGroupMappingSetting.php.

References $DIC, and ilUtil\stripSlashes().

243  {
244  global $DIC;
245 
246  $rbacreview = $DIC['rbacreview'];
247  $this->role = $rbacreview->roleExists(ilUtil::stripSlashes($a_value));
248  }
global $DIC
Definition: saml.php:7
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 129 of file class.ilLDAPRoleGroupMappingSetting.php.

Referenced by read().

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

◆ setURL()

ilLDAPRoleGroupMappingSetting::setURL (   $a_value)

set url

Parameters
string$a_valueurl

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

Referenced by read().

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

◆ update()

ilLDAPRoleGroupMappingSetting::update ( )

update mapping by id

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

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

63  {
64  $query = "UPDATE ldap_rg_mapping " .
65  "SET server_id = " . $this->db->quote($this->getServerId(), 'integer') . ", " .
66  "url = " . $this->db->quote($this->getURL(), 'text') . ", " .
67  "dn =" . $this->db->quote($this->getDN(), 'text') . ", " .
68  "member_attribute = " . $this->db->quote($this->getMemberAttribute(), 'text') . ", " .
69  "member_isdn = " . $this->db->quote($this->getMemberISDN(), 'integer') . ", " .
70  "role = " . $this->db->quote($this->getRole(), 'integer') . ", " .
71  "mapping_info = " . $this->db->quote($this->getMappingInfo(), 'text') . ", " .
72  "mapping_info_type = " . $this->db->quote($this->getMappingInfoType(), 'integer') . " " .
73  "WHERE mapping_id = " . $this->db->quote($this->getMappingId(), 'integer');
74  $res = $this->db->manipulate($query);
75  }
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: