ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilGlossaryPresentationGUI Class Reference
+ Inheritance diagram for ilGlossaryPresentationGUI:
+ Collaboration diagram for ilGlossaryPresentationGUI:

Public Member Functions

 __construct (string $export_format="", string $export_dir="")
 
 initByRequest (?array $query_params=null)
 Init services and this class by request params. More...
 
 injectTemplate (ilGlobalTemplateInterface $tpl)
 
 setOfflineMode (bool $a_offline=true)
 set offline mode (content is generated for offline package) More...
 
 offlineMode ()
 checks wether offline content generation is activated More...
 
 setOfflineDirectory (string $a_dir)
 
 getOfflineDirectory ()
 
 executeCommand ()
 execute command More...
 
 prepareOutput ()
 
 basicPageGuiInit (\ilPageObjectGUI $a_page_gui)
 Basic page gui initialisation. More...
 
 listTerms ()
 
 listTermByGivenAsTable ()
 list glossary terms More...
 
 listTermByGivenAsPanel ()
 list glossary terms More...
 
 getPresentationTable ()
 Get presentation table. More...
 
 applyFilter ()
 
 resetFilter ()
 
 listDefinitions (int $a_ref_id=0, int $a_term_id=0, bool $a_get_html=false, bool $render_term=true, string $a_page_mode=ilPageObjectGUI::PRESENTATION, bool $render_page_container=true)
 list definitions of a term More...
 
 showDefinitionTabs (string $a_act)
 
 fullscreen ()
 
 media (string $a_mode="media")
 show media object More...
 
 showDownloadList ()
 show download list More...
 
 downloadExportFile ()
 send download file (xml/html) More...
 
 setLocator ()
 
 downloadFile ()
 
 setTabs ()
 
 getLink (int $a_ref_id, string $a_cmd="", int $a_term_id=0, string $a_frame="", string $a_type="")
 
 printViewSelection ()
 
 initPrintViewSelectionForm ()
 Init print view selection form. More...
 
 printView ()
 
 getTabs ()
 
 infoScreen ()
 this one is called from the info button in the repository More...
 
 outputInfoScreen ()
 
 chooseLetter ()
 
 showTaxonomy ()
 
 showFlashcards ()
 

Protected Member Functions

 setContentStyles ()
 

Protected Attributes

ILIAS Glossary Taxonomy TaxonomyManager $tax_manager
 
ILIAS COPage Xsl XslManager $xsl
 
ILIAS GlobalScreen Services $global_screen
 
ILIAS Glossary InternalGUIService $gui
 
ILIAS Glossary InternalDomainService $domain
 
array $mobs
 
bool $fill_on_load_code
 
string $offline_dir
 
ilPropertyFormGUI $form
 
bool $offline
 
string $export_format
 
ilCtrl $ctrl
 
ilTabsGUI $tabs_gui
 
ilAccessHandler $access
 
ilNavigationHistory $nav_history
 
ilToolbarGUI $toolbar
 
ilObjUser $user
 
ilHelpGUI $help
 
ilObjGlossary $glossary
 
ilObjGlossaryGUI $glossary_gui
 
ilGlobalTemplateInterface $tpl
 
ilLanguage $lng
 
int $tax_node
 
int $tax_id
 
ilObjTaxonomy $tax
 
int $term_id
 
int $requested_ref_id
 
string $requested_letter
 
int $requested_def_page_id
 
string $requested_search_str
 
string $requested_file_id
 
int $requested_mob_id
 
string $requested_export_type
 
ILIAS Style Content Service $content_style_service
 
ILIAS Style Content GUIService $content_style_gui
 
ILIAS Style Content Object ObjectFacade $content_style_domain
 
ILIAS UI Factory $ui_fac
 
ILIAS UI Renderer $ui_ren
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilGlossaryPresentationGUI::__construct ( string  $export_format = "",
string  $export_dir = "" 
)

Definition at line 67 of file class.ilGlossaryPresentationGUI.php.

References $DIC, $export_format, $service, ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ILIAS\Repository\help(), initByRequest(), ILIAS\Repository\lng(), setOfflineDirectory(), ILIAS\Repository\toolbar(), and ILIAS\Repository\user().

70  {
71  global $DIC;
72 
73  $service = $DIC->glossary()->internal();
74 
75  $this->domain = $domain = $service->domain();
76  $this->gui = $gui = $service->gui();
77 
78  $this->access = $DIC->access();
79  $this->user = $domain->user();
80  $this->lng = $DIC->language();
81 
82  $this->toolbar = $gui->toolbar();
83  $this->help = $gui->help();
84  $this->nav_history = $DIC["ilNavigationHistory"];
85  $this->tpl = $gui->ui()->mainTemplate();
86  $this->ctrl = $gui->ctrl();
87  $this->tabs_gui = $gui->tabs();
88  $this->global_screen = $gui->globalScreen();
89 
90  $this->export_format = $export_format;
91  $this->setOfflineDirectory($export_dir);
92  $this->offline = ($export_format != "");
93  $this->ui_fac = $DIC->ui()->factory();
94  $this->ui_ren = $DIC->ui()->renderer();
95  $this->offline = ($export_format !== "");
96 
97  $this->ctrl->saveParameter($this, array("ref_id", "letter", "tax_node"));
98  $this->content_style_service =
99  $DIC->contentStyle();
100  $this->initByRequest();
101  $this->xsl = $DIC->copage()->internal()->domain()->xsl();
102  $this->tax_manager = $domain->taxonomy($this->glossary);
103  }
initByRequest(?array $query_params=null)
Init services and this class by request params.
global $DIC
Definition: feed.php:28
ILIAS Glossary InternalGUIService $gui
ILIAS Glossary InternalDomainService $domain
$service
Definition: ltiservices.php:43
+ Here is the call graph for this function:

Member Function Documentation

◆ applyFilter()

ilGlossaryPresentationGUI::applyFilter ( )

Definition at line 421 of file class.ilGlossaryPresentationGUI.php.

References getPresentationTable(), and listTerms().

421  : void
422  {
423  $prtab = $this->getPresentationTable();
424  $prtab->resetOffset();
425  $prtab->writeFilterToSession();
426  $this->listTerms();
427  }
getPresentationTable()
Get presentation table.
+ Here is the call graph for this function:

◆ basicPageGuiInit()

ilGlossaryPresentationGUI::basicPageGuiInit ( \ilPageObjectGUI  $a_page_gui)

Basic page gui initialisation.

Definition at line 276 of file class.ilGlossaryPresentationGUI.php.

References ILIAS\Repository\ctrl(), ilPageObjectGUI\getId(), getLink(), getOfflineDirectory(), offlineMode(), ilPageObjectGUI\setFileDownloadLink(), ilPageObjectGUI\setFullscreenLink(), ilPageObjectGUI\setOfflineDirectory(), ilPageObjectGUI\setOutputMode(), and ilPageObjectGUI\setStyleId().

Referenced by executeCommand(), and listDefinitions().

278  : void {
279  $a_page_gui->setStyleId($this->content_style_domain->getEffectiveStyleId());
280  if (!$this->offlineMode()) {
281  $a_page_gui->setOutputMode("presentation");
282  $this->fill_on_load_code = true;
283  } else {
284  $a_page_gui->setOutputMode("offline");
285  $a_page_gui->setOfflineDirectory($this->getOfflineDirectory());
286  $this->fill_on_load_code = false;
287  }
288  if (!$this->offlineMode()) {
289  $this->ctrl->setParameter($this, "pg_id", $a_page_gui->getId());
290  }
291  $a_page_gui->setFileDownloadLink($this->getLink($this->requested_ref_id, "downloadFile"));
292  $a_page_gui->setFullscreenLink($this->getLink($this->requested_ref_id, "fullscreen"));
293  }
offlineMode()
checks wether offline content generation is activated
getLink(int $a_ref_id, string $a_cmd="", int $a_term_id=0, string $a_frame="", string $a_type="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ chooseLetter()

ilGlossaryPresentationGUI::chooseLetter ( )

Definition at line 1196 of file class.ilGlossaryPresentationGUI.php.

References $ctrl, and ilCtrl\redirect().

1196  : void
1197  {
1198  $ilCtrl = $this->ctrl;
1199  $ilCtrl->redirect($this, "listTerms");
1200  }
redirect(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
+ Here is the call graph for this function:

◆ downloadExportFile()

ilGlossaryPresentationGUI::downloadExportFile ( )

send download file (xml/html)

Definition at line 824 of file class.ilGlossaryPresentationGUI.php.

References $access, $lng, ilFileDelivery\deliverFileLegacy(), and exit.

824  : void
825  {
826  $ilAccess = $this->access;
827  $lng = $this->lng;
828 
829  if (!$ilAccess->checkAccess("read", "", $this->requested_ref_id)) {
830  throw new ilPermissionException($lng->txt("permission_denied"));
831  }
832 
833  $file = $this->glossary->getPublicExportFile($this->requested_export_type);
834  if ($this->glossary->getPublicExportFile($this->requested_export_type) != "") {
835  $dir = $this->glossary->getExportDirectory($this->requested_export_type);
836  if (is_file($dir . "/" . $file)) {
837  ilFileDelivery::deliverFileLegacy($dir . "/" . $file, $file);
838  exit;
839  }
840  }
841  throw new ilGlossaryException($lng->txt("file_not_found"));
842  }
exit
Definition: login.php:29
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static deliverFileLegacy(string $a_file, ?string $a_filename=null, ?string $a_mime=null, ?bool $isInline=false, ?bool $removeAfterDelivery=false, ?bool $a_exit_after=true)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ downloadFile()

ilGlossaryPresentationGUI::downloadFile ( )

Definition at line 856 of file class.ilGlossaryPresentationGUI.php.

References $access, $lng, and exit.

856  : void
857  {
858  $ilAccess = $this->access;
859  $lng = $this->lng;
860 
861  if (!$ilAccess->checkAccess("read", "", $this->requested_ref_id)) {
862  throw new ilPermissionException($lng->txt("permission_denied"));
863  }
864 
865  $file = explode("_", $this->requested_file_id);
866  $fileObj = new ilObjFile($file[count($file) - 1], false);
867  $fileObj->sendFile();
868  exit;
869  }
exit
Definition: login.php:29
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilObjFile.

◆ executeCommand()

ilGlossaryPresentationGUI::executeCommand ( )

execute command

Definition at line 190 of file class.ilGlossaryPresentationGUI.php.

References $access, $lng, basicPageGuiInit(), ILIAS\Repository\ctrl(), getPresentationTable(), listDefinitions(), offlineMode(), outputInfoScreen(), prepareOutput(), setTabs(), and showTaxonomy().

190  : void
191  {
192  $lng = $this->lng;
193  $ilAccess = $this->access;
194 
195  $lng->loadLanguageModule("content");
196 
197  $next_class = $this->ctrl->getNextClass($this);
198  if ($this->glossary->isActiveFlashcards()) {
199  $cmd = $this->ctrl->getCmd("showFlashcards");
200  } else {
201  $cmd = $this->ctrl->getCmd("listTerms");
202  }
203 
204  // check write permission
205  if (!$ilAccess->checkAccess("read", "", $this->requested_ref_id) &&
206  !($ilAccess->checkAccess("visible", "", $this->requested_ref_id) &&
207  ($cmd == "infoScreen" || strtolower($next_class) == "ilinfoscreengui"))) {
208  throw new ilPermissionException($lng->txt("permission_denied"));
209  }
210 
211  if ($cmd != "listDefinitions") {
212  $this->prepareOutput();
213  }
214 
215  switch ($next_class) {
216  case "ilnotegui":
217  $this->setTabs();
218  $ret = $this->listDefinitions();
219  break;
220 
221  case "ilinfoscreengui":
222  $ret = $this->outputInfoScreen();
223  break;
224 
225  case "ilpresentationfullgui":
226  $this->setTabs();
227  $this->showTaxonomy();
228  $full_gui = $this->gui->presentation()
229  ->PresentationFullGUI($this, $this->glossary, $this->offlineMode(), $this->tax_node);
230  $this->ctrl->forwardCommand($full_gui);
231  break;
232 
233  case "ilpresentationlisttablegui":
234  $prtab = $this->getPresentationTable();
235  $this->ctrl->forwardCommand($prtab);
236  return;
237 
238  case "ilglossarydefpagegui":
239  $page_gui = new ilGlossaryDefPageGUI($this->requested_def_page_id);
240  $this->basicPageGuiInit($page_gui);
241  $this->ctrl->forwardCommand($page_gui);
242  break;
243 
244  case "ilglossaryflashcardgui":
245  $flash_gui = new ilGlossaryFlashcardGUI();
246  $this->ctrl->forwardCommand($flash_gui);
247  break;
248 
249  case "ilglossaryflashcardboxgui":
250  $flash_box_gui = new ilGlossaryFlashcardBoxGUI();
251  $this->ctrl->forwardCommand($flash_box_gui);
252  break;
253 
254  default:
255  $this->$cmd();
256  break;
257  }
258  $this->tpl->printToStdout();
259  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
basicPageGuiInit(\ilPageObjectGUI $a_page_gui)
Basic page gui initialisation.
GUI class for glossary flashcard boxes.
loadLanguageModule(string $a_module)
Load language module.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
GUI class for glossary flashcards.
listDefinitions(int $a_ref_id=0, int $a_term_id=0, bool $a_get_html=false, bool $render_term=true, string $a_page_mode=ilPageObjectGUI::PRESENTATION, bool $render_page_container=true)
list definitions of a term
offlineMode()
checks wether offline content generation is activated
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getPresentationTable()
Get presentation table.
+ Here is the call graph for this function:

◆ fullscreen()

ilGlossaryPresentationGUI::fullscreen ( )

Definition at line 657 of file class.ilGlossaryPresentationGUI.php.

References media().

657  : string
658  {
659  $html = $this->media("fullscreen");
660  return $html;
661  }
media(string $a_mode="media")
show media object
+ Here is the call graph for this function:

◆ getLink()

ilGlossaryPresentationGUI::getLink ( int  $a_ref_id,
string  $a_cmd = "",
int  $a_term_id = 0,
string  $a_frame = "",
string  $a_type = "" 
)

Definition at line 876 of file class.ilGlossaryPresentationGUI.php.

References ILIAS\Repository\ctrl(), and offlineMode().

Referenced by basicPageGuiInit(), listDefinitions(), and media().

882  : string {
883  $link = "";
884  if ($a_cmd == "") {
885  $a_cmd = "layout";
886  }
887  //$script = "glossary_presentation.php";
888 
889  // handle online links
890  if (!$this->offlineMode()) {
891  //$link = $script."?ref_id=".$a_ref_id;
892  switch ($a_cmd) {
893  case "fullscreen":
894  $this->ctrl->setParameter($this, "term_id", $a_term_id);
895  $link = $this->ctrl->getLinkTarget($this, "fullscreen");
896  break;
897 
898  default:
899  $link .= "&cmd=" . $a_cmd;
900  if ($a_frame != "") {
901  $this->ctrl->setParameter($this, "frame", $a_frame);
902  }
903  if ($a_type != "") {
904  $this->ctrl->setParameter($this, "obj_type", $a_type);
905  }
906  $link = $this->ctrl->getLinkTarget($this, $a_cmd);
907  break;
908  }
909  } else { // handle offline links
910  switch ($a_cmd) {
911  case "fullscreen":
912  $link = "fullscreen.html"; // id is handled by xslt
913  break;
914 
915  case "glossary":
916  $link = "term_" . $a_term_id . ".html";
917  break;
918 
919  case "downloadFile":
920  case "layout":
921  default:
922  break;
923  }
924  }
925  $this->ctrl->clearParameters($this);
926  return $link;
927  }
offlineMode()
checks wether offline content generation is activated
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getOfflineDirectory()

ilGlossaryPresentationGUI::getOfflineDirectory ( )

Definition at line 182 of file class.ilGlossaryPresentationGUI.php.

References $offline_dir.

Referenced by basicPageGuiInit(), and listDefinitions().

182  : string
183  {
184  return $this->offline_dir;
185  }
+ Here is the caller graph for this function:

◆ getPresentationTable()

ilGlossaryPresentationGUI::getPresentationTable ( )

Get presentation table.

Definition at line 408 of file class.ilGlossaryPresentationGUI.php.

References offlineMode().

Referenced by applyFilter(), executeCommand(), listTermByGivenAsTable(), and resetFilter().

409  {
410  $table = new ilPresentationListTableGUI(
411  $this,
412  "listTerms",
413  $this->glossary,
414  $this->offlineMode(),
415  $this->tax_node,
416  $this->glossary->getTaxonomyId()
417  );
418  return $table;
419  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
offlineMode()
checks wether offline content generation is activated
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTabs()

ilGlossaryPresentationGUI::getTabs ( )

Definition at line 1076 of file class.ilGlossaryPresentationGUI.php.

References $access, $ctrl, $help, $lng, $requested_ref_id, ILIAS\Repository\ctrl(), offlineMode(), and ilHelpGUI\setScreenIdComponent().

Referenced by setTabs().

1076  : void
1077  {
1078  $ilAccess = $this->access;
1079  $lng = $this->lng;
1080  $ilCtrl = $this->ctrl;
1081  $ilHelp = $this->help;
1082 
1083  $ilHelp->setScreenIdComponent("glo");
1084 
1085  if (!$this->offlineMode()) {
1086  if ($this->ctrl->getCmd() != "listDefinitions") {
1087  if ($ilAccess->checkAccess("read", "", $this->requested_ref_id)) {
1088  if ($this->glossary->isActiveFlashcards()) {
1089  $this->tabs_gui->addTab(
1090  "flashcards",
1091  $lng->txt("glo_flashcards"),
1092  $ilCtrl->getLinkTarget($this, "showFlashcards")
1093  );
1094  }
1095  $this->tabs_gui->addTab(
1096  "terms",
1097  $lng->txt("content"),
1098  $ilCtrl->getLinkTarget($this, "listTerms")
1099  );
1100  }
1101 
1102  $this->tabs_gui->addTab(
1103  "info",
1104  $lng->txt("info_short"),
1105  $ilCtrl->getLinkTarget($this, "infoScreen")
1106  );
1107 
1108 
1109  // glossary menu
1110  if ($ilAccess->checkAccess("read", "", $this->requested_ref_id)) {
1111  $this->tabs_gui->addTab(
1112  "print_view",
1113  $lng->txt("cont_print_view"),
1114  $ilCtrl->getLinkTarget($this, "printViewSelection")
1115  );
1116 
1117  // download links
1118  if ($this->glossary->isActiveDownloads()) {
1119  $this->tabs_gui->addTab(
1120  "download",
1121  $lng->txt("download"),
1122  $ilCtrl->getLinkTarget($this, "showDownloadList")
1123  );
1124  }
1125  //}
1126  }
1127 
1128  if ($ilAccess->checkAccess("write", "", $this->requested_ref_id) ||
1129  $ilAccess->checkAccess("edit_content", "", $this->requested_ref_id)) {
1130  $this->tabs_gui->addNonTabbedLink(
1131  "editing_view",
1132  $lng->txt("glo_editing_view"),
1133  "ilias.php?baseClass=ilGlossaryEditorGUI&ref_id=" . $this->requested_ref_id,
1134  "_top"
1135  );
1136  }
1137  }
1138  } else {
1139  $this->tabs_gui->addTarget(
1140  "cont_back",
1141  "index.html#term_" . $this->term_id,
1142  "",
1143  ""
1144  );
1145  }
1146  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setScreenIdComponent(string $a_comp)
offlineMode()
checks wether offline content generation is activated
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ infoScreen()

ilGlossaryPresentationGUI::infoScreen ( )

this one is called from the info button in the repository

Definition at line 1151 of file class.ilGlossaryPresentationGUI.php.

References ILIAS\Repository\ctrl(), and outputInfoScreen().

1151  : void
1152  {
1153  $this->ctrl->setCmd("showSummary");
1154  $this->ctrl->setCmdClass("ilinfoscreengui");
1155  $this->outputInfoScreen();
1156  }
+ Here is the call graph for this function:

◆ initByRequest()

ilGlossaryPresentationGUI::initByRequest ( ?array  $query_params = null)

Init services and this class by request params.

The request params are usually retrieved by HTTP request, but also adjusted during HTML exports, this is, why this method needs to be public.

Exceptions
ilGlossaryException

Definition at line 112 of file class.ilGlossaryPresentationGUI.php.

References ilGlossaryTerm\_lookGlossaryID(), and ilGlossaryTermReferences\isReferenced().

Referenced by __construct().

112  : void
113  {
114  $request = $this->gui
115  ->presentation()
116  ->request($query_params);
117 
118  $this->requested_ref_id = $request->getRefId();
119  $this->term_id = $request->getTermId();
120  $this->glossary_gui = $this->gui->presentation()->ObjGlossaryGUI($this->requested_ref_id);
121  $this->glossary = $this->glossary_gui->getGlossary();
122  $this->requested_def_page_id = $request->getDefinitionPageId();
123  $this->requested_search_str = $request->getSearchString();
124  $this->requested_file_id = $request->getFileId();
125  $this->requested_mob_id = $request->getMobId();
126  $this->requested_export_type = $request->getExportType();
127 
128 
129  // determine term id and check whether it is valid (belongs to
130  // current glossary or a virtual (online) sub-glossary)
131  $glo_ids = $this->glossary->getAllGlossaryIds();
132  $term_glo_id = ilGlossaryTerm::_lookGlossaryID($this->term_id);
133  if (!in_array($term_glo_id, $glo_ids) && !ilGlossaryTermReferences::isReferenced($glo_ids, $this->term_id)) {
134  if ($this->term_id > 0) {
135  throw new ilGlossaryException("Term ID does not match the glossary.");
136  }
137  $this->term_id = 0;
138  }
139 
140  $this->tax_node = 0;
141  $this->tax_id = $this->glossary->getTaxonomyId();
142  if ($this->tax_id > 0 && $this->glossary->getShowTaxonomy()) {
143  $this->tax = new ilObjTaxonomy($this->tax_id);
144  }
145  $requested_tax_node = $request->getTaxNode();
146  if ($requested_tax_node > 1 && $this->tax->getTree()->readRootId() != $requested_tax_node) {
147  $this->tax_node = $requested_tax_node;
148  }
149 
150  $this->requested_letter = $request->getLetter();
151 
152  $this->content_style_domain = $this->content_style_service->domain()->styleForRefId($this->glossary->getRefId());
153  $this->content_style_gui = $this->content_style_service->gui();
154  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static isReferenced(array $a_glo_id, int $a_term_id)
Is a term referenced by a set of glossaries.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookGlossaryID(int $term_id)
get glossary id form term id
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initPrintViewSelectionForm()

ilGlossaryPresentationGUI::initPrintViewSelectionForm ( )

Init print view selection form.

Definition at line 955 of file class.ilGlossaryPresentationGUI.php.

References $ctrl, $lng, ILIAS\Repository\form(), ilRadioGroupInputGUI\setValue(), ilRadioOption\setValue(), and ilSelectInputGUI\setValue().

Referenced by printView(), and printViewSelection().

955  : void
956  {
957  $lng = $this->lng;
958  $ilCtrl = $this->ctrl;
959 
960  $terms = $this->glossary->getTermList();
961 
962  $this->form = new ilPropertyFormGUI();
963  //$this->form->setTarget("print_view");
964  $this->form->setFormAction($ilCtrl->getFormAction($this));
965 
966  // selection type
967  $radg = new ilRadioGroupInputGUI($lng->txt("cont_selection"), "sel_type");
968  $radg->setValue("glossary");
969 
970  // current term
971  if ($this->term_id > 0) {
972  $op1 = new ilRadioOption($lng->txt("cont_current_term"), "term");
973  $radg->addOption($op1);
974  $radg->setValue("term");
975  }
976 
977  // whole glossary
978  $op2 = new ilRadioOption($lng->txt("cont_whole_glossary")
979  . " (" . $lng->txt("cont_terms") . ": " . count($terms) . ")", "glossary");
980  $radg->addOption($op2);
981 
982  // selected topic
983  if (($t_id = $this->glossary->getTaxonomyId()) > 0 && $this->glossary->getShowTaxonomy()) {
984  $op4 = new ilRadioOption($lng->txt("cont_selected_topic"), "sel_topic");
985  $radg->addOption($op4);
986 
987  // topic drop down
988  $si = new ilTaxAssignInputGUI(
989  $t_id,
990  false,
991  $lng->txt("cont_topic"),
992  "topic",
993  false
994  );
995  if ($this->tax_node > 0) {
996  $si->setValue($this->tax_node);
997  }
998  $op4->addSubItem($si);
999  }
1000 
1001  // selected terms
1002  $op3 = new ilRadioOption($lng->txt("cont_selected_terms"), "selection");
1003  $radg->addOption($op3);
1004 
1005  $nl = new ilNestedListInputGUI("", "obj_id");
1006  $op3->addSubItem($nl);
1007  foreach ($terms as $t) {
1008  $nl->addListNode((string) $t["id"], (string) $t["term"], "0", false, false);
1009  }
1010 
1011  $this->form->addItem($radg);
1012 
1013  $this->form->addCommandButton("printView", $lng->txt("cont_show_print_view"));
1014  $this->form->setPreventDoubleSubmission(false);
1015 
1016  $this->form->setTitle($lng->txt("cont_print_selection"));
1017  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
This class represents a property in a property form.
setValue($a_value)
Set Value.
setValue(string $a_value)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
form( $class_path, string $cmd, string $submit_caption="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ injectTemplate()

ilGlossaryPresentationGUI::injectTemplate ( ilGlobalTemplateInterface  $tpl)

Definition at line 156 of file class.ilGlossaryPresentationGUI.php.

References $tpl.

156  : void
157  {
158  $this->tpl = $tpl;
159  }

◆ listDefinitions()

ilGlossaryPresentationGUI::listDefinitions ( int  $a_ref_id = 0,
int  $a_term_id = 0,
bool  $a_get_html = false,
bool  $render_term = true,
string  $a_page_mode = ilPageObjectGUI::PRESENTATION,
bool  $render_page_container = true 
)

list definitions of a term

Definition at line 440 of file class.ilGlossaryPresentationGUI.php.

References $access, Vendor\Package\$e, $lng, $ref_id, $requested_ref_id, $term_id, $tpl, $user, ilObject\_getAllReferences(), ilUserSearchCache\_getInstance(), ilLMPageObject\_getPresentationTitle(), ilInternalLink\_getSourcesOfTarget(), ilLMObject\_lookupContObjID(), ilObject\_lookupTitle(), basicPageGuiInit(), ILIAS\Repository\ctrl(), ilUtil\getImagePath(), getLink(), getOfflineDirectory(), ilUserSearchCache\LAST_QUERY, ILIAS\Repository\lng(), offlineMode(), ilPageObjectGUI\PRINTING, setContentStyles(), setLocator(), showDefinitionTabs(), and showTaxonomy().

Referenced by executeCommand(), and printView().

447  : string {
448  $ilUser = $this->user;
449  $ilAccess = $this->access;
450  $lng = $this->lng;
451  $tpl = $this->tpl;
452 
453  if ($a_ref_id == 0) {
455  } else {
456  $ref_id = $a_ref_id;
457  }
458  if ($a_term_id == 0) {
460  } else {
461  $term_id = $a_term_id;
462  }
463 
464  if (!$ilAccess->checkAccess("read", "", $ref_id)) {
465  throw new ilPermissionException($lng->txt("permission_denied"));
466  }
467 
468  // tabs
469  if ($this->glossary->getPresentationMode() != "full_def" &&
470  $a_page_mode != ilPageObjectGUI::PRINTING) {
471  $this->showDefinitionTabs("term_content");
472  }
473 
474  try {
475  $term = new ilGlossaryTerm($term_id);
476  } catch (Exception $e) {
477  return "";
478  }
479 
480  if (!$a_get_html) {
482 
483  $this->setContentStyles();
484 
485  if (!$this->offlineMode()) {
486  $this->setLocator();
487  }
488 
489  $tpl->setTitleIcon(ilUtil::getImagePath("standard/icon_glo.svg"));
490  $tpl->setTitle($this->lng->txt("cont_term") . ": " . $term->getTerm());
491 
492  // advmd block
493  $cmd = null;
494  if ($ilAccess->checkAccess("write", "", $this->requested_ref_id)) {
495  $cmd = array("edit" => $this->ctrl->getLinkTargetByClass(array("ilglossaryeditorgui", "ilobjglossarygui", "ilglossarytermgui", "ilobjectmetadatagui"), ""));
496  }
497  $mdgui = new ilObjectMetaDataGUI($this->glossary, "term", $term->getId());
498  $tpl->setRightContent($mdgui->getBlockHTML($cmd));
499  }
500 
501  $def_tpl = new ilTemplate("tpl.glossary_definition_list.html", true, true, "Modules/Glossary");
502 
503  if ($render_page_container) {
504  $def_tpl->touchBlock("page_container_1");
505  $def_tpl->touchBlock("page_container_2");
506  }
507 
508  if ($render_term) {
509  $def_tpl->setVariable("TXT_TERM", $term->getTerm());
510  }
511  $this->mobs = array();
512 
513  $page_gui = new ilGlossaryDefPageGUI($term_id);
514  $this->basicPageGuiInit($page_gui);
515  $page_gui->setGlossary($this->glossary);
516  $page_gui->setOutputMode($a_page_mode);
517  $page_gui->setStyleId($this->content_style_domain->getEffectiveStyleId());
518  $page = $page_gui->getPageObject();
519 
520  // internal links
521  $page->buildDom();
522 
523  if ($this->offlineMode()) {
524  $page_gui->setOutputMode("offline");
525  $page_gui->setOfflineDirectory($this->getOfflineDirectory());
526  }
527  $page_gui->setFullscreenLink($this->getLink($ref_id, "fullscreen", $term_id));
528 
529  $page_gui->setTemplateOutput(false);
530  $page_gui->setRawPageContent(true);
531  if (!$this->offlineMode()) {
532  $output = $page_gui->showPage();
533  } else {
534  $output = $page_gui->presentation($page_gui->getOutputMode());
535  }
536 
537  $def_tpl->setCurrentBlock("definition");
538  $def_tpl->setVariable("PAGE_CONTENT", $output);
539  $def_tpl->parseCurrentBlock();
540 
541  // display possible backlinks
542  $sources = ilInternalLink::_getSourcesOfTarget('git', $this->term_id, 0);
543 
544  if ($sources) {
545  $backlist_shown = false;
546  foreach ($sources as $src) {
547  $type = explode(':', $src['type']);
548 
549  if ($type[0] == 'lm' && $type[1] == 'pg') {
550  $title = ilLMPageObject::_getPresentationTitle($src['id']);
551  $lm_id = ilLMObject::_lookupContObjID($src['id']);
552  $lm_title = ilObject::_lookupTitle($lm_id);
553  $def_tpl->setCurrentBlock('backlink_item');
554  $ref_ids = ilObject::_getAllReferences($lm_id);
555  $access = false;
556  foreach ($ref_ids as $rid) {
557  if ($ilAccess->checkAccess("read", "", $rid)) {
558  $access = true;
559  }
560  }
561  if ($access) {
562  $def_tpl->setCurrentBlock("backlink_item");
563  $def_tpl->setVariable("BACKLINK_LINK", ILIAS_HTTP_PATH . "/goto.php?target=" . $type[1] . "_" . $src['id']);
564  $def_tpl->setVariable("BACKLINK_ITEM", $lm_title . ": " . $title);
565  $def_tpl->parseCurrentBlock();
566  $backlist_shown = true;
567  }
568  }
569  }
570  if ($backlist_shown) {
571  $def_tpl->setCurrentBlock("backlink_list");
572  $def_tpl->setVariable("BACKLINK_TITLE", $this->lng->txt('glo_term_used_in'));
573  $def_tpl->parseCurrentBlock();
574  }
575  }
576 
577  if (!$a_get_html) {
578  $tpl->setPermanentLink("git", null, $term_id . "_" . $ref_id);
579 
580  // show taxonomy
581  $this->showTaxonomy();
582  }
583 
584  // highlighting?
585  if ($this->requested_search_str != "" && !$this->offlineMode()) {
586  $cache = ilUserSearchCache::_getInstance($ilUser->getId());
587  $cache->switchSearchType(ilUserSearchCache::LAST_QUERY);
588  $search_string = $cache->getQuery();
589 
590  $p = new ilQueryParser($search_string);
591  $p->parse();
592 
593  $words = $p->getQuotedWords();
594  foreach ($words as $w) {
595  ilTextHighlighterGUI::highlight("ilGloContent", $w, $tpl);
596  }
597  $this->fill_on_load_code = true;
598  }
599  $tpl->setContent($def_tpl->get());
600  if ($this->offlineMode()) {
601  return $tpl->printToString();
602  } elseif ($a_get_html) {
603  return $def_tpl->get();
604  }
605  return "";
606  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
basicPageGuiInit(\ilPageObjectGUI $a_page_gui)
Basic page gui initialisation.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getInstance(int $a_usr_id)
static _getAllReferences(int $id)
get all reference ids for object ID
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
printToString()
Use this method to get the finally rendered page as string.
setTitleIcon(string $a_icon_path, string $a_icon_desc="")
set title icon
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$ref_id
Definition: ltiauth.php:67
static _lookupTitle(int $obj_id)
setContent(string $a_html)
Sets content for standard template.
loadStandardTemplate()
This loads the standard template "tpl.adm_content.html" and "tpl.statusline.html" the CONTENT and STA...
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.
setPermanentLink(string $a_type, ?int $a_id, string $a_append="", string $a_target="", string $a_title="")
Generates and sets a permanent ilias link.
static _getPresentationTitle(int $a_pg_id, string $a_mode=self::CHAPTER_TITLE, bool $a_include_numbers=false, bool $a_time_scheduled_activation=false, bool $a_force_content=false, int $a_lm_id=0, string $a_lang="-", bool $a_include_short=false)
presentation title doesn't have to be page title, it may be chapter title + page title or chapter tit...
offlineMode()
checks wether offline content generation is activated
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupContObjID(int $a_id)
get learning module id for lm object
setRightContent(string $a_html)
Sets content of right column.
getLink(int $a_ref_id, string $a_cmd="", int $a_term_id=0, string $a_frame="", string $a_type="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listTermByGivenAsPanel()

ilGlossaryPresentationGUI::listTermByGivenAsPanel ( )

list glossary terms

Definition at line 385 of file class.ilGlossaryPresentationGUI.php.

References $ctrl, and ilCtrl\redirectByClass().

Referenced by listTerms().

385  : void
386  {
387  $ilCtrl = $this->ctrl;
388 
389  $ilCtrl->redirectByClass("ilPresentationFullGUI", "show");
390  }
redirectByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listTermByGivenAsTable()

ilGlossaryPresentationGUI::listTermByGivenAsTable ( )

list glossary terms

Definition at line 353 of file class.ilGlossaryPresentationGUI.php.

References $access, $ctrl, $lng, $tpl, getPresentationTable(), ILIAS\Repository\lng(), offlineMode(), and setTabs().

Referenced by listTerms().

353  : string
354  {
355  $ilCtrl = $this->ctrl;
356  $ilAccess = $this->access;
357  $lng = $this->lng;
358  $tpl = $this->tpl;
359 
360  if (!$ilAccess->checkAccess("read", "", $this->requested_ref_id)) {
361  throw new ilPermissionException($lng->txt("permission_denied"));
362  }
363 
364  $this->lng->loadLanguageModule("meta");
365 
366  $this->setTabs();
367 
368  // load template for table
369  // $this->tpl->addBlockfile("ADM_CONTENT", "adm_content", "tpl.table.html");
370 
371  $table = $this->getPresentationTable();
372 
373  if (!$this->offlineMode()) {
374  $tpl->setContent($ilCtrl->getHTML($table));
375  } else {
376  $this->tpl->setVariable("ADM_CONTENT", $table->getHTML());
377  return $this->tpl->printToString();
378  }
379  return "";
380  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setContent(string $a_html)
Sets content for standard template.
offlineMode()
checks wether offline content generation is activated
getPresentationTable()
Get presentation table.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listTerms()

ilGlossaryPresentationGUI::listTerms ( )

Definition at line 295 of file class.ilGlossaryPresentationGUI.php.

References $access, $ctrl, $lng, $nav_history, $tabs_gui, $toolbar, ILIAS\Repository\ctrl(), listTermByGivenAsPanel(), listTermByGivenAsTable(), offlineMode(), ilAlphabetInputGUI\setFixDBUmlauts(), showTaxonomy(), and ilUtil\stripSlashes().

Referenced by applyFilter(), and resetFilter().

295  : string
296  {
297  $ilNavigationHistory = $this->nav_history;
298  $ilAccess = $this->access;
299  $lng = $this->lng;
300  $ilToolbar = $this->toolbar;
301  $ilCtrl = $this->ctrl;
302  $ilTabs = $this->tabs_gui;
303 
304  if (!$ilAccess->checkAccess("read", "", $this->requested_ref_id)) {
305  throw new ilPermissionException($lng->txt("permission_denied"));
306  }
307 
308  $ret = "";
309  if ($this->glossary->getPresentationMode() == "full_def") {
310  $this->listTermByGivenAsPanel();
311  } else {
312  if (!$this->offlineMode()) {
313  $ilNavigationHistory->addItem(
314  $this->requested_ref_id,
315  $this->ctrl->getLinkTarget($this, "listTerms"),
316  "glo"
317  );
318 
319  // alphabetical navigation
320  $ai = new ilAlphabetInputGUI($lng->txt("glo_quick_navigation"), "first");
321 
322  $ai->setFixDBUmlauts(true);
323 
324  $first_letters = $this->glossary->getFirstLetters($this->tax_node);
325  if (!in_array($this->requested_letter, $first_letters)) {
326  $first_letters[] = ilUtil::stripSlashes($this->requested_letter);
327  }
328  $ai->setLetters($first_letters);
329 
330  $ai->setParentCommand($this, "chooseLetter");
331  $ai->setHighlighted($this->requested_letter);
332  $ilToolbar->addInputItem($ai, true);
333  }
334 
335  $ret = $this->listTermByGivenAsTable();
336  }
337 
338  $ilCtrl->setParameter($this, "term_id", "");
339 
340  $ilTabs->activateTab("terms");
341 
342  // show taxonomy
343  $this->showTaxonomy();
344 
345  $this->tpl->setPermanentLink("glo", $this->glossary->getRefId());
346 
347  return $ret;
348  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
offlineMode()
checks wether offline content generation is activated
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ media()

ilGlossaryPresentationGUI::media ( string  $a_mode = "media")

show media object

Definition at line 666 of file class.ilGlossaryPresentationGUI.php.

References $params, ilMediaItem\_getMapAreasIntLinks(), ILIAS\Repository\ctrl(), ilObjStyleSheet\getContentStylePath(), ilUtil\getImagePath(), getLink(), ilUtil\getStyleSheetLocation(), ilFileUtils\getWebspaceDir(), IL_MODE_ALIAS, IL_MODE_OUTPUT, ilObjMediaObject\isTypeAllowed(), and offlineMode().

Referenced by fullscreen().

666  : string
667  {
668  $this->tpl = new ilGlobalTemplate("tpl.fullscreen.html", true, true, "Services/COPage");
669  $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
670  $this->tpl->setVariable(
671  "LOCATION_CONTENT_STYLESHEET",
672  ilObjStyleSheet::getContentStylePath($this->content_style_domain->getEffectiveStyleId())
673  );
674 
675  //$int_links = $page_object->getInternalLinks();
676  $med_links = ilMediaItem::_getMapAreasIntLinks($this->requested_mob_id);
677 
678  // later
679  //$link_xml = $this->getLinkXML($med_links, $this->getLayoutLinkTargets());
680 
681  $link_xml = "";
682 
683  $media_obj = new ilObjMediaObject($this->requested_mob_id);
684 
685  $xml = "<dummy>";
686  // todo: we get always the first alias now (problem if mob is used multiple
687  // times in page)
688  $xml .= $media_obj->getXML(IL_MODE_ALIAS);
689  $xml .= $media_obj->getXML(IL_MODE_OUTPUT);
690  $xml .= $link_xml;
691  $xml .= "</dummy>";
692 
693  if (!$this->offlineMode()) {
694  $enlarge_path = ilUtil::getImagePath("media/enlarge.svg", false, "output");
695  $wb_path = ilFileUtils::getWebspaceDir("output") . "/";
696  } else {
697  $enlarge_path = "images/media/enlarge.svg";
698  $wb_path = "";
699  }
700 
701  $mode = $a_mode;
702 
703  $this->ctrl->setParameter($this, "obj_type", "MediaObject");
704  $fullscreen_link =
705  $this->getLink($this->requested_ref_id, "fullscreen");
706  $this->ctrl->clearParameters($this);
707 
708  $params = array('mode' => $mode, 'enlarge_path' => $enlarge_path,
709  'link_params' => "ref_id=" . $this->requested_ref_id,'fullscreen_link' => $fullscreen_link,
710  'enable_html_mob' => ilObjMediaObject::isTypeAllowed("html") ? "y" : "n",
711  'ref_id' => $this->requested_ref_id, 'pg_frame' => "", 'webspace_path' => $wb_path);
712  $output = $this->xsl->process($xml, $params);
713 
714  // unmask user html
715  $this->tpl->setVariable("MEDIA_CONTENT", $output);
716 
717  $this->tpl->parseCurrentBlock();
718  if ($this->offlineMode()) {
719  $html = $this->tpl->get();
720  return $html;
721  }
722  return "";
723  }
static getWebspaceDir(string $mode="filesystem")
get webspace directory
special template class to simplify handling of ITX/PEAR
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:33
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static getStyleSheetLocation(string $mode="output", string $a_css_name="", string $a_css_location="")
get full style sheet file name (path inclusive) of current user
static isTypeAllowed(string $a_type)
static _getMapAreasIntLinks(int $a_mob_id)
get all internal links of map areas of a mob
const IL_MODE_ALIAS
static getContentStylePath(int $a_style_id, bool $add_random=true, bool $add_token=true)
get content style path static (to avoid full reading)
offlineMode()
checks wether offline content generation is activated
const IL_MODE_OUTPUT
getLink(int $a_ref_id, string $a_cmd="", int $a_term_id=0, string $a_frame="", string $a_type="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ offlineMode()

ilGlossaryPresentationGUI::offlineMode ( )

checks wether offline content generation is activated

Definition at line 172 of file class.ilGlossaryPresentationGUI.php.

References $offline.

Referenced by basicPageGuiInit(), executeCommand(), getLink(), getPresentationTable(), getTabs(), listDefinitions(), listTermByGivenAsTable(), listTerms(), media(), outputInfoScreen(), setContentStyles(), showDefinitionTabs(), and showTaxonomy().

172  : bool
173  {
174  return $this->offline;
175  }
+ Here is the caller graph for this function:

◆ outputInfoScreen()

ilGlossaryPresentationGUI::outputInfoScreen ( )

Definition at line 1158 of file class.ilGlossaryPresentationGUI.php.

References $access, $tabs_gui, ilObjGlossaryGUI\addUsagesToInfo(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), offlineMode(), and setTabs().

Referenced by executeCommand(), and infoScreen().

1158  : string
1159  {
1160  $ilAccess = $this->access;
1161  $ilTabs = $this->tabs_gui;
1162 
1163  $this->setTabs();
1164  $ilTabs->activateTab("info");
1165  $this->lng->loadLanguageModule("meta");
1166 
1167  $info = new ilInfoScreenGUI($this->glossary_gui);
1168  $info->enablePrivateNotes();
1169  //$info->enableLearningProgress();
1170 
1171  $info->enableNews();
1172  if ($ilAccess->checkAccess("write", "", $this->requested_ref_id)) {
1173  $info->enableNewsEditing();
1174  $news_set = new ilSetting("news");
1175  $enable_internal_rss = $news_set->get("enable_rss_for_internal");
1176  if ($enable_internal_rss) {
1177  $info->setBlockProperty("news", "settings", true);
1178  }
1179  }
1180 
1181  // show standard meta data section
1182  $info->addMetaDataSections($this->glossary->getId(), 0, $this->glossary->getType());
1183 
1184  ilObjGlossaryGUI::addUsagesToInfo($info, $this->glossary->getId());
1185 
1186  if ($this->offlineMode()) {
1187  $this->tpl->setContent($info->getHTML());
1188  return $this->tpl->get();
1189  } else {
1190  // forward the command
1191  $this->ctrl->forwardCommand($info);
1192  }
1193  return "";
1194  }
Class ilInfoScreenGUI.
static addUsagesToInfo(ilInfoScreenGUI $info, int $glo_id)
Add usages to info screen.
offlineMode()
checks wether offline content generation is activated
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ prepareOutput()

ilGlossaryPresentationGUI::prepareOutput ( )

Definition at line 261 of file class.ilGlossaryPresentationGUI.php.

References ilUtil\getImagePath(), and setLocator().

Referenced by executeCommand().

261  : void
262  {
263  $this->tpl->loadStandardTemplate();
264  $title = $this->glossary->getTitle();
265 
266  $this->tpl->setTitle($title);
267  $this->tpl->setTitleIcon(ilUtil::getImagePath("standard/icon_glo.svg"));
268 
269  $this->setLocator();
270  }
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ printView()

ilGlossaryPresentationGUI::printView ( )

Definition at line 1019 of file class.ilGlossaryPresentationGUI.php.

References $access, $tpl, ILIAS\Repository\ctrl(), ILIAS\Repository\form(), ilObjTaxonomy\getSubTreeItems(), initPrintViewSelectionForm(), ILIAS\Repository\int(), listDefinitions(), ILIAS\Repository\lng(), and ilPageObjectGUI\PRINTING.

1019  : void
1020  {
1021  $ilAccess = $this->access;
1022  $tpl = $this->tpl;
1023 
1024  $this->tabs_gui->setBackTarget(
1025  $this->lng->txt("back"),
1026  $this->ctrl->getLinkTarget($this, "printViewSelection")
1027  );
1028 
1029  if (!$ilAccess->checkAccess("read", "", $this->requested_ref_id)) {
1030  return;
1031  }
1032 
1033  $this->initPrintViewSelectionForm();
1034  $this->form->checkInput();
1035 
1036  $terms = array();
1037  switch ($this->form->getInput("sel_type")) {
1038  case "glossary":
1039  $ts = $this->glossary->getTermList();
1040  foreach ($ts as $t) {
1041  $terms[] = $t["id"];
1042  }
1043  break;
1044 
1045  case "sel_topic":
1046  $t_id = $this->glossary->getTaxonomyId();
1047  $items = ilObjTaxonomy::getSubTreeItems("glo", $this->glossary->getId(), "term", $t_id, (int) $this->form->getInput("topic"));
1048  foreach ($items as $i) {
1049  if ($i["item_type"] == "term") {
1050  $terms[] = $i["item_id"];
1051  }
1052  }
1053  break;
1054 
1055  case "selection":
1056  $terms = $this->form->getInput("obj_id");
1057  break;
1058 
1059  case "term":
1060  $terms = array($this->term_id);
1061  break;
1062  }
1063 
1064  //$tpl->addCss(ilObjStyleSheet::getContentPrintStyle());
1065  $tpl->addOnLoadCode("il.Util.print();");
1066 
1067  // determine target frames for internal links
1068 
1069  $page_content = "";
1070  foreach ($terms as $t_id) {
1071  $page_content .= $this->listDefinitions($this->requested_ref_id, $t_id, true, true, ilPageObjectGUI::PRINTING);
1072  }
1073  $tpl->setContent($page_content);
1074  }
initPrintViewSelectionForm()
Init print view selection form.
static getSubTreeItems(string $a_comp, int $a_obj_id, string $a_item_type, int $a_tax_id, $a_node)
Get all assigned items under a node.
setContent(string $a_html)
Sets content for standard template.
addOnLoadCode(string $a_code, int $a_batch=2)
Add on load code.
form( $class_path, string $cmd, string $submit_caption="")
listDefinitions(int $a_ref_id=0, int $a_term_id=0, bool $a_get_html=false, bool $render_term=true, string $a_page_mode=ilPageObjectGUI::PRESENTATION, bool $render_page_container=true)
list definitions of a term
+ Here is the call graph for this function:

◆ printViewSelection()

ilGlossaryPresentationGUI::printViewSelection ( )

Definition at line 929 of file class.ilGlossaryPresentationGUI.php.

References $ctrl, $tabs_gui, $tpl, ILIAS\Repository\form(), ilUtil\getImagePath(), initPrintViewSelectionForm(), ILIAS\Repository\lng(), setTabs(), and showDefinitionTabs().

929  : void
930  {
931  $ilCtrl = $this->ctrl;
932  $tpl = $this->tpl;
933  $ilTabs = $this->tabs_gui;
934 
935  $ilCtrl->saveParameter($this, "term_id");
936 
937  if ($this->term_id == 0) {
938  $this->setTabs();
939  $ilTabs->activateTab("print_view");
940  } else {
941  $tpl->setTitleIcon(ilUtil::getImagePath("standard/icon_glo.svg"));
942  $term = new ilGlossaryTerm($this->term_id);
943  $tpl->setTitle($this->lng->txt("cont_term") . ": " . $term->getTerm());
944  $this->showDefinitionTabs("print_view");
945  }
946 
948 
949  $tpl->setContent($this->form->getHTML());
950  }
initPrintViewSelectionForm()
Init print view selection form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
setTitleIcon(string $a_icon_path, string $a_icon_desc="")
set title icon
setContent(string $a_html)
Sets content for standard template.
setTitle(string $a_title, bool $hidden=false)
Sets title in standard template.
form( $class_path, string $cmd, string $submit_caption="")
+ Here is the call graph for this function:

◆ resetFilter()

ilGlossaryPresentationGUI::resetFilter ( )

Definition at line 429 of file class.ilGlossaryPresentationGUI.php.

References getPresentationTable(), and listTerms().

429  : void
430  {
431  $prtab = $this->getPresentationTable();
432  $prtab->resetOffset();
433  $prtab->resetFilter();
434  $this->listTerms();
435  }
getPresentationTable()
Get presentation table.
+ Here is the call graph for this function:

◆ setContentStyles()

ilGlossaryPresentationGUI::setContentStyles ( )
protected

Definition at line 392 of file class.ilGlossaryPresentationGUI.php.

References $tpl, ilGlobalTemplateInterface\addCss(), ilObjStyleSheet\getSyntaxStylePath(), and offlineMode().

Referenced by listDefinitions().

392  : void
393  {
394  $tpl = $this->tpl;
395 
396  if (!$this->offlineMode()) {
397  $this->content_style_gui->addCss($tpl, $this->glossary->getRefId());
399  } else {
400  $tpl->addCss("content.css");
401  $tpl->addCss("syntaxhighlight.css");
402  }
403  }
offlineMode()
checks wether offline content generation is activated
addCss(string $a_css_file, string $media="screen")
Add a css file that should be included in the header.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setLocator()

ilGlossaryPresentationGUI::setLocator ( )

Definition at line 844 of file class.ilGlossaryPresentationGUI.php.

Referenced by listDefinitions(), and prepareOutput().

844  : void
845  {
846  $gloss_loc = new ilGlossaryLocatorGUI();
847  $gloss_loc->setMode("presentation");
848  if (!empty($this->term_id)) {
849  $term = new ilGlossaryTerm($this->term_id);
850  $gloss_loc->setTerm($term);
851  }
852  $gloss_loc->setGlossary($this->glossary);
853  $gloss_loc->display();
854  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the caller graph for this function:

◆ setOfflineDirectory()

ilGlossaryPresentationGUI::setOfflineDirectory ( string  $a_dir)

Definition at line 177 of file class.ilGlossaryPresentationGUI.php.

Referenced by __construct().

177  : void
178  {
179  $this->offline_dir = $a_dir;
180  }
+ Here is the caller graph for this function:

◆ setOfflineMode()

ilGlossaryPresentationGUI::setOfflineMode ( bool  $a_offline = true)

set offline mode (content is generated for offline package)

Definition at line 164 of file class.ilGlossaryPresentationGUI.php.

164  : void
165  {
166  $this->offline = $a_offline;
167  }

◆ setTabs()

ilGlossaryPresentationGUI::setTabs ( )

Definition at line 871 of file class.ilGlossaryPresentationGUI.php.

References getTabs().

Referenced by executeCommand(), listTermByGivenAsTable(), outputInfoScreen(), printViewSelection(), showDownloadList(), and showFlashcards().

871  : void
872  {
873  $this->getTabs();
874  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showDefinitionTabs()

ilGlossaryPresentationGUI::showDefinitionTabs ( string  $a_act)

Definition at line 608 of file class.ilGlossaryPresentationGUI.php.

References $ctrl, $help, $lng, $tabs_gui, ilGlossaryTerm\_lookGlossaryID(), ILIAS\Repository\access(), ILIAS\Repository\lng(), offlineMode(), and ilHelpGUI\setScreenIdComponent().

Referenced by listDefinitions(), and printViewSelection().

608  : void
609  {
610  $ilTabs = $this->tabs_gui;
611  $lng = $this->lng;
612  $ilCtrl = $this->ctrl;
613  $ilHelp = $this->help;
614 
615  if (!$this->offlineMode()) {
616  $ilHelp->setScreenIdComponent("glo");
617 
618  $ilCtrl->setParameter($this, "term_id", "");
619  $back = $ilCtrl->getLinkTarget($this, "listTerms");
620  $ilCtrl->setParameter($this, "term_id", $this->term_id);
621  $ilCtrl->saveParameter($this, "term_id");
622 
623  $ilTabs->setBackTarget($this->lng->txt("obj_glo"), $back);
624 
625  $ilTabs->addTab(
626  "term_content",
627  $lng->txt("content"),
628  $ilCtrl->getLinkTarget($this, "listDefinitions")
629  );
630 
631  $ilTabs->addTab(
632  "print_view",
633  $lng->txt("print_view"),
634  $ilCtrl->getLinkTarget($this, "printViewSelection")
635  );
636 
637  $ilCtrl->setParameterByClass("ilglossarytermgui", "term_id", $this->term_id);
638  if (ilGlossaryTerm::_lookGlossaryID($this->term_id) == $this->glossary->getId()) {
639  if ($this->access->checkAccess("write", "", (int) $this->requested_ref_id) ||
640  $this->access->checkAccess("edit_content", "", (int) $this->requested_ref_id)) {
641  $ilTabs->addNonTabbedLink(
642  "editing_view",
643  $lng->txt("glo_editing_view"),
644  $ilCtrl->getLinkTargetByClass(array("ilglossaryeditorgui",
645  "ilobjglossarygui",
646  "ilglossarytermgui"
647  ), "editTerm")
648  );
649  }
650  //"ilias.php?baseClass=ilGlossaryEditorGUI&amp;ref_id=".$this->requested_ref_id."&amp;edit_term=".$this->term_id);
651  }
652  $ilTabs->activateTab($a_act);
653  }
654  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
setScreenIdComponent(string $a_comp)
offlineMode()
checks wether offline content generation is activated
static _lookGlossaryID(int $term_id)
get glossary id form term id
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showDownloadList()

ilGlossaryPresentationGUI::showDownloadList ( )

show download list

Definition at line 728 of file class.ilGlossaryPresentationGUI.php.

References $access, $lng, $tabs_gui, ILIAS\Repository\ctrl(), ilUtil\getImagePath(), ILIAS\Repository\lng(), and setTabs().

728  : void
729  {
730  $ilAccess = $this->access;
731  $lng = $this->lng;
732  $ilTabs = $this->tabs_gui;
733 
734  if (!$ilAccess->checkAccess("read", "", $this->requested_ref_id)) {
735  throw new ilPermissionException($lng->txt("permission_denied"));
736  }
737 
738  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.glo_download_list.html", "Modules/Glossary");
739 
740  $this->setTabs();
741  $ilTabs->activateTab("download");
742 
743  // set title header
744  $this->tpl->setTitle($this->glossary->getTitle());
745  $this->tpl->setTitleIcon(ilUtil::getImagePath("standard/icon_glo.svg"));
746 
747  // create table
748  $tbl = new ilTableGUI();
749 
750  // load files templates
751  $this->tpl->addBlockFile("DOWNLOAD_TABLE", "download_table", "tpl.table.html");
752 
753  // load template for table content data
754  $this->tpl->addBlockFile("TBL_CONTENT", "tbl_content", "tpl.download_file_row.html", "Modules/Glossary");
755 
756  $export_files = array();
757  $types = array("xml", "html");
758  foreach ($types as $type) {
759  if ($this->glossary->getPublicExportFile($type) != "") {
760  $dir = $this->glossary->getExportDirectory($type);
761  if (is_file($this->glossary->getExportDirectory($type) . "/" .
762  $this->glossary->getPublicExportFile($type))) {
763  $size = filesize($this->glossary->getExportDirectory($type) . "/" .
764  $this->glossary->getPublicExportFile($type));
765  $export_files[] = array("type" => $type,
766  "file" => $this->glossary->getPublicExportFile($type),
767  "size" => $size);
768  }
769  }
770  }
771 
772  $num = 0;
773 
774  $tbl->setTitle($this->lng->txt("download"));
775 
776  $tbl->setHeaderNames(array($this->lng->txt("cont_format"),
777  $this->lng->txt("cont_file"),
778  $this->lng->txt("size"), $this->lng->txt("date"),
779  ""));
780 
781  $cols = array("format", "file", "size", "date", "download");
782  $header_params = array("ref_id" => $this->requested_ref_id,
783  "cmd" => "showDownloadList", "cmdClass" => strtolower(get_class($this)));
784  $tbl->setHeaderVars($cols, $header_params);
785  $tbl->setColumnWidth(array("10%", "30%", "20%", "20%","20%"));
786  $tbl->disable("sort");
787  // footer
788  $tbl->disable("footer");
789  $tbl->setMaxCount(count($export_files));
790 
791  $tbl->render();
792  if (count($export_files) > 0) {
793  $i = 0;
794  foreach ($export_files as $exp_file) {
795  $this->tpl->setCurrentBlock("tbl_content");
796  $this->tpl->setVariable("TXT_FILENAME", $exp_file["file"]);
797 
798  $this->tpl->setVariable("TXT_SIZE", $exp_file["size"]);
799  $this->tpl->setVariable("TXT_FORMAT", strtoupper($exp_file["type"]));
800  $this->tpl->setVariable("CHECKBOX_ID", $exp_file["type"] . ":" . $exp_file["file"]);
801 
802  $file_arr = explode("__", $exp_file["file"]);
803  $this->tpl->setVariable("TXT_DATE", date("Y-m-d H:i:s", $file_arr[0]));
804 
805  $this->tpl->setVariable("TXT_DOWNLOAD", $this->lng->txt("download"));
806  $this->ctrl->setParameter($this, "type", $exp_file["type"]);
807  $this->tpl->setVariable(
808  "LINK_DOWNLOAD",
809  $this->ctrl->getLinkTarget($this, "downloadExportFile")
810  );
811 
812  $this->tpl->parseCurrentBlock();
813  }
814  } else {
815  $this->tpl->setVariable("TXT_OBJECT_NOT_FOUND", $this->lng->txt("obj_not_found"));
816  $this->tpl->setVariable("NUM_COLS", 5);
817  $this->tpl->parseCurrentBlock();
818  }
819  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ showFlashcards()

ilGlossaryPresentationGUI::showFlashcards ( )

Definition at line 1236 of file class.ilGlossaryPresentationGUI.php.

References $tabs_gui, and setTabs().

1236  : void
1237  {
1238  $ilTabs = $this->tabs_gui;
1239 
1240  $this->setTabs();
1241  $ilTabs->activateTab("flashcards");
1242  $flashcards = new ilGlossaryFlashcardGUI();
1243  $flashcards->listBoxes();
1244  }
GUI class for glossary flashcards.
+ Here is the call graph for this function:

◆ showTaxonomy()

ilGlossaryPresentationGUI::showTaxonomy ( )

Definition at line 1202 of file class.ilGlossaryPresentationGUI.php.

References $ctrl, offlineMode(), ilTaxonomyGSToolProvider\SHOW_TAX_TREE, ilTaxonomyGSToolProvider\TAX_ID, ilTaxonomyGSToolProvider\TAX_TREE_CMD, ilTaxonomyGSToolProvider\TAX_TREE_GUI_PATH, and ilTaxonomyGSToolProvider\TAX_TREE_PARENT_CMD.

Referenced by executeCommand(), listDefinitions(), and listTerms().

1202  : void
1203  {
1204  $ctrl = $this->ctrl;
1205 
1206  if ($this->offlineMode() || !$this->tax_manager->showInPresentation()) {
1207  return;
1208  }
1209 
1210  $tax_id = $this->tax_manager->getTaxonomyId();
1211 
1212  $tool_context = $this->global_screen->tool()->context()->current();
1213 
1214  $tool_context->addAdditionalData(
1216  true
1217  );
1218  $tool_context->addAdditionalData(
1220  [self::class]
1221  );
1222  $tool_context->addAdditionalData(
1224  $tax_id
1225  );
1226  $tool_context->addAdditionalData(
1228  "listTerms"
1229  );
1230  $tool_context->addAdditionalData(
1232  "showTaxonomy"
1233  );
1234  }
offlineMode()
checks wether offline content generation is activated
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $access

◆ $content_style_domain

ILIAS Style Content Object ObjectFacade ilGlossaryPresentationGUI::$content_style_domain
protected

Definition at line 63 of file class.ilGlossaryPresentationGUI.php.

◆ $content_style_gui

ILIAS Style Content GUIService ilGlossaryPresentationGUI::$content_style_gui
protected

Definition at line 62 of file class.ilGlossaryPresentationGUI.php.

◆ $content_style_service

ILIAS Style Content Service ilGlossaryPresentationGUI::$content_style_service
protected

Definition at line 61 of file class.ilGlossaryPresentationGUI.php.

◆ $ctrl

◆ $domain

ILIAS Glossary InternalDomainService ilGlossaryPresentationGUI::$domain
protected

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

◆ $export_format

string ilGlossaryPresentationGUI::$export_format
protected

Definition at line 38 of file class.ilGlossaryPresentationGUI.php.

Referenced by __construct().

◆ $fill_on_load_code

bool ilGlossaryPresentationGUI::$fill_on_load_code
protected

Definition at line 34 of file class.ilGlossaryPresentationGUI.php.

◆ $form

ilPropertyFormGUI ilGlossaryPresentationGUI::$form
protected

Definition at line 36 of file class.ilGlossaryPresentationGUI.php.

◆ $global_screen

ILIAS GlobalScreen Services ilGlossaryPresentationGUI::$global_screen
protected

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

◆ $glossary

ilObjGlossary ilGlossaryPresentationGUI::$glossary
protected

Definition at line 46 of file class.ilGlossaryPresentationGUI.php.

◆ $glossary_gui

ilObjGlossaryGUI ilGlossaryPresentationGUI::$glossary_gui
protected

Definition at line 47 of file class.ilGlossaryPresentationGUI.php.

◆ $gui

ILIAS Glossary InternalGUIService ilGlossaryPresentationGUI::$gui
protected

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

◆ $help

ilHelpGUI ilGlossaryPresentationGUI::$help
protected

Definition at line 45 of file class.ilGlossaryPresentationGUI.php.

Referenced by getTabs(), and showDefinitionTabs().

◆ $lng

◆ $mobs

array ilGlossaryPresentationGUI::$mobs
protected

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

◆ $nav_history

ilNavigationHistory ilGlossaryPresentationGUI::$nav_history
protected

Definition at line 42 of file class.ilGlossaryPresentationGUI.php.

Referenced by listTerms().

◆ $offline

bool ilGlossaryPresentationGUI::$offline
protected

Definition at line 37 of file class.ilGlossaryPresentationGUI.php.

Referenced by offlineMode().

◆ $offline_dir

string ilGlossaryPresentationGUI::$offline_dir
protected

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

Referenced by getOfflineDirectory().

◆ $requested_def_page_id

int ilGlossaryPresentationGUI::$requested_def_page_id
protected

Definition at line 56 of file class.ilGlossaryPresentationGUI.php.

◆ $requested_export_type

string ilGlossaryPresentationGUI::$requested_export_type
protected

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

◆ $requested_file_id

string ilGlossaryPresentationGUI::$requested_file_id
protected

Definition at line 58 of file class.ilGlossaryPresentationGUI.php.

◆ $requested_letter

string ilGlossaryPresentationGUI::$requested_letter
protected

Definition at line 55 of file class.ilGlossaryPresentationGUI.php.

◆ $requested_mob_id

int ilGlossaryPresentationGUI::$requested_mob_id
protected

Definition at line 59 of file class.ilGlossaryPresentationGUI.php.

◆ $requested_ref_id

int ilGlossaryPresentationGUI::$requested_ref_id
protected

Definition at line 54 of file class.ilGlossaryPresentationGUI.php.

Referenced by getTabs(), and listDefinitions().

◆ $requested_search_str

string ilGlossaryPresentationGUI::$requested_search_str
protected

Definition at line 57 of file class.ilGlossaryPresentationGUI.php.

◆ $tabs_gui

ilTabsGUI ilGlossaryPresentationGUI::$tabs_gui
protected

◆ $tax

ilObjTaxonomy ilGlossaryPresentationGUI::$tax
protected

Definition at line 52 of file class.ilGlossaryPresentationGUI.php.

◆ $tax_id

int ilGlossaryPresentationGUI::$tax_id
protected

Definition at line 51 of file class.ilGlossaryPresentationGUI.php.

◆ $tax_manager

ILIAS Glossary Taxonomy TaxonomyManager ilGlossaryPresentationGUI::$tax_manager
protected

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

◆ $tax_node

int ilGlossaryPresentationGUI::$tax_node
protected

Definition at line 50 of file class.ilGlossaryPresentationGUI.php.

◆ $term_id

int ilGlossaryPresentationGUI::$term_id
protected

Definition at line 53 of file class.ilGlossaryPresentationGUI.php.

Referenced by listDefinitions().

◆ $toolbar

ilToolbarGUI ilGlossaryPresentationGUI::$toolbar
protected

Definition at line 43 of file class.ilGlossaryPresentationGUI.php.

Referenced by listTerms().

◆ $tpl

◆ $ui_fac

ILIAS UI Factory ilGlossaryPresentationGUI::$ui_fac
protected

Definition at line 64 of file class.ilGlossaryPresentationGUI.php.

◆ $ui_ren

ILIAS UI Renderer ilGlossaryPresentationGUI::$ui_ren
protected

Definition at line 65 of file class.ilGlossaryPresentationGUI.php.

◆ $user

ilObjUser ilGlossaryPresentationGUI::$user
protected

Definition at line 44 of file class.ilGlossaryPresentationGUI.php.

Referenced by listDefinitions().

◆ $xsl

ILIAS COPage Xsl XslManager ilGlossaryPresentationGUI::$xsl
protected

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


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