ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
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.
 executeCommand ()
 Execute command.
 getMultiLangInfo ($a_page_lang="-")
 Settings.

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

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().

{
//$this->ml = new ilPageMultiLang($a_parent_type, $a_parent_id);
// object translation
include_once("./Services/Object/classes/class.ilObjectTranslation.php");
$this->ot = ilObjectTranslation::getInstance($a_parent_id);
// $this->single_page_mode = $a_single_page_mode;
}

+ Here is the call graph for this function:

Member Function Documentation

ilPageMultiLangGUI::executeCommand ( )

Execute command.

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

References $cmd, and $ilCtrl.

{
global $ilCtrl;
$next_class = $ilCtrl->getNextClass();
switch ($next_class)
{
default:
$cmd = $ilCtrl->getCmd("settings");
if (in_array($cmd, array("settings", "activateMultilinguality", "cancel",
"saveMultilingualitySettings", "confirmDeactivateMultiLanguage", "addLanguage",
"saveLanguages", "deactivateMultiLang", "confirmRemoveLanguages",
"removeLanguages")))
{
$this->$cmd();
}
}
}
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.

{
global $lng;
if ($a_page_lang == "")
{
$a_page_lang = "-";
}
$lng->loadLanguageModule("meta");
$tpl = new ilTemplate("tpl.page_multi_lang_info.html", true, true, "Services/COPage");
$tpl->setVariable("TXT_MASTER_LANG", $lng->txt("obj_master_lang"));
$tpl->setVariable("VAL_ML", $lng->txt("meta_l_".$this->ot->getMasterLanguage()));
$cl = ($a_page_lang == "-")
? $this->ot->getMasterLanguage()
: $a_page_lang;
$tpl->setVariable("TXT_CURRENT_LANG", $lng->txt("cont_current_lang"));
$tpl->setVariable("VAL_CL", $lng->txt("meta_l_".$cl));
return $tpl->get();
}

Field Documentation

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: