ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\Notes\InternalGUIService Class Reference
+ Collaboration diagram for ILIAS\Notes\InternalGUIService:

Public Member Functions

 __construct (Container $DIC, InternalDataService $data_service, InternalDomainService $domain_service)
 
 standardRequest ()
 
 initJavascript (string $ajax_url="", ?\ilGlobalTemplateInterface $main_tpl=null)
 
 getModalTemplate ()
 
 print ()
 
 getCommentsGUI ( $rep_obj_id, int $obj_id, string $obj_type, int $news_id=0, bool $include_subs=false, bool $ajax=true, string $search_text="")
 
 getMessagesGUI (int $recipient, int $rep_obj_id, int $obj_id, string $obj_type)
 

Protected Attributes

InternalDataService $data_service
 
InternalDomainService $domain_service
 

Detailed Description

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

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

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Notes\InternalGUIService::__construct ( Container  $DIC,
InternalDataService  $data_service,
InternalDomainService  $domain_service 
)

Definition at line 37 of file class.InternalGUIService.php.

References ILIAS\Notes\InternalGUIService\$data_service, ILIAS\Notes\InternalGUIService\$domain_service, and ILIAS\Repository\initGUIServices().

41  {
42  $this->data_service = $data_service;
43  $this->domain_service = $domain_service;
44  $this->initGUIServices($DIC);
45  }
initGUIServices(\ILIAS\DI\Container $DIC)
global $DIC
Definition: shib_login.php:22
+ Here is the call graph for this function:

Member Function Documentation

◆ getCommentsGUI()

ILIAS\Notes\InternalGUIService::getCommentsGUI (   $rep_obj_id,
int  $obj_id,
string  $obj_type,
int  $news_id = 0,
bool  $include_subs = false,
bool  $ajax = true,
string  $search_text = "" 
)

Definition at line 112 of file class.InternalGUIService.php.

120  : \ilCommentGUI {
121  return new \ilCommentGUI(
122  $rep_obj_id,
123  $obj_id,
124  $obj_type,
125  $include_subs,
126  $news_id,
127  $ajax,
128  $search_text
129  );
130  }
Comment GUI.

◆ getMessagesGUI()

ILIAS\Notes\InternalGUIService::getMessagesGUI ( int  $recipient,
int  $rep_obj_id,
int  $obj_id,
string  $obj_type 
)

Definition at line 132 of file class.InternalGUIService.php.

137  : \ilMessageGUI {
138  return new \ilMessageGUI(
139  $recipient,
140  $rep_obj_id,
141  $obj_id,
142  $obj_type
143  );
144  }
Message GUI.

◆ getModalTemplate()

ILIAS\Notes\InternalGUIService::getModalTemplate ( )

Definition at line 90 of file class.InternalGUIService.php.

References ILIAS\Repository\ui().

Referenced by ILIAS\Notes\InternalGUIService\initJavascript().

90  : array
91  {
92  $ui = $this->ui();
93  $modal = $ui->factory()->modal()->roundtrip('#notes_title#', $ui->factory()->legacy()->content(''));
94  $modalt["show"] = $modal->getShowSignal()->getId();
95  $modalt["close"] = $modal->getCloseSignal()->getId();
96  $modalt["template"] = $ui->renderer()->renderAsync($modal);
97 
98  return $modalt;
99  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initJavascript()

ILIAS\Notes\InternalGUIService::initJavascript ( string  $ajax_url = "",
?\ilGlobalTemplateInterface  $main_tpl = null 
)

Definition at line 55 of file class.InternalGUIService.php.

References $DIC, $lng, $path, $ref_id, ilObject\_lookupType(), ILIAS\Repository\ctrl(), ILIAS\Notes\InternalGUIService\getModalTemplate(), and mainTemplate().

58  : void {
59  $tpl = $main_tpl ?? $this->mainTemplate();
60  $lng = $this->domain_service->lng();
61  $ctrl = $this->ctrl();
62  // temporary patch to make this work...
63  global $DIC;
64  $ref_id = $DIC->repository()->internal()->gui()->standardRequest()->getRefId();
65  $type = \ilObject::_lookupType($ref_id, true);
66  if ($ajax_url === "") {
67  $path = ["ilcommonactiondispatchergui", "ilnotegui"];
68  $ajax_url = $this->ctrl()->getLinkTargetByClass(
69  $path,
70  "",
71  "",
72  true,
73  false
74  );
75  }
76  $lng->loadLanguageModule("notes");
77 
78  $lng->toJS(array("private_notes", "notes_public_comments", "cancel", "notes_messages"), $tpl);
79  $tpl->addJavaScript("assets/js/ilNotes.js");
80  //$tpl->addJavaScript("../components/ILIAS/Notes/resources/ilNotes.js");
81 
82  $modal_template = $this->getModalTemplate();
83 
84  $tpl->addOnLoadCode("ilNotes.setAjaxUrl('" . $ajax_url . "');");
85  $tpl->addOnLoadCode('ilNotes.setModalTemplate("' . addslashes(json_encode($modal_template["template"])) . '");');
86  $tpl->addOnLoadCode("ilNotes.setShowSignal('" . $modal_template["show"] . "');");
87  $tpl->addOnLoadCode("ilNotes.setCloseSignal('" . $modal_template["close"] . "');");
88  }
$path
Definition: ltiservices.php:29
$ref_id
Definition: ltiauth.php:65
global $DIC
Definition: shib_login.php:22
global $lng
Definition: privfeed.php:31
static _lookupType(int $id, bool $reference=false)
mainTemplate()
+ Here is the call graph for this function:

◆ print()

ILIAS\Notes\InternalGUIService::print ( )

Definition at line 101 of file class.InternalGUIService.php.

References $provider, ILIAS\FileDelivery\http(), and ILIAS\Repository\ui().

101  : PrintProcessGUI
102  {
103  $provider = new PrintViewProvider();
104  return new PrintProcessGUI(
105  $provider,
106  $this->http(),
107  $this->ui(),
108  $this->domain_service->lng()
109  );
110  }
$provider
Definition: ltitoken.php:80
static http()
Fetches the global http state from ILIAS.
+ Here is the call graph for this function:

◆ standardRequest()

ILIAS\Notes\InternalGUIService::standardRequest ( )

Definition at line 47 of file class.InternalGUIService.php.

References ILIAS\FileDelivery\http().

47  : StandardGUIRequest
48  {
49  return new StandardGUIRequest(
50  $this->http(),
51  $this->domain_service->refinery()
52  );
53  }
static http()
Fetches the global http state from ILIAS.
+ Here is the call graph for this function:

Field Documentation

◆ $data_service

InternalDataService ILIAS\Notes\InternalGUIService::$data_service
protected

◆ $domain_service

InternalDomainService ILIAS\Notes\InternalGUIService::$domain_service
protected

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