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

Public Member Functions

 __construct (private readonly UIServices $ui, private readonly Closure $content_as_component)
 
 create (DocumentContent $content)
 

Detailed Description

Definition at line 28 of file DocumentModal.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\LegalDocuments\Table\DocumentModal::__construct ( private readonly UIServices  $ui,
private readonly Closure  $content_as_component 
)
Parameters
Closure(DocumentContent)Component $content_as_component

Definition at line 33 of file DocumentModal.php.

36 {
37 }

Member Function Documentation

◆ create()

ILIAS\LegalDocuments\Table\DocumentModal::create ( DocumentContent  $content)
Returns
list<Component>

Definition at line 42 of file DocumentModal.php.

42 : array
43 {
44 $modal = $this->ui->factory()->modal()->lightbox([
45 $this->ui->factory()->modal()->lightboxTextPage(
46 $this->ui->renderer()->render(($this->content_as_component)($content)),
47 $content->title()
48 )
49 ]);
50
51 $link = $this->ui->factory()->button()->shy($content->title(), '')->withOnClick(
52 $modal->getShowSignal()
53 );
54
55 return [$link, $modal];
56 }

References ILIAS\LegalDocuments\Value\DocumentContent\title(), and ILIAS\Repository\ui().

+ Here is the call graph for this function:

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