ILIAS  trunk Revision v11.0_alpha-2645-g16283d3b3f8
ILIAS\Glossary\Export\GlossaryHtmlExport Class Reference
+ Collaboration diagram for ILIAS\Glossary\Export\GlossaryHtmlExport:

Public Member Functions

 __construct (\ilObjGlossary $glo, string $exp_dir, string $sub_dir)
 
 exportHTML ()
 
 exportHTMLGlossaryTerms ()
 

Protected Member Functions

 getInitialisedTemplate ()
 
 initScreen (int $term_id)
 Init page. More...
 

Protected Attributes

ExportCollector $collector
 
ilGlossaryPresentationGUI $glo_gui
 
ilObjGlossary $glossary
 
string $export_dir
 
string $sub_dir
 
string $target_dir
 
ILIAS GlobalScreen Services $global_screen
 
Util $export_util
 
ilCOPageHTMLExport $co_page_html_export
 
ILIAS Style Content Object ObjectFacade $content_style
 
ILIAS Glossary InternalService $service
 
ilPresentationFullGUI $glo_full_gui
 
ilPresentationTableGUI $glo_table_gui
 

Detailed Description

Definition at line 27 of file GlossaryHtmlExport.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Glossary\Export\GlossaryHtmlExport::__construct ( \ilObjGlossary  $glo,
string  $exp_dir,
string  $sub_dir 
)

Definition at line 43 of file GlossaryHtmlExport.php.

References $DIC, ILIAS\Glossary\Export\GlossaryHtmlExport\$sub_dir, ilObject\getId(), ilObject\getRefId(), ilHTMLExportViewLayoutProvider\HTML_EXPORT_RENDERING, and null.

47  {
48  global $DIC;
49 
50  $this->glossary = $glo;
51  $this->export_dir = $exp_dir;
52  $this->sub_dir = $sub_dir;
53  $this->target_dir = $exp_dir . "/" . $sub_dir;
54 
55  $this->service = $DIC->glossary()
56  ->internal();
57  $this->global_screen = $DIC->globalScreen();
58 
59  $this->collector = $DIC->export()->domain()->html()->collector($glo->getId());
60  $this->collector->init();
61  $this->export_util = new Util("", "", $this->collector);
62  $this->co_page_html_export = new \ilCOPageHTMLExport($this->target_dir, null, 0, $this->collector);
63 
64  // get glossary presentation gui classes
65  $this->glo_gui = new \ilGlossaryPresentationGUI("html", $this->target_dir);
66  $this->glo_full_gui = $this->service
67  ->gui()
68  ->presentation()
69  ->PresentationFullGUI($this->glo_gui, $this->glossary, true);
70  $this->glo_table_gui = $this->service
71  ->gui()
72  ->presentation()
73  ->PresentationTableGUI($this->glo_gui, $this->glossary, true);
74 
75  $this->global_screen->tool()->context()->current()->addAdditionalData(\ilHTMLExportViewLayoutProvider::HTML_EXPORT_RENDERING, true);
76  $this->content_style = $DIC
77  ->contentStyle()
78  ->domain()
79  ->styleForRefId($glo->getRefId());
80  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
global $DIC
Definition: shib_login.php:26
+ Here is the call graph for this function:

Member Function Documentation

◆ exportHTML()

ILIAS\Glossary\Export\GlossaryHtmlExport::exportHTML ( )

Definition at line 82 of file GlossaryHtmlExport.php.

References ILIAS\Glossary\Export\GlossaryHtmlExport\exportHTMLGlossaryTerms().

82  : void
83  {
84  $this->export_util->exportSystemStyle(
85  [
86  "icon_glo.svg"
87  ]
88  );
89  $this->export_util->exportCOPageFiles($this->content_style->getEffectiveStyleId(), "glo");
90 
91  // export terms
92  $this->exportHTMLGlossaryTerms();
93 
94  $this->export_util->exportResourceFiles();
95 
96  $this->co_page_html_export->exportPageElements();
97  }
+ Here is the call graph for this function:

◆ exportHTMLGlossaryTerms()

ILIAS\Glossary\Export\GlossaryHtmlExport::exportHTMLGlossaryTerms ( )
Exceptions

Definition at line 151 of file GlossaryHtmlExport.php.

References ILIAS\Glossary\Export\GlossaryHtmlExport\initScreen().

Referenced by ILIAS\Glossary\Export\GlossaryHtmlExport\exportHTML().

151  : void
152  {
153  $tpl = $this->initScreen(0);
154  $tpl->setTitle($this->glossary->getTitle());
155  if ($this->glossary->getPresentationMode() == "full_def") {
156  $content = $this->glo_full_gui->renderPanelForOffline();
157  } else {
158  $content = $this->glo_table_gui->renderPresentationTableForOffline();
159  }
160  $this->collector->addString($content, "index.html");
161 
162  $terms = $this->glossary->getTermList();
163  foreach ($terms as $term) {
164  $this->initScreen($term["id"]);
165  $content = $this->glo_gui->listDefinitions($this->glossary->getRefId(), $term["id"], false);
166  $this->collector->addString($content, "term_" . $term["id"] . ".html");
167 
168  // store linked/embedded media objects of glosssary term
169  $this->co_page_html_export->collectPageElements("term:pg", $term["id"], "");
170  }
171  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getInitialisedTemplate()

ILIAS\Glossary\Export\GlossaryHtmlExport::getInitialisedTemplate ( )
protected

Definition at line 99 of file GlossaryHtmlExport.php.

References $DIC.

Referenced by ILIAS\Glossary\Export\GlossaryHtmlExport\initScreen().

100  {
101  global $DIC;
102 
103  $tabs = $DIC->tabs();
104 
105  $tabs->clearTargets();
106  $tabs->clearSubTabs();
107  $tpl = new \ilGlobalPageTemplate($DIC->globalScreen(), $DIC->ui(), $DIC->http());
108 
109  $this->co_page_html_export->getPreparedMainTemplate($tpl);
110 
111  return $tpl;
112  }
global $DIC
Definition: shib_login.php:26
+ Here is the caller graph for this function:

◆ initScreen()

ILIAS\Glossary\Export\GlossaryHtmlExport::initScreen ( int  $term_id)
protected

Init page.

Exceptions

Definition at line 118 of file GlossaryHtmlExport.php.

References $params, ilObjStyleSheet\getContentStylePath(), ILIAS\Glossary\Export\GlossaryHtmlExport\getInitialisedTemplate(), ilUtil\getStyleSheetLocation(), and ilPCQuestion\resetInitialState().

Referenced by ILIAS\Glossary\Export\GlossaryHtmlExport\exportHTMLGlossaryTerms().

119  {
120  $this->global_screen->layout()->meta()->reset();
121 
122  // load style sheet depending on user's settings
123  $location_stylesheet = \ilUtil::getStyleSheetLocation();
124  $this->global_screen->layout()->meta()->addCss($location_stylesheet);
125  $this->global_screen->layout()->meta()->addCss(
126  \ilObjStyleSheet::getContentStylePath($this->content_style->getEffectiveStyleId())
127  );
128 
129  //$this->addSupplyingExportFiles();
130 
131  // template workaround: reset of template
132  $tpl = $this->getInitialisedTemplate();
134 
135  $params = [
136  "term_id" => $term_id,
137  "ref_id" => $this->glossary->getRefId(),
138  "frame" => "_blank"
139  ];
140 
141  $this->glo_gui->initByRequest($params);
142 
143  $this->glo_gui->injectTemplate($tpl);
144  return $tpl;
145  }
static getStyleSheetLocation(string $mode="output", string $a_css_name="")
get full style sheet file name (path inclusive) of current user
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:31
static getContentStylePath(int $a_style_id, bool $add_random=true, bool $add_token=true)
get content style path static (to avoid full reading)
static resetInitialState()
Reset initial state (for exports)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $co_page_html_export

ilCOPageHTMLExport ILIAS\Glossary\Export\GlossaryHtmlExport::$co_page_html_export
protected

Definition at line 37 of file GlossaryHtmlExport.php.

◆ $collector

ExportCollector ILIAS\Glossary\Export\GlossaryHtmlExport::$collector
protected

Definition at line 29 of file GlossaryHtmlExport.php.

◆ $content_style

ILIAS Style Content Object ObjectFacade ILIAS\Glossary\Export\GlossaryHtmlExport::$content_style
protected

Definition at line 38 of file GlossaryHtmlExport.php.

◆ $export_dir

string ILIAS\Glossary\Export\GlossaryHtmlExport::$export_dir
protected

Definition at line 32 of file GlossaryHtmlExport.php.

◆ $export_util

Util ILIAS\Glossary\Export\GlossaryHtmlExport::$export_util
protected

Definition at line 36 of file GlossaryHtmlExport.php.

◆ $glo_full_gui

ilPresentationFullGUI ILIAS\Glossary\Export\GlossaryHtmlExport::$glo_full_gui
protected

Definition at line 40 of file GlossaryHtmlExport.php.

◆ $glo_gui

ilGlossaryPresentationGUI ILIAS\Glossary\Export\GlossaryHtmlExport::$glo_gui
protected

Definition at line 30 of file GlossaryHtmlExport.php.

◆ $glo_table_gui

ilPresentationTableGUI ILIAS\Glossary\Export\GlossaryHtmlExport::$glo_table_gui
protected

Definition at line 41 of file GlossaryHtmlExport.php.

◆ $global_screen

ILIAS GlobalScreen Services ILIAS\Glossary\Export\GlossaryHtmlExport::$global_screen
protected

Definition at line 35 of file GlossaryHtmlExport.php.

◆ $glossary

ilObjGlossary ILIAS\Glossary\Export\GlossaryHtmlExport::$glossary
protected

Definition at line 31 of file GlossaryHtmlExport.php.

◆ $service

ILIAS Glossary InternalService ILIAS\Glossary\Export\GlossaryHtmlExport::$service
protected

Definition at line 39 of file GlossaryHtmlExport.php.

◆ $sub_dir

string ILIAS\Glossary\Export\GlossaryHtmlExport::$sub_dir
protected

◆ $target_dir

string ILIAS\Glossary\Export\GlossaryHtmlExport::$target_dir
protected

Definition at line 34 of file GlossaryHtmlExport.php.


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