ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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.

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.

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.

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 }

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

+ Here is the call graph for this function:

◆ id()

ILIAS\LegalDocuments\SlotConstructor::id ( )

Definition at line 41 of file SlotConstructor.php.

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

References $id.

Referenced by ILIAS\LegalDocuments\SlotConstructor\withdrawalFinished().

+ Here is the caller graph for this function:

◆ readOnlyDocuments()

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

Definition at line 79 of file SlotConstructor.php.

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.

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 }

References ILIAS\LegalDocuments\SlotConstructor\id().

+ Here is the call graph for this function:

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