ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
class.ilTermDefinitionBulkCreationTableGUI.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
22 {
23  public function __construct(
24  ilTermDefinitionBulkCreationGUI $a_parent_obj,
25  string $a_parent_cmd,
26  string $raw_data,
27  ilObjGlossary $glossary
28  ) {
29  global $DIC;
30 
31  $this->setId("bulk_creation");
32  parent::__construct($a_parent_obj, $a_parent_cmd);
33  $term_manager = $DIC->glossary()
34  ->internal()
35  ->domain()
36  ->term($glossary);
37  $html_util = $DIC->glossary()->internal()->gui()->html();
38 
39  $ctrl = $DIC->ctrl();
40  $lng = $DIC->language();
41  $this->setMaxCount(9999);
42  $this->setShowRowsSelector(false);
43 
44  $this->setTitle($lng->txt("glo_term_definition_pairs"));
45  $this->setData($term_manager->getDataArrayFromInputString($raw_data));
46 
47  $this->addColumn($this->lng->txt("cont_term"));
48  $this->addColumn($this->lng->txt("cont_definition"));
49 
50  $this->setFormAction($ctrl->getFormAction($a_parent_obj, "createTermDefinitionPairs"));
51  $this->setRowTemplate(
52  "tpl.bulk_creation_row.html",
53  "Modules/Glossary"
54  );
55  $this->addHiddenInput(
56  "bulk_data",
57  $html_util->escape($raw_data)
58  );
59  }
60 
61  protected function fillRow(array $a_set): void
62  {
63  $this->tpl->setVariable("TERM", $a_set["term"]);
64  $this->tpl->setVariable("DEFINITION", $a_set["definition"]);
65  }
66 }
setData(array $a_data)
__construct(ilTermDefinitionBulkCreationGUI $a_parent_obj, string $a_parent_cmd, string $raw_data, ilObjGlossary $glossary)
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)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilLanguage $lng
setId(string $a_val)
global $DIC
Definition: feed.php:28
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector.
__construct(VocabulariesInterface $vocabularies)
addHiddenInput(string $a_name, string $a_value)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
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)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getFormAction(object $a_gui_obj, string $a_fallback_cmd=null, string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
setMaxCount(int $a_max_count)
set max.