ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilWebDAVMountInstructionsModalGUI Class Reference
+ Collaboration diagram for ilWebDAVMountInstructionsModalGUI:

Static Public Member Functions

static maybeRenderWebDAVModalInGlobalTpl ()
 

Protected Attributes

ilWebDAVMountInstructionsRepositoryImpl $repository
 
Factory $ui_factory
 
Renderer $ui_renderer
 
ilLanguage $lng
 

Private Member Functions

 __construct (ilWebDAVMountInstructionsRepositoryImpl $repository, Factory $ui_factory, Renderer $ui_renderer, 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 ( ilWebDAVMountInstructionsRepositoryImpl  $repository,
Factory  $ui_factory,
Renderer  $ui_renderer,
ilLanguage  $lng 
)
private

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

References Vendor\Package\$e, $lng, $repository, $ui_factory, $ui_renderer, ILIAS\Repository\lng(), ILIAS\UI\examples\Button\Close\modal(), and ILIAS\UI\examples\Deck\repository().

36  {
37  $this->repository = $repository;
38  $this->ui_factory = $ui_factory;
39  $this->ui_renderer = $ui_renderer;
40  $this->lng = $lng;
41 
42  try {
43  $document = $this->repository->getMountInstructionsByLanguage($this->lng->getUserLanguage());
44  $title = $document->getTitle();
45  } catch (InvalidArgumentException $e) {
46  $title = $this->lng->txt('webfolder_instructions_titletext');
47  }
48 
49  $content_div = '<div id="' . self::MOUNT_INSTRUCTIONS_CONTENT_ID . '"></div>';
50  $page = $this->ui_factory->modal()->lightboxTextPage($content_div, $title);
51  $this->modal = $this->ui_factory->modal()->lightbox($page);
52  }
ilWebDAVMountInstructionsRepositoryImpl $repository
modal()
This second example shows a scenario in which the Close Button is used in an overlay as indicated in ...
Definition: modal.php:12
+ Here is the call graph for this function:

Member Function Documentation

◆ getModalShowSignalId()

ilWebDAVMountInstructionsModalGUI::getModalShowSignalId ( )
private

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

References ILIAS\UI\examples\Button\Close\modal().

59  : string
60  {
61  return $this->modal->getShowSignal()->getId();
62  }
modal()
This second example shows a scenario in which the Close Button is used in an overlay as indicated in ...
Definition: modal.php:12
+ Here is the call graph for this function:

◆ getRenderedModal()

ilWebDAVMountInstructionsModalGUI::getRenderedModal ( )
private

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

References ILIAS\UI\examples\Button\Close\modal().

54  : string
55  {
56  return $this->ui_renderer->render($this->modal);
57  }
modal()
This second example shows a scenario in which the Close Button is used in an overlay as indicated in ...
Definition: modal.php:12
+ Here is the call graph for this function:

◆ maybeRenderWebDAVModalInGlobalTpl()

static ilWebDAVMountInstructionsModalGUI::maybeRenderWebDAVModalInGlobalTpl ( )
static

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

References $DIC, and $tpl.

Referenced by ilWebDAVMountInstructionsDocumentTableGUI\__construct(), and ilObjectListGUI\insertCommand().

66  : void
67  {
68  if (self::$modal_already_rendered) {
69  return;
70  }
71 
72  global $DIC;
74  $instance = new ilWebDAVMountInstructionsModalGUI($repository, $DIC->ui()->factory(), $DIC->ui()->renderer(), $DIC->language());
75 
76  self::$modal_already_rendered = true;
77  $js_function = '<script>function triggerWebDAVModal(api_url){ $.ajax(api_url).done(function(data){ $(document).trigger("' . $instance->getModalShowSignalId() . '", "{}"); $("#' . 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: feed.php:28
ilWebDAVMountInstructionsRepositoryImpl $repository
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41
+ Here is the caller graph for this function:

Field Documentation

◆ $lng

ilLanguage ilWebDAVMountInstructionsModalGUI::$lng
protected

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

Referenced by __construct().

◆ $modal

Lightbox ilWebDAVMountInstructionsModalGUI::$modal
private

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

◆ $modal_already_rendered

bool ilWebDAVMountInstructionsModalGUI::$modal_already_rendered = false
staticprivate

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

◆ $repository

ilWebDAVMountInstructionsRepositoryImpl ilWebDAVMountInstructionsModalGUI::$repository
protected

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

Referenced by __construct().

◆ $ui_factory

Factory ilWebDAVMountInstructionsModalGUI::$ui_factory
protected

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

Referenced by __construct().

◆ $ui_renderer

Renderer ilWebDAVMountInstructionsModalGUI::$ui_renderer
protected

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

Referenced by __construct().

◆ 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: