ILIAS
release_8 Revision v8.23
◀ ilDoc Overview
Init.php
Go to the documentation of this file.
1
<?php
2
19
namespace
ILIAS\COPage\Editor\UI
;
20
24
class
Init
25
{
26
protected \ilCtrl
$ctrl
;
27
protected \ilLanguage
$lng
;
28
29
public
function
__construct
()
30
{
31
global
$DIC
;
32
33
$this->
ctrl
= $DIC->ctrl();
34
$this->
lng
= $DIC->language();
35
}
36
37
public
function
initUI
(
38
\
ilGlobalTemplateInterface
$main_tpl,
39
string
$openPlaceHolderPcId =
""
40
): void {
41
$ctrl =
$this->ctrl
;
42
$lng =
$this->lng
;
43
44
$main_tpl->
addOnLoadCode
(
"il.copg.editor.init('"
.
45
ILIAS_HTTP_PATH .
"/"
. $ctrl->getLinkTargetByClass([
"ilPageEditorGUI"
,
"ilPageEditorServerAdapterGUI"
],
"invokeServer"
) .
"','"
.
46
$this->
ctrl
->getFormActionByClass(
"ilPageEditorGUI"
)
47
.
"', '"
. $openPlaceHolderPcId .
"');"
);
48
49
$lang_vars = [
"cont_last_update"
,
"cont_error"
,
"cont_sel_el_cut_use_paste"
,
"cont_sel_el_copied_use_paste"
,
50
"cont_ed_new_col_before"
,
"cont_ed_new_col_after"
,
"cont_ed_col_left"
,
"cont_ed_col_right"
,
"cont_ed_delete_col"
,
51
"cont_ed_new_row_before"
,
"cont_ed_new_row_after"
,
"cont_ed_row_up"
,
"cont_ed_row_down"
,
"cont_ed_delete_row"
,
"cont_saving"
52
];
53
54
foreach
($lang_vars as $l) {
55
$lng->toJS($l);
56
}
57
58
if
(DEVMODE == 1) {
59
$main_tpl->
addJavaScript
(
"./node_modules/tinymce/tinymce.js"
);
60
}
else
{
61
$main_tpl->
addJavaScript
(
"./node_modules/tinymce/tinymce.min.js"
);
62
}
63
64
\ilYuiUtil::initConnection
();
65
$main_tpl->
addJavaScript
(
"./Services/UIComponent/Explorer/js/ilExplorer.js"
);
66
67
// ensure that form.js is loaded which is needed for file input (js that shows file names)
68
$dummy = new \ilPropertyFormGUI();
69
$dummy->getHTML();
70
}
71
}
ILIAS\COPage\Editor\UI\Init\__construct
__construct()
Definition:
Init.php:29
ilGlobalTemplateInterface
ILIAS\COPage\Editor\UI\Init\initUI
initUI(\ilGlobalTemplateInterface $main_tpl, string $openPlaceHolderPcId="")
Definition:
Init.php:37
ILIAS\COPage\Editor\UI\Init
Definition:
Init.php:24
$DIC
global $DIC
Definition:
feed.php:28
ILIAS\COPage\Editor\UI
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
Init.php:19
ILIAS\Repository\ctrl
ctrl()
Definition:
trait.GlobalDICGUIServices.php:52
ILIAS\Repository\lng
lng()
Definition:
trait.GlobalDICDomainServices.php:56
ilGlobalTemplateInterface\addJavaScript
addJavaScript(string $a_js_file, bool $a_add_version_parameter=true, int $a_batch=2)
Add a javascript file that should be included in the header.
ilGlobalTemplateInterface\addOnLoadCode
addOnLoadCode(string $a_code, int $a_batch=2)
Add on load code.
ILIAS\COPage\Editor\UI\Init\$lng
ilLanguage $lng
Definition:
Init.php:27
ILIAS\COPage\Editor\UI\Init\$ctrl
ilCtrl $ctrl
Definition:
Init.php:26
ilYuiUtil\initConnection
static initConnection(?ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI Connection module.
Definition:
class.ilYuiUtil.php:37
Services
COPage
Editor
UI
Init.php
Generated on Wed Sep 3 2025 22:02:25 for ILIAS by
1.8.13 (using
Doxyfile
)