ILIAS  release_8 Revision v8.24
ILIAS\Modules\Test\Readable Class Reference
+ Collaboration diagram for ILIAS\Modules\Test\Readable:

Public Member Functions

 __construct (Container $container, $references_of=[ilObject::class, '_getAllReferences'], Incident $incident=null)
 
 references (array $references)
 
 objectId (int $obj_id)
 

Private Attributes

Container $container
 
Closure $references_of
 
Incident $incident
 

Detailed Description

Definition at line 27 of file Readable.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Modules\Test\Readable::__construct ( Container  $container,
  $references_of = [ilObject::class, '_getAllReferences'],
Incident  $incident = null 
)

Definition at line 34 of file Readable.php.

38 {
39 $this->container = $container;
40 $this->references_of = Closure::fromCallable($references_of);
41 $this->incident = $incident ?? new Incident();
42 }

References ILIAS\Modules\Test\Readable\$container, ILIAS\Modules\Test\Readable\$incident, and ILIAS\Modules\Test\Readable\$references_of.

Member Function Documentation

◆ objectId()

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

Definition at line 54 of file Readable.php.

54 : bool
55 {
56 return $this->references(($this->references_of)($obj_id));
57 }
references(array $references)
Definition: Readable.php:47

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

+ Here is the call graph for this function:

◆ references()

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

Definition at line 47 of file Readable.php.

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

References $ref_id.

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

+ Here is the caller graph for this function:

Field Documentation

◆ $container

Container ILIAS\Modules\Test\Readable::$container
private

Definition at line 29 of file Readable.php.

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

◆ $incident

Incident ILIAS\Modules\Test\Readable::$incident
private

Definition at line 32 of file Readable.php.

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

◆ $references_of

Closure ILIAS\Modules\Test\Readable::$references_of
private

Definition at line 31 of file Readable.php.

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


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