ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\Test\Access\Readable Class Reference
+ Collaboration diagram for ILIAS\Test\Access\Readable:

Public Member Functions

 __construct (private readonly ilAccessHandler $access, $references_of=[ilObject::class, '_getAllReferences'], ?Incident $incident=null)
 
 references (array $references)
 
 objectId (int $obj_id)
 

Private Attributes

readonly Closure $references_of
 
readonly Incident $incident
 

Detailed Description

Definition at line 27 of file Readable.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Test\Access\Readable::__construct ( private readonly ilAccessHandler  $access,
  $references_of = [ilObject::class, '_getAllReferences'],
?Incident  $incident = null 
)

Definition at line 33 of file Readable.php.

37 {
38 $this->references_of = Closure::fromCallable($references_of);
39 $this->incident = $incident ?? new Incident();
40 }
readonly Incident $incident
Definition: Readable.php:31
readonly Closure $references_of
Definition: Readable.php:30

References ILIAS\Test\Access\Readable\$incident, and ILIAS\Test\Access\Readable\$references_of.

Member Function Documentation

◆ objectId()

ILIAS\Test\Access\Readable::objectId ( int  $obj_id)

Definition at line 52 of file Readable.php.

52 : bool
53 {
54 return $this->references(($this->references_of)($obj_id));
55 }
references(array $references)
Definition: Readable.php:45

References ILIAS\Test\Access\Readable\references().

+ Here is the call graph for this function:

◆ references()

ILIAS\Test\Access\Readable::references ( array  $references)
Parameters
int[]$references

Definition at line 45 of file Readable.php.

45 : bool
46 {
47 return $this->incident->any(fn(int $ref_id): bool => (
48 $this->access->checkAccess('read', '', $ref_id)
49 ), $references);
50 }
$ref_id
Definition: ltiauth.php:66

References $ref_id, and ILIAS\Repository\access().

Referenced by ILIAS\Test\Access\Readable\objectId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $incident

readonly Incident ILIAS\Test\Access\Readable::$incident
private

Definition at line 31 of file Readable.php.

Referenced by ILIAS\Test\Access\Readable\__construct().

◆ $references_of

readonly Closure ILIAS\Test\Access\Readable::$references_of
private

Definition at line 30 of file Readable.php.

Referenced by ILIAS\Test\Access\Readable\__construct().


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