ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
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)
 
 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\Export\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: feed.php:28
+ 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 95 of file class.InternalGUIService.php.

103  : \ilCommentGUI {
104  return new \ilCommentGUI(
105  $rep_obj_id,
106  $obj_id,
107  $obj_type,
108  $include_subs,
109  $news_id,
110  $ajax,
111  $search_text
112  );
113  }
Comment GUI.

◆ getMessagesGUI()

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

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

120  : \ilMessageGUI {
121  return new \ilMessageGUI(
122  $recipient,
123  $rep_obj_id,
124  $obj_id,
125  $obj_type
126  );
127  }
Message GUI.

◆ 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(), ilModalGUI\initJS(), and ILIAS\Repository\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  \ilModalGUI::initJS($tpl);
78 
79  $lng->toJS(array("private_notes", "notes_public_comments", "cancel", "notes_messages"), $tpl);
80  $tpl->addJavaScript("./Services/Notes/js/ilNotes.js");
81  $tpl->addOnLoadCode("ilNotes.setAjaxUrl('" . $ajax_url . "');");
82  }
static initJS(ilGlobalTemplateInterface $a_main_tpl=null)
$path
Definition: ltiservices.php:32
global $DIC
Definition: feed.php:28
$ref_id
Definition: ltiauth.php:67
$lng
static _lookupType(int $id, bool $reference=false)
+ Here is the call graph for this function:

◆ print()

ILIAS\Notes\InternalGUIService::print ( )

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

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

84  : PrintProcessGUI
85  {
86  $provider = new PrintViewProvider();
87  return new PrintProcessGUI(
88  $provider,
89  $this->http(),
90  $this->ui(),
91  $this->domain_service->lng()
92  );
93  }
$provider
Definition: ltitoken.php:83
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

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

◆ $domain_service

InternalDomainService ILIAS\Notes\InternalGUIService::$domain_service
protected

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


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