ILIAS  trunk Revision v11.0_alpha-1713-gd8962da2f67
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilGlossaryExport.php
Go to the documentation of this file.
1 <?php
2 
25 {
26  protected string $export_dir = "";
27  protected string $filename = "";
28  protected string $subdir = "";
29  protected string $mode;
30  protected ilSetting $settings;
31  protected ilDBInterface $db;
33  public int $inst_id;
34 
35  public function __construct(
36  ilObjGlossary $a_glo_obj,
37  string $a_mode
38  ) {
39  global $DIC;
40 
41  $this->settings = $DIC->settings();
42  $ilDB = $DIC->database();
43  $ilSetting = $DIC->settings();
44  $this->glo_obj = $a_glo_obj;
45  $this->db = $ilDB;
46  $this->mode = $a_mode;
47 
48  $settings = $ilSetting->getAll();
49  // The default '0' is required for the directory structure (smeyer)
50  $this->inst_id = $settings["inst_id"] ? $settings['inst_id'] : 0;
51 
52  $date = time();
53  if ($this->mode == "html") {
54  $this->export_dir = $this->glo_obj->getExportDirectory("html");
55  $this->subdir = $this->glo_obj->getType() . "_" . $this->glo_obj->getId();
56  $this->filename = $this->subdir . ".zip";
57  }
58  }
59 
60  public function getInstId(): int
61  {
62  return $this->inst_id;
63  }
64 
68  public function buildExportFileHTML(): void
69  {
70  // create directories
71  $this->glo_obj->createExportDirectory("html");
72 
73  // get html content
74  $exp = new \ILIAS\Glossary\Export\GlossaryHtmlExport(
75  $this->glo_obj,
76  $this->export_dir,
77  $this->subdir
78  );
79  $exp->exportHTML();
80  }
81 }
buildExportFileHTML()
build html export file
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(ilObjGlossary $a_glo_obj, string $a_mode)
global $DIC
Definition: shib_login.php:22
global $ilSetting
Definition: privfeed.php:31
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...