ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilMultiSrtConfirmationTable2GUI.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2015 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  protected $access;
26 
30  protected $user;
31 
32  protected $mob;
33 
37  public function __construct($a_parent_obj, $a_parent_cmd)
38  {
39  global $DIC;
40 
41  $this->ctrl = $DIC->ctrl();
42  $this->lng = $DIC->language();
43  $this->access = $DIC->access();
44  $this->user = $DIC->user();
45  $ilCtrl = $DIC->ctrl();
46  $lng = $DIC->language();
47  $ilAccess = $DIC->access();
48  $lng = $DIC->language();
49  $ilUser = $DIC->user();
50 
51  $this->mob = $a_parent_obj->object;
52  $lng->loadLanguageModule("meta");
53 
54  $this->setId("mob_msrt_upload");
55  parent::__construct($a_parent_obj, $a_parent_cmd);
56  $this->setLimit(9999);
57  $this->setData($this->mob->getMultiSrtFiles());
58  $this->setTitle($lng->txt("mob_multi_srt_files"));
59  $this->setSelectAllCheckbox("file");
60 
61  $this->addColumn("", "", "1px", true);
62  $this->addColumn($this->lng->txt("filename"), "filename");
63  $this->addColumn($this->lng->txt("language"), "language");
64 
65  $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
66  $this->setRowTemplate("tpl.multi_srt_confirmation_row.html", "Services/MediaObjects");
67 
68  $this->addCommandButton("saveMultiSrt", $lng->txt("save"));
69  $this->addCommandButton("cancelMultiSrt", $lng->txt("cancel"));
70  }
71 
75  protected function fillRow($a_set)
76  {
77  $lng = $this->lng;
78 
79  if ($a_set["lang"] != "") {
80  $this->tpl->setCurrentBlock("cb");
81  $language = $lng->txt("meta_l_" . $a_set["lang"]);
82  $this->tpl->setVariable("LANGUAGE", $language);
83  $this->tpl->setVariable("POST_FILE", ilUtil::prepareFormOutput($a_set["filename"]));
84  $this->tpl->parseCurrentBlock();
85  }
86  $this->tpl->setVariable("FILENAME", $a_set["filename"]);
87  }
88 }
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
global $DIC
Definition: saml.php:7
__construct($a_parent_obj, $a_parent_cmd)
Constructor.
setId($a_val)
Set id.
user()
Definition: user.php:4
global $ilCtrl
Definition: ilias.php:18
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
List srt files from zip file for upload confirmation.
Class ilTable2GUI.
setSelectAllCheckbox($a_select_all_checkbox, $a_select_all_on_top=false)
Set the name of the checkbox that should be toggled with a select all button.
$ilUser
Definition: imgupload.php:18
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.
setLimit($a_limit=0, $a_default_limit=0)