ILIAS  release_7 Revision v7.30-3-g800a261c036
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
 
 $references_of
 
 $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 36 of file Readable.php.

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

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

Member Function Documentation

◆ objectId()

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

Definition at line 56 of file Readable.php.

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

56  : bool
57  {
58  return $this->references(array_map('intval', ($this->references_of)($obj_id)));
59  }
references(array $references)
Definition: Readable.php:49
+ Here is the call graph for this function:

◆ references()

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

Definition at line 49 of file Readable.php.

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

49  : bool
50  {
51  return $this->incident->any(function (int $ref_id): bool {
52  return $this->container->access()->checkAccess('read', '', $ref_id);
53  }, $references);
54  }
+ Here is the caller graph for this function:

Field Documentation

◆ $container

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

Definition at line 30 of file Readable.php.

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

◆ $incident

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

Definition at line 34 of file Readable.php.

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

◆ $references_of

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

Definition at line 32 of file Readable.php.

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


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