ILIAS  release_8 Revision v8.24
class.InternalGUIService.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
21namespace ILIAS\Notes;
22
26
31{
33
36
37 public function __construct(
41 ) {
42 $this->data_service = $data_service;
43 $this->domain_service = $domain_service;
44 $this->initGUIServices($DIC);
45 }
46
48 {
49 return new StandardGUIRequest(
50 $this->http(),
51 $this->domain_service->refinery()
52 );
53 }
54
55 public function initJavascript(
56 string $ajax_url = "",
57 ?\ilGlobalTemplateInterface $main_tpl = null
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();
66 switch ($type) {
67 /*
68 case "cat":
69 $path = ["ilrepositorygui", "ilobjcategorygui", "ilcommonactiondispatchergui", "ilnotegui"];
70 break;
71 case "root":
72 $path = ["ilrepositorygui", "ilobjrootfoldergui", "ilcommonactiondispatchergui", "ilnotegui"];
73 break;
74 case "lm":
75 $path = ["illmpresentationgui", "ilcommonactiondispatchergui", "ilnotegui"];
76 break;
77 case "wiki":
78 $path = ["ilwikihandlergui", "ilobjwikigui", "ilcommonactiondispatchergui", "ilnotegui"];
79 break;*/
80 default: // not working
81 $path = ["ilcommonactiondispatchergui", "ilnotegui"];
82 break;
83 }
84
85 if ($ajax_url === "") {
86 $ajax_url = $this->ctrl()->getLinkTargetByClass(
87 $path,
88 "",
89 "",
90 true,
91 false
92 );
93 }
94 $lng->loadLanguageModule("notes");
96
97 $lng->toJS(array("private_notes", "notes_public_comments", "cancel"), $tpl);
100 $tpl->addJavaScript("./Services/Notes/js/ilNotes.js");
101 $tpl->addOnLoadCode("ilNotes.setAjaxUrl('" . $ajax_url . "');");
102 }
103
107 public function filter(
108 string $filter_id,
109 $class_path,
110 string $cmd,
111 bool $activated = true,
112 bool $expanded = true
115 $filter_id,
116 $class_path,
117 $cmd,
118 $activated,
119 $expanded
120 );
121 }
122
123 public function print(): PrintProcessGUI
124 {
126 return new PrintProcessGUI(
127 $provider,
128 $this->http(),
129 $this->ui(),
130 $this->domain_service->lng()
131 );
132 }
133}
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:32
Repository internal data service.
initJavascript(string $ajax_url="", ?\ilGlobalTemplateInterface $main_tpl=null)
filter(string $filter_id, $class_path, string $cmd, bool $activated=true, bool $expanded=true)
__construct(Container $DIC, InternalDataService $data_service, InternalDomainService $domain_service)
static initJS(ilGlobalTemplateInterface $a_main_tpl=null)
static _lookupType(int $id, bool $reference=false)
static initConnection(?ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI Connection module.
static initjQuery(ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
return['3gp', '7z', 'ai', 'aif', 'aifc', 'aiff', 'au', 'arw', 'avi', 'backup', 'bak', 'bas', 'bpmn', 'bpmn2', 'bmp', 'bib', 'bibtex', 'bz', 'bz2', 'c', 'c++', 'cc', 'cct', 'cdf', 'cer', 'class', 'cls', 'conf', 'cpp', 'crt', 'crs', 'crw', 'cr2', 'css', 'cst', 'csv', 'cur', 'db', 'dcr', 'des', 'dng', 'doc', 'docx', 'dot', 'dotx', 'dtd', 'dvi', 'el', 'eps', 'epub', 'f', 'f77', 'f90', 'flv', 'for', 'g3', 'gif', 'gl', 'gan', 'ggb', 'gsd', 'gsm', 'gtar', 'gz', 'gzip', 'h', 'hpp', 'htm', 'html', 'htmls', 'ibooks', 'ico', 'ics', 'ini', 'ipynb', 'java', 'jbf', 'jpeg', 'jpg', 'js', 'jsf', 'jso', 'json', 'latex', 'lang', 'less', 'log', 'lsp', 'ltx', 'm1v', 'm2a', 'm2v', 'm3u', 'm4a', 'm4v', 'markdown', 'm', 'mat', 'md', 'mdl', 'mdown', 'mid', 'min', 'midi', 'mobi', 'mod', 'mov', 'movie', 'mp2', 'mp3', 'mp4', 'mpa', 'mpeg', 'mpg', 'mph', 'mpga', 'mpp', 'mpt', 'mpv', 'mpx', 'mv', 'mw', 'mv4', 'nb', 'nbp', 'nef', 'nif', 'niff', 'obj', 'obm', 'odt', 'ods', 'odp', 'odg', 'odf', 'oga', 'ogg', 'ogv', 'old', 'p', 'pas', 'pbm', 'pcl', 'pct', 'pcx', 'pdf', 'pgm', 'pic', 'pict', 'png', 'por', 'pov', 'project', 'properties', 'ppa', 'ppm', 'pps', 'ppsx', 'ppt', 'pptx', 'ppz', 'ps', 'psd', 'pwz', 'qt', 'qtc', 'qti', 'qtif', 'r', 'ra', 'ram', 'rar', 'rast', 'rda', 'rev', 'rexx', 'ris', 'rf', 'rgb', 'rm', 'rmd', 'rmi', 'rmm', 'rmp', 'rt', 'rtf', 'rtx', 'rv', 's', 's3m', 'sav', 'sbs', 'sec', 'sdml', 'sgm', 'sgml', 'smi', 'smil', 'srt', 'sps', 'spv', 'stl', 'svg', 'swa', 'swf', 'swz', 'tar', 'tex', 'texi', 'texinfo', 'text', 'tgz', 'tif', 'tiff', 'ttf', 'txt', 'tmp', 'uvproj', 'vdf', 'vimeo', 'viv', 'vivo', 'vrml', 'vsdx', 'wav', 'webm', 'wmv', 'wmx', 'wmz', 'woff', 'wwd', 'xhtml', 'xif', 'xls', 'xlsx', 'xmind', 'xml', 'xsl', 'xsd', 'zip']
global $DIC
Definition: feed.php:28
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
$ref_id
Definition: ltiauth.php:67
$path
Definition: ltiservices.php:32
$provider
Definition: ltitoken.php:83
static http()
Fetches the global http state from ILIAS.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
initGUIServices(\ILIAS\DI\Container $DIC)
$type
$lng