ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
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.

References ILIAS\Modules\Test\Readable\$container.

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

Member Function Documentation

◆ objectId()

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

Definition at line 54 of file Readable.php.

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

54  : bool
55  {
56  return $this->references(($this->references_of)($obj_id));
57  }
references(array $references)
Definition: Readable.php:47
+ 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.

References $ref_id.

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

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
+ 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.

◆ $references_of

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

Definition at line 31 of file Readable.php.


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