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

Public Member Functions

 __construct (private readonly string $id, private readonly Internal $internal, private readonly Container $container, private readonly string $document_key='document')
 
 withdrawal ()
 
 publicPage ()
 
 document ()
 
 history ()
 
 allowEditing ()
 
 publicApi ()
 
 id ()
 

Private Member Functions

 error (string $message)
 

Detailed Description

Definition at line 31 of file Provide.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\LegalDocuments\Provide::__construct ( private readonly string  $id,
private readonly Internal  $internal,
private readonly Container  $container,
private readonly string  $document_key = 'document' 
)

Definition at line 33 of file Provide.php.

38 {
39 }

Member Function Documentation

◆ allowEditing()

ILIAS\LegalDocuments\Provide::allowEditing ( )

Reimplemented in ILIAS\LegalDocuments\LazyProvide.

Definition at line 67 of file Provide.php.

67 : self
68 {
69 return new self($this->id, $this->internal, $this->container, 'writable-document');
70 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
$container
@noRector
Definition: wac.php:37

References $container, and $id.

Referenced by ILIAS\LegalDocuments\Config\legalDocuments().

+ Here is the caller graph for this function:

◆ document()

ILIAS\LegalDocuments\Provide::document ( )

Reimplemented in ILIAS\LegalDocuments\LazyProvide.

Definition at line 57 of file Provide.php.

58 {
59 return $this->internal->get($this->document_key, $this->id) ?? $this->error('No documents defined for: ' . $this->id);
60 }
error(string $message)
Definition: Provide.php:82

References ILIAS\LegalDocuments\Provide\error().

Referenced by ILIAS\DataProtection\Consumer\showMatchingDocument(), and ILIAS\LegalDocuments\Provide\ProvideHistory\table().

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

◆ error()

ILIAS\LegalDocuments\Provide::error ( string  $message)
private

Definition at line 82 of file Provide.php.

82 : void
83 {
84 throw new Exception($message);
85 }
$message
Definition: xapiexit.php:31

References $message.

Referenced by ILIAS\LegalDocuments\Provide\document(), and ILIAS\LegalDocuments\Provide\history().

+ Here is the caller graph for this function:

◆ history()

ILIAS\LegalDocuments\Provide::history ( )

Reimplemented in ILIAS\LegalDocuments\LazyProvide.

Definition at line 62 of file Provide.php.

63 {
64 return $this->internal->get('history', $this->id) ?? $this->error('No history defined for: ' . $this->id);
65 }

References ILIAS\LegalDocuments\Provide\error().

+ Here is the call graph for this function:

◆ id()

ILIAS\LegalDocuments\Provide::id ( )

Reimplemented in ILIAS\LegalDocuments\LazyProvide.

Definition at line 77 of file Provide.php.

77 : string
78 {
79 return $this->id;
80 }

References $id.

◆ publicApi()

ILIAS\LegalDocuments\Provide::publicApi ( )

Reimplemented in ILIAS\LegalDocuments\LazyProvide.

Definition at line 72 of file Provide.php.

72 : ?PublicApi
73 {
74 return $this->internal->get('public-api', $this->id);
75 }

◆ publicPage()

ILIAS\LegalDocuments\Provide::publicPage ( )

Reimplemented in ILIAS\LegalDocuments\LazyProvide.

Definition at line 49 of file Provide.php.

50 {
51 if (null === $this->internal->get('public-page', $this->id)) {
52 throw new Exception('No agreement defined for: ' . $this->id);
53 }
54 return new ProvidePublicPage($this->id, $this->container->ctrl());
55 }

◆ withdrawal()

ILIAS\LegalDocuments\Provide::withdrawal ( )

Reimplemented in ILIAS\LegalDocuments\LazyProvide.

Definition at line 41 of file Provide.php.

42 {
43 if (null === $this->internal->get('withdraw', $this->id)) {
44 throw new Exception('No withdrawal process defined for: ' . $this->id);
45 }
46 return new ProvideWithdrawal($this->id, $this->container->ctrl(), $this->container['ilAuthSession']);
47 }

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