ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilLDAPRoleGroupMappingSetting Class Reference
+ Collaboration diagram for ilLDAPRoleGroupMappingSetting:

Public Member Functions

 __construct ($a_mapping_id)
 constructor @global 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 @global type $ilObjDataCache More...
 
 setRoleByName ($a_value)
 set ILIAS Role Name @global 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 @global ilDB $ilDB

Parameters
int$a_mapping_id

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

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

References $DIC, and $ilDB.

Member Function Documentation

◆ delete()

ilLDAPRoleGroupMappingSetting::delete ( )

delete mapping by id

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

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 }
$query
foreach($_POST as $key=> $value) $res

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

+ 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.

157 {
158 return $this->dn;
159 }

Referenced by save(), and update().

+ 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.

103 {
104 return $this->mapping_id;
105 }

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

+ 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.

255 {
256 return $this->mapping_info;
257 }

Referenced by save(), and update().

+ 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.

273 {
274 return $this->mapping_info_type;
275 }

Referenced by save(), and update().

+ 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.

175 {
176 return $this->member_attribute;
177 }

Referenced by save(), and update().

+ 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.

193 {
194 return $this->member_isdn;
195 }

Referenced by save(), and update().

+ 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.

211 {
212 return $this->role;
213 }

Referenced by save(), and update().

+ Here is the caller graph for this function:

◆ getRoleName()

ilLDAPRoleGroupMappingSetting::getRoleName ( )

get ILIAS Role Name @global type $ilObjDataCache

Returns
string

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

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

References $DIC.

◆ getServerId()

ilLDAPRoleGroupMappingSetting::getServerId ( )

get server id

Returns
int server id id

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

121 {
122 return $this->server_id;
123 }

Referenced by save(), and update().

+ 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.

139 {
140 return $this->url;
141 }
$url

References $url.

Referenced by save(), and update().

+ Here is the caller graph for this function:

◆ read()

ilLDAPRoleGroupMappingSetting::read ( )

read data from db

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

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 }
setMemberAttribute($a_value)
set Group Member Attribute
setMappingInfoType($a_value)
set Show Information also in the Repository/Personal Desktop
setMemberISDN($a_value)
set Member Attribute Value is DN

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

+ Here is the call graph for this function:

◆ save()

ilLDAPRoleGroupMappingSetting::save ( )

create new mapping

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

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 }
getMappingInfoType()
get Show Information also in the Repository/Personal Desktop
getMemberISDN()
get Member Attribute Value is DN

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

+ 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.

166 {
167 $this->dn = $a_value;
168 }

Referenced by read().

+ 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.

112 {
113 $this->mapping_id = $a_value;
114 }

Referenced by read(), and save().

+ 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.

264 {
265 $this->mapping_info = $a_value;
266 }

Referenced by read().

+ 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.

282 {
283 $this->mapping_info_type = $a_value;
284 }

Referenced by read().

+ 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.

184 {
185 $this->member_attribute = $a_value;
186 }

Referenced by read().

+ 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.

202 {
203 $this->member_isdn = $a_value;
204 }

Referenced by read().

+ 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.

220 {
221 $this->role = $a_value;
222 }

Referenced by read().

+ Here is the caller graph for this function:

◆ setRoleByName()

ilLDAPRoleGroupMappingSetting::setRoleByName (   $a_value)

set ILIAS Role Name @global ilRbacReview $rbacreview

Parameters
string$a_value

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

243 {
244 global $DIC;
245
246 $rbacreview = $DIC['rbacreview'];
247 $this->role = $rbacreview->roleExists(ilUtil::stripSlashes($a_value));
248 }
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

References $DIC, and ilUtil\stripSlashes().

+ 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.

130 {
131 $this->server_id = $a_value;
132 }

Referenced by read().

+ 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.

148 {
149 $this->url = $a_value;
150 }

Referenced by read().

+ Here is the caller graph for this function:

◆ update()

ilLDAPRoleGroupMappingSetting::update ( )

update mapping by id

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

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 }

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

+ Here is the call graph for this function:

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