ILIAS  trunk Revision v11.0_alpha-2645-g16283d3b3f8
ILIAS\LegalDocuments\SlotConstructor Class Reference
+ Collaboration diagram for ILIAS\LegalDocuments\SlotConstructor:

Public Member Functions

 __construct (private readonly string $id, private readonly Container $container, private readonly UserAction $action)
 
 id ()
 
 history (ProvideDocument $document)
 
 document (DocumentRepository $document_repository, SelectionMap $conditions, array $content_as_component)
 
 documentRepository ()
 
 readOnlyDocuments (DocumentRepository $document_repository)
 
 withdrawalFinished (Closure $finished)
 

Detailed Description

Definition at line 35 of file SlotConstructor.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\LegalDocuments\SlotConstructor::__construct ( private readonly string  $id,
private readonly Container  $container,
private readonly UserAction  $action 
)

Definition at line 37 of file SlotConstructor.php.

38  {
39  }

Member Function Documentation

◆ document()

ILIAS\LegalDocuments\SlotConstructor::document ( DocumentRepository  $document_repository,
SelectionMap  $conditions,
array  $content_as_component 
)
Parameters
SelectionMap<ConditionDefinition>$conditions
array<string,Closure(DocumentContent)Component> $content_as_component

Definition at line 65 of file SlotConstructor.php.

65  : ProvideDocument
66  {
67  return new ProvideDocument($this->id(), $document_repository, $conditions, $content_as_component, $this->container);
68  }

◆ documentRepository()

ILIAS\LegalDocuments\SlotConstructor::documentRepository ( )

Definition at line 70 of file SlotConstructor.php.

70  : DocumentRepository
71  {
72  return new DatabaseDocumentRepository(
73  $this->id(),
74  $this->container->database(),
75  $this->action
76  );
77  }

◆ history()

ILIAS\LegalDocuments\SlotConstructor::history ( ProvideDocument  $document)

Definition at line 46 of file SlotConstructor.php.

References ILIAS\LegalDocuments\Provide\ProvideDocument\repository().

46  : ProvideHistory
47  {
48  return new ProvideHistory(
49  $this->id(),
50  new DatabaseHistoryRepository(
51  $this->id(),
52  $document->repository(),
53  $this->container->database(),
54  $this->action
55  ),
56  $document,
57  $this->container
58  );
59  }
+ Here is the call graph for this function:

◆ id()

ILIAS\LegalDocuments\SlotConstructor::id ( )

Definition at line 41 of file SlotConstructor.php.

References $id.

41  : string
42  {
43  return $this->id;
44  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

◆ readOnlyDocuments()

ILIAS\LegalDocuments\SlotConstructor::readOnlyDocuments ( DocumentRepository  $document_repository)

Definition at line 79 of file SlotConstructor.php.

79  : DocumentRepository
80  {
81  return new ReadOnlyDocumentRepository($document_repository);
82  }

◆ withdrawalFinished()

ILIAS\LegalDocuments\SlotConstructor::withdrawalFinished ( Closure  $finished)
Parameters
Closure()void $finished
Returns
Closure(): list<Component>

Definition at line 88 of file SlotConstructor.php.

References null.

88  : Closure
89  {
90  return function () use ($finished): array {
91  if (($this->container->http()->request()->getQueryParams()['withdrawal_finished'] ?? null) === $this->id()) {
92  $finished();
93  }
94  return [];
95  };
96  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

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