ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
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 ( )

Definition at line 67 of file Provide.php.

References $container, and $id.

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

67  : self
68  {
69  return new self($this->id, $this->internal, $this->container, 'writable-document');
70  }
$container
Definition: wac.php:36
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the caller graph for this function:

◆ document()

ILIAS\LegalDocuments\Provide::document ( )

Definition at line 57 of file Provide.php.

References ILIAS\LegalDocuments\Provide\error().

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

57  : ProvideDocument
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
+ 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.

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

82  : void
83  {
84  throw new Exception($message);
85  }
$message
Definition: xapiexit.php:31
+ Here is the caller graph for this function:

◆ history()

ILIAS\LegalDocuments\Provide::history ( )

Definition at line 62 of file Provide.php.

References ILIAS\LegalDocuments\Provide\error().

62  : ProvideHistory
63  {
64  return $this->internal->get('history', $this->id) ?? $this->error('No history defined for: ' . $this->id);
65  }
error(string $message)
Definition: Provide.php:82
+ Here is the call graph for this function:

◆ id()

ILIAS\LegalDocuments\Provide::id ( )

Definition at line 77 of file Provide.php.

References $id.

77  : string
78  {
79  return $this->id;
80  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

◆ publicApi()

ILIAS\LegalDocuments\Provide::publicApi ( )

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 ( )

Definition at line 49 of file Provide.php.

References null.

49  : ProvidePublicPage
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  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ withdrawal()

ILIAS\LegalDocuments\Provide::withdrawal ( )

Definition at line 41 of file Provide.php.

References null.

41  : ProvideWithdrawal
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  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

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