39 protected \ILIAS\Glossary\InternalService
$service;
49 $this->glossary = $glo;
50 $this->export_dir = $exp_dir;
52 $this->target_dir = $exp_dir .
"/" .
$sub_dir;
54 $this->service = $DIC->glossary()
56 $this->global_screen = $DIC->globalScreen();
57 $this->export_util = new \ILIAS\Services\Export\HTML\Util($exp_dir, $sub_dir);
58 $this->co_page_html_export = new \ilCOPageHTMLExport($this->target_dir);
61 $this->glo_gui = new \ilGlossaryPresentationGUI(
"html", $this->target_dir);
62 $this->glo_full_gui = $this->service
65 ->PresentationFullGUI($this->glo_gui, $this->glossary,
true);
68 $this->content_style = $DIC
84 $this->export_util->exportSystemStyle();
85 $this->export_util->exportCOPageFiles($this->content_style->getEffectiveStyleId(),
"glo");
90 $this->export_util->exportResourceFiles();
92 $this->co_page_html_export->exportPageElements();
101 $zip_file = $this->glossary->getExportDirectory(
"html") .
"/" . $date .
"__" .
IL_INST_ID .
"__" .
102 $this->glossary->getType() .
"_" . $this->glossary->getId() .
".zip";
112 $tabs = $DIC->tabs();
114 $tabs->clearTargets();
115 $tabs->clearSubTabs();
116 $tpl = new \ilGlobalPageTemplate($DIC->globalScreen(), $DIC->ui(), $DIC->http());
118 $this->co_page_html_export->getPreparedMainTemplate($tpl);
129 $this->global_screen->layout()->meta()->reset();
133 $this->global_screen->layout()->meta()->addCss($location_stylesheet);
134 $this->global_screen->layout()->meta()->addCss(
145 "term_id" => $term_id,
146 "ref_id" => $this->glossary->getRefId(),
150 $this->glo_gui->initByRequest(
$params);
152 $this->glo_gui->injectTemplate($tpl);
163 $tpl->setTitle($this->glossary->getTitle());
164 if ($this->glossary->getPresentationMode() ==
"full_def") {
165 $content = $this->glo_full_gui->renderPanelForOffline();
167 $content = $this->glo_gui->listTerms();
169 $file = $this->target_dir .
"/index.html";
172 $fp = fopen($file,
"w+");
173 fwrite($fp, $content);
176 $terms = $this->glossary->getTermList();
177 foreach ($terms as $term) {
179 $content = $this->glo_gui->listDefinitions($this->glossary->getRefId(), $term[
"id"],
false);
180 $file = $this->target_dir .
"/term_" . $term[
"id"] .
".html";
183 $fp = fopen($file,
"w+");
184 fwrite($fp, $content);
188 $this->co_page_html_export->collectPageElements(
"term:pg", $term[
"id"],
"");
initScreen(int $term_id)
Init page.
__construct(\ilObjGlossary $glo, string $exp_dir, string $sub_dir)
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getStyleSheetLocation(string $mode="output", string $a_css_name="", string $a_css_location="")
get full style sheet file name (path inclusive) of current user
ilPresentationFullGUI $glo_full_gui
ILIAS GlobalScreen Services $global_screen
static delDir(string $a_dir, bool $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
ILIAS Glossary InternalService $service
static getContentStylePath(int $a_style_id, bool $add_random=true, bool $add_token=true)
get content style path static (to avoid full reading)
ILIAS Services Export HTML Util $export_util
exportHTMLGlossaryTerms()
static resetInitialState()
Reset initial state (for exports)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static zip(string $a_dir, string $a_file, bool $compress_content=false)
const HTML_EXPORT_RENDERING
ILIAS Style Content Object ObjectFacade $content_style
ilCOPageHTMLExport $co_page_html_export
ilGlossaryPresentationGUI $glo_gui
static makeDir(string $a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...