ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilMultiSrtConfirmationTable2GUI.php
Go to the documentation of this file.
1 <?php
2 
25 {
27  protected ilObjUser $user;
29 
30  public function __construct(
31  object $a_parent_obj,
32  string $a_parent_cmd
33  ) {
34  global $DIC;
35 
36  $this->ctrl = $DIC->ctrl();
37  $this->lng = $DIC->language();
38  $this->access = $DIC->access();
39  $this->user = $DIC->user();
40  $ilCtrl = $DIC->ctrl();
41  $lng = $DIC->language();
42 
43  $this->mob = $a_parent_obj->getObject();
44  $lng->loadLanguageModule("meta");
45 
46  $this->setId("mob_msrt_upload");
47  parent::__construct($a_parent_obj, $a_parent_cmd);
48  $this->setLimit(9999);
49  $this->setData($this->mob->getMultiSrtFiles());
50  $this->setTitle($lng->txt("mob_multi_srt_files"));
51  $this->setSelectAllCheckbox("file");
52 
53  $this->addColumn("", "", "1px", true);
54  $this->addColumn($this->lng->txt("filename"), "filename");
55  $this->addColumn($this->lng->txt("language"), "language");
56 
57  $this->setFormAction($ilCtrl->getFormAction($a_parent_obj));
58  $this->setRowTemplate("tpl.multi_srt_confirmation_row.html", "Services/MediaObjects");
59 
60  $this->addCommandButton("saveMultiSrt", $lng->txt("save"));
61  $this->addCommandButton("cancelMultiSrt", $lng->txt("cancel"));
62  }
63 
64  protected function fillRow(array $a_set): void
65  {
66  $lng = $this->lng;
67 
68  if ($a_set["lang"] != "") {
69  $this->tpl->setCurrentBlock("cb");
70  $language = $lng->txt("meta_l_" . $a_set["lang"]);
71  $this->tpl->setVariable("LANGUAGE", $language);
72  $this->tpl->setVariable("POST_FILE", ilLegacyFormElementsUtil::prepareFormOutput($a_set["filename"]));
73  $this->tpl->parseCurrentBlock();
74  }
75  $this->tpl->setVariable("FILENAME", $a_set["filename"]);
76  }
77 }
setData(array $a_data)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setFormAction(string $a_form_action, bool $a_multipart=false)
__construct(object $a_parent_obj, string $a_parent_cmd)
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
loadLanguageModule(string $a_module)
Load language module.
static prepareFormOutput($a_str, bool $a_strip=false)
ilLanguage $lng
setId(string $a_val)
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
__construct(Container $dic, ilPlugin $plugin)
setLimit(int $a_limit=0, int $a_default_limit=0)
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)