ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
class.ilPageMultiLangGUI.php
Go to the documentation of this file.
1
<?
php
2
3
/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5
include_once(
"./Services/COPage/classes/class.ilPageMultiLang.php"
);
6
15
class
ilPageMultiLangGUI
16
{
20
protected
$ctrl
;
21
25
protected
$lng
;
26
27
protected
$single_page_mode
=
false
;
28
36
public
function
__construct
($a_parent_type, $a_parent_id, $a_single_page_mode =
false
)
37
{
38
global
$DIC
;
39
40
$this->ctrl = $DIC->ctrl();
41
$this->lng = $DIC->language();
42
//$this->ml = new ilPageMultiLang($a_parent_type, $a_parent_id);
43
44
// object translation
45
include_once(
"./Services/Object/classes/class.ilObjectTranslation.php"
);
46
$this->ot =
ilObjectTranslation::getInstance
($a_parent_id);
47
48
// $this->single_page_mode = $a_single_page_mode;
49
}
50
54
public
function
executeCommand
()
55
{
56
$ilCtrl
=
$this->ctrl
;
57
58
$next_class =
$ilCtrl
->getNextClass();
59
60
switch
($next_class) {
61
default
:
62
$cmd =
$ilCtrl
->getCmd(
"settings"
);
63
if
(in_array($cmd, array(
"settings"
,
"activateMultilinguality"
,
"cancel"
,
64
"saveMultilingualitySettings"
,
"confirmDeactivateMultiLanguage"
,
"addLanguage"
,
65
"saveLanguages"
,
"deactivateMultiLang"
,
"confirmRemoveLanguages"
,
66
"removeLanguages"
))) {
67
$this->$cmd();
68
}
69
}
70
}
71
75
public
function
getMultiLangInfo
($a_page_lang =
"-"
)
76
{
77
$lng
=
$this->lng
;
78
79
if
($a_page_lang ==
""
) {
80
$a_page_lang =
"-"
;
81
}
82
83
$lng
->loadLanguageModule(
"meta"
);
84
85
$tpl
=
new
ilTemplate
(
"tpl.page_multi_lang_info.html"
,
true
,
true
,
"Services/COPage"
);
86
$tpl
->setVariable(
"TXT_MASTER_LANG"
,
$lng
->txt(
"obj_master_lang"
));
87
$tpl
->setVariable(
"VAL_ML"
,
$lng
->txt(
"meta_l_"
. $this->ot->getMasterLanguage()));
88
$cl = ($a_page_lang ==
"-"
)
89
? $this->ot->getMasterLanguage()
90
: $a_page_lang;
91
$tpl
->setVariable(
"TXT_CURRENT_LANG"
,
$lng
->txt(
"cont_current_lang"
));
92
$tpl
->setVariable(
"VAL_CL"
,
$lng
->txt(
"meta_l_"
. $cl));
93
return
$tpl
->get();
94
}
95
}
ilPageMultiLangGUI\__construct
__construct($a_parent_type, $a_parent_id, $a_single_page_mode=false)
Constructur.
Definition:
class.ilPageMultiLangGUI.php:36
$DIC
global $DIC
Definition:
saml.php:7
$tpl
$tpl
Definition:
ilias.php:10
ilPageMultiLangGUI\$single_page_mode
$single_page_mode
Definition:
class.ilPageMultiLangGUI.php:27
ilPageMultiLangGUI\executeCommand
executeCommand()
Execute command.
Definition:
class.ilPageMultiLangGUI.php:54
$ilCtrl
global $ilCtrl
Definition:
ilias.php:18
ilPageMultiLangGUI\getMultiLangInfo
getMultiLangInfo($a_page_lang="-")
Get multi lang info.
Definition:
class.ilPageMultiLangGUI.php:75
ilPageMultiLangGUI\$ctrl
$ctrl
Definition:
class.ilPageMultiLangGUI.php:20
ilTemplate
special template class to simplify handling of ITX/PEAR
Definition:
class.ilTemplate.php:13
ilPageMultiLangGUI\$lng
$lng
Definition:
class.ilPageMultiLangGUI.php:25
ilPageMultiLangGUI
Page multilinguality GUI class.
Definition:
class.ilPageMultiLangGUI.php:15
ilObjectTranslation\getInstance
static getInstance($a_obj_id)
Get instance.
Definition:
class.ilObjectTranslation.php:68
php
Services
COPage
classes
class.ilPageMultiLangGUI.php
Generated on Thu Jan 30 2025 19:01:56 for ILIAS by
1.8.13 (using
Doxyfile
)