Permission checker for terms.
More...
Permission checker for terms.
- Author
- Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
- Version
- $Id$
Definition at line 12 of file class.ilGlossaryTermPermission.php.
◆ __construct()
ilGlossaryTermPermission::__construct |
( |
| ) |
|
|
private |
◆ checkPermission()
ilGlossaryTermPermission::checkPermission |
( |
|
$a_perm, |
|
|
|
$a_term_id |
|
) |
| |
Check permission.
- Parameters
-
string | $a_perm | |
int | $a_term_id | |
- Returns
- bool
Definition at line 68 of file class.ilGlossaryTermPermission.php.
69 {
70 $this->log->debug("check permission ".$a_perm." for ".$a_term_id.".");
72 if (!isset($this->permission[$a_perm][$glo_id]))
73 {
74 $this->permission[$a_perm][$glo_id] = false;
75 $this->log->debug("...checking references");
77 {
78 $this->log->debug(
"...".
$ref_id);
79 if ($this->permission[$a_perm][$glo_id] == true)
80 {
81 continue;
82 }
83 if ($this->access->checkAccess($a_perm,
"",
$ref_id))
84 {
85 $this->permission[$a_perm][$glo_id] = true;
86 }
87 }
88 }
89 $this->log->debug("...return ".((int) $this->permission[$a_perm][$glo_id]));
90 return $this->permission[$a_perm][$glo_id];
91 }
getGlossaryIdForTerm($a_term_id)
Get glossary for term.
static _getAllReferences($a_id)
get all reference ids of object
References $ref_id, ilObject\_getAllReferences(), and getGlossaryIdForTerm().
◆ getGlossaryIdForTerm()
ilGlossaryTermPermission::getGlossaryIdForTerm |
( |
|
$a_term_id | ) |
|
|
protected |
Get glossary for term.
- Parameters
-
- Returns
- int
Definition at line 99 of file class.ilGlossaryTermPermission.php.
100 {
101 if (!isset($this->glossary_id[$a_term_id]))
102 {
103 include_once("./Modules/Glossary/classes/class.ilGlossaryTerm.php");
105 }
106 return $this->glossary_id[$a_term_id];
107 }
static _lookGlossaryID($term_id)
get glossary id form term id
References ilGlossaryTerm\_lookGlossaryID().
Referenced by checkPermission().
◆ getInstance()
static ilGlossaryTermPermission::getInstance |
( |
| ) |
|
|
static |
◆ $access
ilGlossaryTermPermission::$access |
|
protected |
◆ $glossary_id
ilGlossaryTermPermission::$glossary_id = array() |
|
protected |
◆ $log
ilGlossaryTermPermission::$log |
|
protected |
◆ $permission
ilGlossaryTermPermission::$permission = array() |
|
protected |
◆ $user
ilGlossaryTermPermission::$user |
|
protected |
The documentation for this class was generated from the following file: