ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilLDAPRoleGroupMappingSetting Class Reference
+ Collaboration diagram for ilLDAPRoleGroupMappingSetting:

Public Member Functions

 __construct (int $a_mapping_id)
 
 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 (int $a_value)
 set mapping id More...
 
 getServerId ()
 get server id More...
 
 setServerId (int $a_value)
 set server id More...
 
 getURL ()
 get url More...
 
 setURL (string $a_value)
 set url More...
 
 getDN ()
 get group dn More...
 
 setDN (string $a_value)
 set group dn More...
 
 getMemberAttribute ()
 get Group Member Attribute More...
 
 setMemberAttribute (string $a_value)
 set Group Member Attribute More...
 
 getMemberISDN ()
 get Member Attribute Value is DN More...
 
 setMemberISDN (bool $a_value)
 set Member Attribute Value is DN More...
 
 getRole ()
 get ILIAS Role Name id More...
 
 setRole (int $a_value)
 set ILIAS Role Name id More...
 
 getRoleName ()
 get ILIAS Role Name More...
 
 setRoleByName (string $a_value)
 set ILIAS Role Name More...
 
 getMappingInfo ()
 get Information Text More...
 
 setMappingInfo (string $a_value)
 set Information Text More...
 
 getMappingInfoType ()
 get Show Information also in the Repository/Personal Desktop More...
 
 setMappingInfoType (bool $a_value)
 set Show Information also in the Repository/Personal Desktop More...
 

Private Attributes

ilDBInterface $db
 
ilObjectDataCache $ilObjDataCache
 
ilRbacReview $rbacreview
 
int $mapping_id
 
int $server_id
 
string $url
 
string $dn
 
string $member_attribute
 
bool $mapping_info_type
 
bool $member_isdn
 
int $role
 
string $mapping_info
 

Detailed Description

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

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

Constructor & Destructor Documentation

◆ __construct()

ilLDAPRoleGroupMappingSetting::__construct ( int  $a_mapping_id)

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

References $DIC.

42  {
43  global $DIC;
44 
45  $this->db = $DIC->database();
46  $this->ilObjDataCache = $DIC['ilObjDataCache'];
47  $this->rbacreview = $DIC['rbacreview'];
48  $this->mapping_id = $a_mapping_id;
49  }
global $DIC
Definition: feed.php:28

Member Function Documentation

◆ delete()

ilLDAPRoleGroupMappingSetting::delete ( )

delete mapping by id

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

References $query, and getMappingId().

74  : void
75  {
76  $query = "DELETE FROM ldap_rg_mapping " .
77  "WHERE mapping_id = " . $this->db->quote($this->getMappingId(), 'integer');
78  $this->db->manipulate($query);
79  }
$query
+ Here is the call graph for this function:

◆ getDN()

ilLDAPRoleGroupMappingSetting::getDN ( )

get group dn

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

References $dn.

Referenced by save(), and update().

177  : string
178  {
179  return $this->dn;
180  }
+ Here is the caller graph for this function:

◆ getMappingId()

ilLDAPRoleGroupMappingSetting::getMappingId ( )

get mapping id

Returns
int mapping id

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

References $mapping_id.

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

124  : int
125  {
126  return $this->mapping_id;
127  }
+ Here is the caller graph for this function:

◆ getMappingInfo()

ilLDAPRoleGroupMappingSetting::getMappingInfo ( )

get Information Text

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

References $mapping_info.

Referenced by save(), and update().

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

◆ getMappingInfoType()

ilLDAPRoleGroupMappingSetting::getMappingInfoType ( )

get Show Information also in the Repository/Personal Desktop

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

References $mapping_info_type.

Referenced by save(), and update().

274  : bool
275  {
277  }
+ Here is the caller graph for this function:

◆ getMemberAttribute()

ilLDAPRoleGroupMappingSetting::getMemberAttribute ( )

get Group Member Attribute

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

References $member_attribute.

Referenced by save(), and update().

193  : string
194  {
196  }
+ Here is the caller graph for this function:

◆ getMemberISDN()

ilLDAPRoleGroupMappingSetting::getMemberISDN ( )

get Member Attribute Value is DN

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

References $member_isdn.

Referenced by save(), and update().

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

◆ getRole()

ilLDAPRoleGroupMappingSetting::getRole ( )

get ILIAS Role Name id

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

References $role.

Referenced by save(), and update().

226  : int
227  {
228  return $this->role;
229  }
+ Here is the caller graph for this function:

◆ getRoleName()

ilLDAPRoleGroupMappingSetting::getRoleName ( )

get ILIAS Role Name

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

242  : string
243  {
244  return $this->ilObjDataCache->lookupTitle($this->role);
245  }

◆ getServerId()

ilLDAPRoleGroupMappingSetting::getServerId ( )

get server id

Returns
int server id id

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

References $server_id.

Referenced by save(), and update().

142  : int
143  {
144  return $this->server_id;
145  }
+ Here is the caller graph for this function:

◆ getURL()

ilLDAPRoleGroupMappingSetting::getURL ( )

get url

Returns
string url

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

References $url.

Referenced by save(), and update().

160  : string
161  {
162  return $this->url;
163  }
+ Here is the caller graph for this function:

◆ read()

ilLDAPRoleGroupMappingSetting::read ( )

read data from db

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

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

54  : void
55  {
56  $query = "SELECT * FROM ldap_rg_mapping "
57  . "WHERE mapping_id = " . $this->db->quote($this->getMappingId(), 'integer');
58  $set = $this->db->query($query);
59  $rec = $this->db->fetchAssoc($set);
60  $this->setMappingId((int) $rec["mapping_id"]);
61  $this->setServerId((int) $rec["server_id"]);
62  $this->setURL($rec["url"]);
63  $this->setDN($rec["dn"]);
64  $this->setMemberAttribute($rec["member_attribute"]);
65  $this->setMemberISDN((bool) $rec["member_isdn"]);
66  $this->setRole((int) $rec["role"]);
67  $this->setMappingInfo($rec["mapping_info"]);
68  $this->setMappingInfoType((bool) $rec["mapping_info_type"]);
69  }
setMemberISDN(bool $a_value)
set Member Attribute Value is DN
setMappingInfoType(bool $a_value)
set Show Information also in the Repository/Personal Desktop
setMappingInfo(string $a_value)
set Information Text
$query
setMemberAttribute(string $a_value)
set Group Member Attribute
setRole(int $a_value)
set ILIAS Role Name id
+ Here is the call graph for this function:

◆ save()

ilLDAPRoleGroupMappingSetting::save ( )

create new mapping

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

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

102  : void
103  {
104  $this->setMappingId($this->db->nextId('ldap_rg_mapping'));
105  $query = "INSERT INTO ldap_rg_mapping (mapping_id,server_id,url,dn,member_attribute,member_isdn,role,mapping_info,mapping_info_type) " .
106  "VALUES ( " .
107  $this->db->quote($this->getMappingId(), 'integer') . ", " .
108  $this->db->quote($this->getServerId(), 'integer') . ", " .
109  $this->db->quote($this->getURL(), 'text') . ", " .
110  $this->db->quote($this->getDN(), 'text') . ", " .
111  $this->db->quote($this->getMemberAttribute(), 'text') . ", " .
112  $this->db->quote($this->getMemberISDN(), 'integer') . ", " .
113  $this->db->quote($this->getRole(), 'integer') . ", " .
114  $this->db->quote($this->getMappingInfo(), 'text') . ", " .
115  $this->db->quote($this->getMappingInfoType(), 'integer') .
116  ")";
117  $this->db->manipulate($query);
118  }
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 ( string  $a_value)

set group dn

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

Referenced by read().

185  : void
186  {
187  $this->dn = $a_value;
188  }
+ Here is the caller graph for this function:

◆ setMappingId()

ilLDAPRoleGroupMappingSetting::setMappingId ( int  $a_value)

set mapping id

Parameters
int$a_valuemapping id

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

Referenced by read(), and save().

133  : void
134  {
135  $this->mapping_id = $a_value;
136  }
+ Here is the caller graph for this function:

◆ setMappingInfo()

ilLDAPRoleGroupMappingSetting::setMappingInfo ( string  $a_value)

set Information Text

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

Referenced by read().

266  : void
267  {
268  $this->mapping_info = $a_value;
269  }
+ Here is the caller graph for this function:

◆ setMappingInfoType()

ilLDAPRoleGroupMappingSetting::setMappingInfoType ( bool  $a_value)

set Show Information also in the Repository/Personal Desktop

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

Referenced by read().

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

◆ setMemberAttribute()

ilLDAPRoleGroupMappingSetting::setMemberAttribute ( string  $a_value)

set Group Member Attribute

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

Referenced by read().

201  : void
202  {
203  $this->member_attribute = $a_value;
204  }
+ Here is the caller graph for this function:

◆ setMemberISDN()

ilLDAPRoleGroupMappingSetting::setMemberISDN ( bool  $a_value)

set Member Attribute Value is DN

Parameters
bool$a_value

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

Referenced by read().

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

◆ setRole()

ilLDAPRoleGroupMappingSetting::setRole ( int  $a_value)

set ILIAS Role Name id

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

Referenced by read().

234  : void
235  {
236  $this->role = $a_value;
237  }
+ Here is the caller graph for this function:

◆ setRoleByName()

ilLDAPRoleGroupMappingSetting::setRoleByName ( string  $a_value)

set ILIAS Role Name

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

References ilUtil\stripSlashes().

250  : void
251  {
252  $this->role = $this->rbacreview->roleExists(ilUtil::stripSlashes($a_value));
253  }
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
+ Here is the call graph for this function:

◆ setServerId()

ilLDAPRoleGroupMappingSetting::setServerId ( int  $a_value)

set server id

Parameters
int$a_valueserver id

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

Referenced by read().

151  : void
152  {
153  $this->server_id = $a_value;
154  }
+ Here is the caller graph for this function:

◆ setURL()

ilLDAPRoleGroupMappingSetting::setURL ( string  $a_value)

set url

Parameters
string$a_valueurl

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

Referenced by read().

169  : void
170  {
171  $this->url = $a_value;
172  }
+ Here is the caller graph for this function:

◆ update()

ilLDAPRoleGroupMappingSetting::update ( )

update mapping by id

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

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

84  : void
85  {
86  $query = "UPDATE ldap_rg_mapping " .
87  "SET server_id = " . $this->db->quote($this->getServerId(), 'integer') . ", " .
88  "url = " . $this->db->quote($this->getURL(), 'text') . ", " .
89  "dn =" . $this->db->quote($this->getDN(), 'text') . ", " .
90  "member_attribute = " . $this->db->quote($this->getMemberAttribute(), 'text') . ", " .
91  "member_isdn = " . $this->db->quote($this->getMemberISDN(), 'integer') . ", " .
92  "role = " . $this->db->quote($this->getRole(), 'integer') . ", " .
93  "mapping_info = " . $this->db->quote($this->getMappingInfo(), 'text') . ", " .
94  "mapping_info_type = " . $this->db->quote($this->getMappingInfoType(), 'integer') . " " .
95  "WHERE mapping_id = " . $this->db->quote($this->getMappingId(), 'integer');
96  $this->db->manipulate($query);
97  }
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:

Field Documentation

◆ $db

ilDBInterface ilLDAPRoleGroupMappingSetting::$db
private

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

◆ $dn

string ilLDAPRoleGroupMappingSetting::$dn
private

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

Referenced by getDN().

◆ $ilObjDataCache

ilObjectDataCache ilLDAPRoleGroupMappingSetting::$ilObjDataCache
private

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

◆ $mapping_id

int ilLDAPRoleGroupMappingSetting::$mapping_id
private

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

Referenced by getMappingId().

◆ $mapping_info

string ilLDAPRoleGroupMappingSetting::$mapping_info
private

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

Referenced by getMappingInfo().

◆ $mapping_info_type

bool ilLDAPRoleGroupMappingSetting::$mapping_info_type
private

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

Referenced by getMappingInfoType().

◆ $member_attribute

string ilLDAPRoleGroupMappingSetting::$member_attribute
private

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

Referenced by getMemberAttribute().

◆ $member_isdn

bool ilLDAPRoleGroupMappingSetting::$member_isdn
private

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

Referenced by getMemberISDN().

◆ $rbacreview

ilRbacReview ilLDAPRoleGroupMappingSetting::$rbacreview
private

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

◆ $role

int ilLDAPRoleGroupMappingSetting::$role
private

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

Referenced by getRole().

◆ $server_id

int ilLDAPRoleGroupMappingSetting::$server_id
private

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

Referenced by getServerId().

◆ $url

string ilLDAPRoleGroupMappingSetting::$url
private

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

Referenced by getURL().


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