ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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", "components/ILIAS/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 {
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}
loadLanguageModule(string $a_module)
Load language module.
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...
static prepareFormOutput($a_str, bool $a_strip=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(object $a_parent_obj, string $a_parent_cmd)
fillRow(array $a_set)
Standard Version of Fill Row.
User class.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setLimit(int $a_limit=0, int $a_default_limit=0)
set max.
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
setFormAction(string $a_form_action, bool $a_multipart=false)
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)
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setId(string $a_val)
setData(array $a_data)
Set table data.
ilLanguage $lng
Interface ilAccessHandler This interface combines all available interfaces which can be called via gl...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26