ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilContainerReferenceAccess Class Reference
+ Inheritance diagram for ilContainerReferenceAccess:
+ Collaboration diagram for ilContainerReferenceAccess:

Public Member Functions

 _checkAccess ($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id="")
 checks wether a user may invoke a command or not (this method is called by ilAccessHandler::checkAccess)
- Public Member Functions inherited from ilObjectAccess
 _checkCondition ($a_obj_id, $a_operator, $a_value, $a_usr_id=0)
 check condition
 _getCommands ()
 get commands
 _checkGoto ($a_target)
 check whether goto script will succeed

Static Public Member Functions

static _isAccessible ($a_ref_id)
 Check if target is accessible and not deleted.

Detailed Description

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

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

Member Function Documentation

ilContainerReferenceAccess::_checkAccess (   $a_cmd,
  $a_permission,
  $a_ref_id,
  $a_obj_id,
  $a_user_id = "" 
)

checks wether a user may invoke a command or not (this method is called by ilAccessHandler::checkAccess)

Parameters
string$a_cmdcommand (not permission!)
string$a_permissionpermission
int$a_ref_idreference id
int$a_obj_idobject id
int$a_user_iduser id (if not provided, current user is taken)
Returns
boolean true, if everything is ok

Reimplemented from ilObjectAccess.

Reimplemented in ilObjCourseReferenceAccess.

Definition at line 50 of file class.ilContainerReferenceAccess.php.

References $lng.

{
global $ilUser, $lng, $rbacsystem, $ilAccess, $ilias;
if ($a_user_id == "")
{
$a_user_id = $ilUser->getId();
}
return true;
}
static ilContainerReferenceAccess::_isAccessible (   $a_ref_id)
static

Check if target is accessible and not deleted.

Parameters
int$a_ref_idref_id
Returns
bool

Definition at line 68 of file class.ilContainerReferenceAccess.php.

References $ilDB, $query, $res, $row, $target_id, $target_ref_id, ilObject\_getAllReferences(), ilObject\_lookupObjId(), and DB_FETCHMODE_OBJECT.

Referenced by ilRepositoryExplorer\isClickable().

{
global $ilDB,$tree;
$obj_id = ilObject::_lookupObjId($a_ref_id);
$query = "SELECT target_obj_id FROM container_reference ".
"WHERE obj_id = ".$ilDB->quote($obj_id,'integer')." ";
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$target_id = $row->target_obj_id;
}
$target_ref_id = current($target_ref_ids);
return !$tree->isDeleted($target_ref_id);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


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