ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilSetupLanguageTableGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once("./Services/Table/classes/class.ilTable2GUI.php");
5
15{
16
20 function __construct($a_client)
21 {
22 global $ilCtrl, $lng, $ilAccess, $lng;
23
24 parent::__construct($a_parent_obj, $a_parent_cmd);
25 $this->setData($lng->getInstallableLanguages());
26 //$this->setTitle($lng->txt(""));
27 $this->setLimit(9999);
28
29 $this->addColumn($this->lng->txt("language"));
30 $this->addColumn($this->lng->txt("installed"));
31 $this->addColumn($this->lng->txt("include_local"));
32 $this->addColumn($this->lng->txt("default"));
33
34 $this->setEnableHeader(true);
35 $this->setFormAction("setup.php?cmd=gateway");
36 $this->setRowTemplate("tpl.setup_lang_table_row.html", "setup");
37 $this->disable("footer");
38 $this->setEnableTitle(true);
39 //$this->setWidth("");
40
41 $this->client = $a_client;
42 $this->installed_langs = $lng->getInstalledLanguages();
43 $this->installed_local_langs = $lng->getInstalledLocalLanguages();
44 $this->local_langs = $lng->getLocalLanguages();
45 $this->default_lang = $this->client->getDefaultLanguage();
46
47
48 $this->addCommandButton("saveLanguages", $lng->txt("save"));
49 }
50
54 protected function fillRow($lang_key)
55 {
56
57 global $lng;
58 $this->tpl->setVariable("LANG_KEY", $lang_key);
59 $this->tpl->setVariable("TXT_LANG", $this->lng->txt("lang_".$lang_key));
60
61 if (in_array($lang_key,$this->installed_langs))
62 {
63 $this->tpl->setVariable("CHECKED", ("checked=\"checked\""));
64 }
65
66 if (!in_array($lang_key,$this->local_langs))
67 {
68 $this->tpl->setVariable("LOCAL", ("disabled=\"disabled\""));
69 }
70 else if (in_array($lang_key,$this->installed_local_langs))
71 {
72 $this->tpl->setVariable("LOCAL", ("checked=\"checked\""));
73 }
74
75 if ($lang_key == $this->default_lang)
76 {
77 $this->tpl->setVariable("DEFAULT", ("checked=\"checked\""));
78 }
79 }
80
81}
82?>
fillRow($lang_key)
Fill table row.
Class ilTable2GUI.
setEnableHeader($a_enableheader)
Set Enable Header.
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
setData($a_data)
set table data @access public
setEnableTitle($a_enabletitle)
Set Enable Title.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setLimit($a_limit=0, $a_default_limit=0)
set max.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
disable($a_module_name)
diesables particular modules of table
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:40