ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
ilContainerLocalProfiles Class Reference

Local competence profiles of a container. More...

+ Collaboration diagram for ilContainerLocalProfiles:

Public Member Functions

 __construct (int $a_obj_id)
 Constructor. More...
 
 getProfiles ()
 Get profiles. More...
 

Protected Member Functions

 setObjId (int $a_obj_id)
 Set object id. More...
 
 getObjId ()
 Get object id. More...
 
 setMemberRoleId ()
 Set member role id of object. More...
 
 getMemberRoleId ()
 Get member role id of object. More...
 
 read ()
 Read. More...
 

Protected Attributes

 $db
 
 $profiles = array()
 
 $obj_id
 
 $mem_rol_id
 

Detailed Description

Local competence profiles of a container.

Author
Thomas Famula famul.nosp@m.a@le.nosp@m.ifos..nosp@m.de

Definition at line 10 of file class.ilContainerLocalProfiles.php.

Constructor & Destructor Documentation

◆ __construct()

ilContainerLocalProfiles::__construct ( int  $a_obj_id)

Constructor.

Parameters
int$a_obj_id

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

References $DIC, getObjId(), read(), setMemberRoleId(), and setObjId().

38  {
39  global $DIC;
40 
41  $this->db = $DIC->database();
42  $this->setObjId($a_obj_id);
43 
44  if ($this->getObjId() > 0) {
45  $this->setMemberRoleId();
46  $this->read();
47  }
48  }
setObjId(int $a_obj_id)
Set object id.
global $DIC
Definition: goto.php:24
setMemberRoleId()
Set member role id of object.
+ Here is the call graph for this function:

Member Function Documentation

◆ getMemberRoleId()

ilContainerLocalProfiles::getMemberRoleId ( )
protected

Get member role id of object.

Returns
int member role id

Definition at line 87 of file class.ilContainerLocalProfiles.php.

References $mem_rol_id.

87  : int
88  {
89  return $this->mem_rol_id;
90  }

◆ getObjId()

ilContainerLocalProfiles::getObjId ( )
protected

Get object id.

Returns
int object id

Definition at line 65 of file class.ilContainerLocalProfiles.php.

References $obj_id.

Referenced by __construct(), and setMemberRoleId().

65  : int
66  {
67  return $this->obj_id;
68  }
+ Here is the caller graph for this function:

◆ getProfiles()

ilContainerLocalProfiles::getProfiles ( )

Get profiles.

Returns
array

Definition at line 97 of file class.ilContainerLocalProfiles.php.

References $profiles.

Referenced by ilPersonalSkillsGUI\setObjectSkillProfiles().

+ Here is the caller graph for this function:

◆ read()

ilContainerLocalProfiles::read ( )
protected

Read.

Definition at line 105 of file class.ilContainerLocalProfiles.php.

References $db.

Referenced by __construct().

106  {
107  $db = $this->db;
108 
109  $this->profiles = array();
110  $set = $db->query(
111  "SELECT spr.profile_id, spr.role_id, sp.title FROM skl_profile_role spr INNER JOIN skl_profile sp " .
112  " ON spr.profile_id = sp.id " .
113  " WHERE sp.ref_id <> 0 " .
114  " AND role_id = " . $db->quote($this->getMemberRoleId(), "integer")
115  );
116  while ($rec = $db->fetchAssoc($set)) {
117  $this->profiles[$rec["profile_id"]] = $rec;
118  }
119  }
+ Here is the caller graph for this function:

◆ setMemberRoleId()

ilContainerLocalProfiles::setMemberRoleId ( )
protected

Set member role id of object.

Parameters
int$a_obj_idobject id

Definition at line 75 of file class.ilContainerLocalProfiles.php.

References ilObject\_getAllReferences(), ilParticipants\getDefaultMemberRole(), and getObjId().

Referenced by __construct().

76  {
77  $refs = ilObject::_getAllReferences($this->getObjId());
78  $ref_id = end($refs);
79  $this->mem_rol_id = ilParticipants::getDefaultMemberRole($ref_id);
80  }
static getDefaultMemberRole($a_ref_id)
static _getAllReferences($a_id)
get all reference ids of object
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setObjId()

ilContainerLocalProfiles::setObjId ( int  $a_obj_id)
protected

Set object id.

Parameters
int$a_obj_idobject id

Definition at line 55 of file class.ilContainerLocalProfiles.php.

Referenced by __construct().

56  {
57  $this->obj_id = $a_obj_id;
58  }
+ Here is the caller graph for this function:

Field Documentation

◆ $db

ilContainerLocalProfiles::$db
protected

Definition at line 15 of file class.ilContainerLocalProfiles.php.

Referenced by read().

◆ $mem_rol_id

int ilContainerLocalProfiles::$mem_rol_id
protected

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

Referenced by getMemberRoleId().

◆ $obj_id

ilContainerLocalProfiles::$obj_id
protected

Definition at line 25 of file class.ilContainerLocalProfiles.php.

Referenced by getObjId().

◆ $profiles

ilContainerLocalProfiles::$profiles = array()
protected

Definition at line 20 of file class.ilContainerLocalProfiles.php.

Referenced by getProfiles().


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