ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilPageMultiLangTableGUI.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/Table/classes/class.ilTable2GUI.php");
6 
16 {
20  protected $ctrl;
21 
25  public function __construct($a_parent_obj, $a_parent_cmd)
26  {
27  global $DIC;
28 
29  $this->ctrl = $DIC->ctrl();
30  $this->lng = $DIC->language();
31  $ilCtrl = $DIC->ctrl();
32  $lng = $DIC->language();
33  $lng = $DIC->language();
34 
35  $lng->loadLanguageModule("meta");
36 
37  parent::__construct($a_parent_obj, $a_parent_cmd);
38  $this->setTitle($lng->txt("cont_languages"));
39 
40  $this->addColumn("", "", "1");
41  $this->addColumn($this->lng->txt("cont_language"));
42 
43  $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
44  $this->setRowTemplate("tpl.page_ml_row.html", "Services/COPage");
45 
46  //if (count($this->getData()) > 1)
47  //{
48  $this->addMultiCommand("confirmRemoveLanguages", $lng->txt("remove"));
49  //}
50  //$this->addCommandButton("", $lng->txt(""));
51  }
52 
56  protected function fillRow($a_set)
57  {
58  $lng = $this->lng;
59 
60  if (!$a_set["master"]) {
61  $this->tpl->setCurrentBlock("cb");
62  $this->tpl->setVariable("CB_LANG", $a_set["lang"]);
63  $this->tpl->parseCurrentBlock();
64  } else {
65  $this->tpl->setVariable("ML", "(" . $lng->txt("cont_master_lang") . ")");
66  }
67  $this->tpl->setVariable("LANG", $lng->txt("meta_l_" . $a_set["lang"]));
68  }
69 }
global $DIC
Definition: saml.php:7
global $ilCtrl
Definition: ilias.php:18
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
Class ilTable2GUI.
addMultiCommand($a_cmd, $a_text)
Add Command button.
__construct($a_parent_obj, $a_parent_cmd)
Constructor.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
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.