ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilWebDAVMountInstructionsModalGUI Class Reference
+ Collaboration diagram for ilWebDAVMountInstructionsModalGUI:

Static Public Member Functions

static maybeRenderWebDAVModalInGlobalTpl ()
 

Private Member Functions

 __construct (protected ilWebDAVMountInstructionsRepositoryImpl $repository, protected Factory $ui_factory, protected Renderer $ui_renderer, protected ilLanguage $lng)
 
 getRenderedModal ()
 
 getModalShowSignalId ()
 

Private Attributes

const MOUNT_INSTRUCTIONS_CONTENT_ID = 'webdav_mount_instructions_content'
 
Lightbox $modal
 

Static Private Attributes

static bool $modal_already_rendered = false
 

Detailed Description

Definition at line 25 of file class.ilWebDAVMountInstructionsModalGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilWebDAVMountInstructionsModalGUI::__construct ( protected ilWebDAVMountInstructionsRepositoryImpl  $repository,
protected Factory  $ui_factory,
protected Renderer  $ui_renderer,
protected ilLanguage  $lng 
)
private

Definition at line 30 of file class.ilWebDAVMountInstructionsModalGUI.php.

35 {
36 try {
37 $document = $this->repository->getMountInstructionsByLanguage($this->lng->getUserLanguage());
38 $title = $document->getTitle();
39 } catch (InvalidArgumentException) {
40 $title = $this->lng->txt('webfolder_instructions_titletext');
41 }
42
43 $content_div = '<div id="' . self::MOUNT_INSTRUCTIONS_CONTENT_ID . '"></div>';
44 $page = $this->ui_factory->modal()->lightboxTextPage($content_div, $title);
45 $this->modal = $this->ui_factory->modal()->lightbox($page);
46 }
modal(string $title="", string $cancel_label="")

References ILIAS\Repository\lng(), ILIAS\Repository\modal(), and ILIAS\UI\examples\Deck\repository().

+ Here is the call graph for this function:

Member Function Documentation

◆ getModalShowSignalId()

ilWebDAVMountInstructionsModalGUI::getModalShowSignalId ( )
private

Definition at line 53 of file class.ilWebDAVMountInstructionsModalGUI.php.

53 : string
54 {
55 return $this->modal->getShowSignal()->getId();
56 }

References ILIAS\Repository\modal().

+ Here is the call graph for this function:

◆ getRenderedModal()

ilWebDAVMountInstructionsModalGUI::getRenderedModal ( )
private

Definition at line 48 of file class.ilWebDAVMountInstructionsModalGUI.php.

48 : string
49 {
50 return $this->ui_renderer->render($this->modal);
51 }

References ILIAS\Repository\modal().

+ Here is the call graph for this function:

◆ maybeRenderWebDAVModalInGlobalTpl()

static ilWebDAVMountInstructionsModalGUI::maybeRenderWebDAVModalInGlobalTpl ( )
static

Definition at line 60 of file class.ilWebDAVMountInstructionsModalGUI.php.

60 : void
61 {
62 if (self::$modal_already_rendered) {
63 return;
64 }
65
66 global $DIC;
67 $repository = new ilWebDAVMountInstructionsRepositoryImpl($DIC->database());
69 $repository,
70 $DIC->ui()->factory(),
71 $DIC->ui()->renderer(),
72 $DIC->language()
73 );
74
75 self::$modal_already_rendered = true;
76 $js_function = '<script>function triggerWebDAVModal(api_url){ $.ajax(api_url).done(function(data){ $(document).trigger("' . $instance->getModalShowSignalId(
77 ) . '", "{}"); $("#' . self::MOUNT_INSTRUCTIONS_CONTENT_ID . '").html(data);}) }</script>';
78
79 $webdav_modal_html = $instance->getRenderedModal() . $js_function;
80
81 $tpl = $DIC->ui()->mainTemplate();
82 $tpl->setVariable('WEBDAV_MODAL', $webdav_modal_html);
83 }
global $DIC
Definition: shib_login.php:26

References $DIC.

Referenced by ilWebDAVMountInstructionsDocumentTableGUI\__construct().

+ Here is the caller graph for this function:

Field Documentation

◆ $modal

Lightbox ilWebDAVMountInstructionsModalGUI::$modal
private

Definition at line 28 of file class.ilWebDAVMountInstructionsModalGUI.php.

◆ $modal_already_rendered

bool ilWebDAVMountInstructionsModalGUI::$modal_already_rendered = false
staticprivate

Definition at line 58 of file class.ilWebDAVMountInstructionsModalGUI.php.

◆ MOUNT_INSTRUCTIONS_CONTENT_ID

const ilWebDAVMountInstructionsModalGUI::MOUNT_INSTRUCTIONS_CONTENT_ID = 'webdav_mount_instructions_content'
private

Definition at line 27 of file class.ilWebDAVMountInstructionsModalGUI.php.


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