ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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="-")
 Settings. More...
 

Protected Attributes

 $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 26 of file class.ilPageMultiLangGUI.php.

References ilObjectTranslation\getInstance().

27  {
28  //$this->ml = new ilPageMultiLang($a_parent_type, $a_parent_id);
29 
30  // object translation
31  include_once("./Services/Object/classes/class.ilObjectTranslation.php");
32  $this->ot = ilObjectTranslation::getInstance($a_parent_id);
33 
34 // $this->single_page_mode = $a_single_page_mode;
35  }
static getInstance($a_obj_id)
Get instance.
+ Here is the call graph for this function:

Member Function Documentation

◆ executeCommand()

ilPageMultiLangGUI::executeCommand ( )

Execute command.

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

References $cmd, $ilCtrl, and array.

41  {
42  global $ilCtrl;
43 
44  $next_class = $ilCtrl->getNextClass();
45 
46  switch ($next_class)
47  {
48  default:
49  $cmd = $ilCtrl->getCmd("settings");
50  if (in_array($cmd, array("settings", "activateMultilinguality", "cancel",
51  "saveMultilingualitySettings", "confirmDeactivateMultiLanguage", "addLanguage",
52  "saveLanguages", "deactivateMultiLang", "confirmRemoveLanguages",
53  "removeLanguages")))
54  {
55  $this->$cmd();
56  }
57  }
58  }
$cmd
Definition: sahs_server.php:35
global $ilCtrl
Definition: ilias.php:18
Create styles array
The data for the language used.

◆ getMultiLangInfo()

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

Settings.

Activate multi language (-> master language selection) Get multi language form Return to parent Save multlilinguality settings Get multi lang info

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

References $lng, and $tpl.

201  {
202  global $lng;
203 
204  if ($a_page_lang == "")
205  {
206  $a_page_lang = "-";
207  }
208 
209  $lng->loadLanguageModule("meta");
210 
211  $tpl = new ilTemplate("tpl.page_multi_lang_info.html", true, true, "Services/COPage");
212  $tpl->setVariable("TXT_MASTER_LANG", $lng->txt("obj_master_lang"));
213  $tpl->setVariable("VAL_ML", $lng->txt("meta_l_".$this->ot->getMasterLanguage()));
214  $cl = ($a_page_lang == "-")
215  ? $this->ot->getMasterLanguage()
216  : $a_page_lang;
217  $tpl->setVariable("TXT_CURRENT_LANG", $lng->txt("cont_current_lang"));
218  $tpl->setVariable("VAL_CL", $lng->txt("meta_l_".$cl));
219  return $tpl->get();
220  }
global $tpl
Definition: ilias.php:8
special template class to simplify handling of ITX/PEAR
global $lng
Definition: privfeed.php:17

Field Documentation

◆ $single_page_mode

ilPageMultiLangGUI::$single_page_mode = false
protected

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


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