ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
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 36 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 38 of file SlotConstructor.php.

39  {
40  }

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 66 of file SlotConstructor.php.

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

◆ documentRepository()

ILIAS\LegalDocuments\SlotConstructor::documentRepository ( )

Definition at line 71 of file SlotConstructor.php.

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

◆ history()

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

Definition at line 47 of file SlotConstructor.php.

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

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

◆ id()

ILIAS\LegalDocuments\SlotConstructor::id ( )

Definition at line 42 of file SlotConstructor.php.

References $id.

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

◆ readOnlyDocuments()

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

Definition at line 80 of file SlotConstructor.php.

81  {
82  return new ReadOnlyDocumentRepository($document_repository);
83  }

◆ withdrawalFinished()

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

Definition at line 89 of file SlotConstructor.php.

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

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