ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\PublicApi Class Reference
+ Inheritance diagram for ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\PublicApi:
+ Collaboration diagram for ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\PublicApi:

Public Member Functions

 __construct (private readonly bool $active, private readonly Closure $build_user)
 
 active ()
 Returns wether or not the corresponding consumer is active. More...
 
 agreed (ilObjUser $user)
 
 agreedToCurrentlyMatchingDocument (ilObjUser $user)
 
 everAgreed (ilObjUser $user)
 
 canAgree (ilObjUser $user)
 
 needsToAgree (ilObjUser $user)
 
 agreeDate (ilObjUser $user)
 
 active ()
 
 agreed (ilObjUser $user)
 

Private Member Functions

 user (ilObjUser $user)
 

Private Attributes

readonly WeakMap $cache
 

Detailed Description

Definition at line 30 of file PublicApi.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\PublicApi::__construct ( private readonly bool  $active,
private readonly Closure  $build_user 
)

Definition at line 37 of file PublicApi.php.

38 {
39 $this->cache = new WeakMap();
40 }

Member Function Documentation

◆ active()

ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\PublicApi::active ( )

Returns wether or not the corresponding consumer is active.

Please note that this doesn't influence the other methods.

Implements ILIAS\LegalDocuments\ConsumerSlots\PublicApi.

Definition at line 46 of file PublicApi.php.

46 : bool
47 {
48 return $this->active;
49 }

◆ agreed()

ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\PublicApi::agreed ( ilObjUser  $user)

Implements ILIAS\LegalDocuments\ConsumerSlots\PublicApi.

Definition at line 51 of file PublicApi.php.

51 : bool
52 {
53 return $this->everAgreed($user);
54 }

References ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\PublicApi\everAgreed().

+ Here is the call graph for this function:

◆ agreeDate()

ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\PublicApi::agreeDate ( ilObjUser  $user)

Definition at line 77 of file PublicApi.php.

77 : ?DateTimeImmutable
78 {
79 return $this->user($user)->agreeDate()->value();
80 }

References ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\PublicApi\user().

+ Here is the call graph for this function:

◆ agreedToCurrentlyMatchingDocument()

ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\PublicApi::agreedToCurrentlyMatchingDocument ( ilObjUser  $user)

Definition at line 56 of file PublicApi.php.

56 : bool
57 {
58 return !$this->user($user)->needsToAcceptNewDocument();
59 }

References ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\PublicApi\user().

+ Here is the call graph for this function:

◆ canAgree()

ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\PublicApi::canAgree ( ilObjUser  $user)

Definition at line 66 of file PublicApi.php.

66 : bool
67 {
68 return !$this->user($user)->cannotAgree();
69 }

References ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\PublicApi\user().

Referenced by ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\PublicApi\needsToAgree().

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

◆ everAgreed()

ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\PublicApi::everAgreed ( ilObjUser  $user)

Definition at line 61 of file PublicApi.php.

61 : bool
62 {
63 return !$this->user($user)->neverAgreed();
64 }

References ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\PublicApi\user().

Referenced by ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\PublicApi\agreed().

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

◆ needsToAgree()

ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\PublicApi::needsToAgree ( ilObjUser  $user)

Definition at line 71 of file PublicApi.php.

71 : bool
72 {
73 return $this->canAgree($user)
74 && $this->user($user)->needsToAcceptNewDocument();
75 }

References ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\PublicApi\canAgree(), and ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\PublicApi\user().

+ Here is the call graph for this function:

◆ user()

ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\PublicApi::user ( ilObjUser  $user)
private

Field Documentation

◆ $cache

readonly WeakMap ILIAS\LegalDocuments\ConsumerToolbox\ConsumerSlots\PublicApi::$cache
private

Definition at line 35 of file PublicApi.php.


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