ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
ilGlossaryExport Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilGlossaryExport:

Public Member Functions

 __construct (ilObjGlossary $a_glo_obj, string $a_mode)
 
 getInstId ()
 
 buildExportFileHTML ()
 build html export file More...
 

Data Fields

ilObjGlossary $glo_obj
 
int $inst_id
 

Protected Attributes

string $export_dir = ""
 
string $filename = ""
 
string $subdir = ""
 
string $mode
 
ilSetting $settings
 
ilDBInterface $db
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Export class for content objects

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 24 of file class.ilGlossaryExport.php.

Constructor & Destructor Documentation

◆ __construct()

ilGlossaryExport::__construct ( ilObjGlossary  $a_glo_obj,
string  $a_mode 
)

Definition at line 35 of file class.ilGlossaryExport.php.

References $DIC, $ilDB, $ilSetting, and ILIAS\Repository\settings().

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  }
global $DIC
Definition: shib_login.php:26
global $ilSetting
Definition: privfeed.php:31
+ Here is the call graph for this function:

Member Function Documentation

◆ buildExportFileHTML()

ilGlossaryExport::buildExportFileHTML ( )

build html export file

Definition at line 68 of file class.ilGlossaryExport.php.

68  : 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  }

◆ getInstId()

ilGlossaryExport::getInstId ( )

Definition at line 60 of file class.ilGlossaryExport.php.

References $inst_id.

60  : int
61  {
62  return $this->inst_id;
63  }

Field Documentation

◆ $db

ilDBInterface ilGlossaryExport::$db
protected

Definition at line 31 of file class.ilGlossaryExport.php.

◆ $export_dir

string ilGlossaryExport::$export_dir = ""
protected

Definition at line 26 of file class.ilGlossaryExport.php.

◆ $filename

string ilGlossaryExport::$filename = ""
protected

Definition at line 27 of file class.ilGlossaryExport.php.

◆ $glo_obj

ilObjGlossary ilGlossaryExport::$glo_obj

Definition at line 32 of file class.ilGlossaryExport.php.

◆ $inst_id

int ilGlossaryExport::$inst_id

Definition at line 33 of file class.ilGlossaryExport.php.

Referenced by getInstId().

◆ $mode

string ilGlossaryExport::$mode
protected

Definition at line 29 of file class.ilGlossaryExport.php.

◆ $settings

ilSetting ilGlossaryExport::$settings
protected

Definition at line 30 of file class.ilGlossaryExport.php.

◆ $subdir

string ilGlossaryExport::$subdir = ""
protected

Definition at line 28 of file class.ilGlossaryExport.php.


The documentation for this class was generated from the following file: