ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilPageMultiLangGUI Class Reference

Page multilinguality GUI class. More...

+ Collaboration diagram for ilPageMultiLangGUI:

Public Member Functions

 __construct ($a_parent_type, $a_parent_id, $a_single_page_mode=false)
 Constructur. More...
 
 executeCommand ()
 Execute command. More...
 
 getMultiLangInfo ($a_page_lang="-")
 Get multi lang info. More...
 

Protected Attributes

 $ctrl
 
 $lng
 
 $single_page_mode = false
 

Detailed Description

Page multilinguality GUI class.

This could be generalized as an object service in the future.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 15 of file class.ilPageMultiLangGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilPageMultiLangGUI::__construct (   $a_parent_type,
  $a_parent_id,
  $a_single_page_mode = false 
)

Constructur.

Parameters
string$a_parent_typeparent object type
int$a_parent_idparent object id
bool$a_single_page_modesingle page mode (page includes ml managing)

Definition at line 36 of file class.ilPageMultiLangGUI.php.

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 }
static getInstance($a_obj_id)
Get instance.
global $DIC
Definition: saml.php:7

References $DIC, and ilObjectTranslation\getInstance().

+ Here is the call graph for this function:

Member Function Documentation

◆ executeCommand()

ilPageMultiLangGUI::executeCommand ( )

Execute command.

Definition at line 54 of file class.ilPageMultiLangGUI.php.

55 {
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 }
global $ilCtrl
Definition: ilias.php:18

References $ctrl, and $ilCtrl.

◆ getMultiLangInfo()

ilPageMultiLangGUI::getMultiLangInfo (   $a_page_lang = "-")

Get multi lang info.

Definition at line 75 of file class.ilPageMultiLangGUI.php.

76 {
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 }
$tpl
Definition: ilias.php:10
special template class to simplify handling of ITX/PEAR

References $lng, and $tpl.

Field Documentation

◆ $ctrl

ilPageMultiLangGUI::$ctrl
protected

Definition at line 20 of file class.ilPageMultiLangGUI.php.

Referenced by executeCommand().

◆ $lng

ilPageMultiLangGUI::$lng
protected

Definition at line 25 of file class.ilPageMultiLangGUI.php.

Referenced by getMultiLangInfo().

◆ $single_page_mode

ilPageMultiLangGUI::$single_page_mode = false
protected

Definition at line 27 of file class.ilPageMultiLangGUI.php.


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