ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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;
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}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
buildExportFileHTML()
build html export file
__construct(ilObjGlossary $a_glo_obj, string $a_mode)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS Setting Class.
Interface ilDBInterface.
global $ilSetting
Definition: privfeed.php:31
global $DIC
Definition: shib_login.php:26