ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilGlossaryTermGUI 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 ilGlossaryTermGUI:

Public Member Functions

 __construct (int $a_id=0)
 
 executeCommand ()
 
 setOfflineDirectory (string $offdir)
 
 getOfflineDirectory ()
 
 setGlossary (ilObjGlossary $a_glossary)
 
 setPageLinker (\ILIAS\COPage\PageLinker $page_linker)
 
 editTerm (ilPropertyFormGUI $a_form=null)
 
 getEditTermForm ()
 
 updateTerm ()
 
 getOverlayHTML (string $a_close_el_id, string $a_glo_ov_id="", string $a_lang="", string $a_outputmode="offline")
 
 output (bool $a_offline=false, ilGlobalTemplateInterface $a_tpl=null, string $a_outputmode="presentation")
 output glossary term definitions used in ilLMPresentationGUI->ilGlossary() More...
 
 getInternalLinks ()
 
 setTabs ()
 
 displayLocator ()
 
 getTabs ()
 
 listUsages ()
 
 quickList ()
 Set quick term list cmd into left navigation URL. More...
 

Static Public Member Functions

static _goto (string $a_target, int $a_ref_id=0)
 

Data Fields

ilLanguage $lng
 
ilGlobalTemplateInterface $tpl
 
ilObjGlossary $glossary
 
ilGlossaryTerm $term
 

Protected Attributes

ilAdvancedMDRecordGUI $record_gui
 
int $ref_id
 
ILIAS Glossary Editing EditingGUIRequest $request
 
string $offline_directory
 
ilCtrl $ctrl
 
ilTabsGUI $tabs_gui
 
ilHelpGUI $help
 
ILIAS COPage PageLinker $page_linker
 
ilLogger $log
 
ilObjGlossary $term_glossary = null
 
ilToolbarGUI $toolbar
 
ILIAS Style Content GUIService $content_style_gui
 
ILIAS Style Content DomainService $content_style_domain
 

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 GUI class for glossary terms

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de ilGlossaryTermGUI: ilTermDefinitionEditorGUI, ilGlossaryDefPageGUI, ilPropertyFormGUI ilGlossaryTermGUI: ilObjectMetaDataGUI

Definition at line 25 of file class.ilGlossaryTermGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilGlossaryTermGUI::__construct ( int  $a_id = 0)

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

References $DIC, $lng, $tpl, ilGlossaryTerm\_lookGlossaryID(), ilObject\_lookupObjectId(), ILIAS\Repository\ctrl(), ilLoggerFactory\getLogger(), ILIAS\Repository\help(), ILIAS\Repository\lng(), and ILIAS\Repository\toolbar().

47  {
48  global $DIC;
49 
50  $this->help = $DIC["ilHelp"];
51  $lng = $DIC->language();
52  $tpl = $DIC["tpl"];
53  $ilCtrl = $DIC->ctrl();
54  $ilTabs = $DIC->tabs();
55 
56  $this->lng = $lng;
57  $this->tpl = $tpl;
58  $this->ctrl = $ilCtrl;
59  $this->ctrl->saveParameter($this, array("term_id"));
60  $this->tabs_gui = $ilTabs;
61  $this->request = $DIC->glossary()
62  ->internal()
63  ->gui()
64  ->editing()
65  ->request();
66 
67  $this->log = ilLoggerFactory::getLogger('glo');
68 
69  $this->toolbar = $DIC->toolbar();
70 
71  $this->ref_id = $this->request->getRefId();
72 
73  if ($a_id != 0) {
74  $this->term = new ilGlossaryTerm($a_id);
75  if (ilObject::_lookupObjectId($this->ref_id) == ilGlossaryTerm::_lookGlossaryID($a_id)) {
76  $this->term_glossary = new ilObjGlossary($this->ref_id, true);
77  } else {
78  $this->term_glossary = new ilObjGlossary(ilGlossaryTerm::_lookGlossaryID($a_id), false);
79  }
80  }
81  $cs = $DIC->contentStyle();
82  $this->content_style_gui = $cs->gui();
83  $this->content_style_domain = $cs->domain();
84  }
static getLogger(string $a_component_id)
Get component logger.
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...
global $DIC
Definition: feed.php:28
static _lookupObjectId(int $ref_id)
ilGlobalTemplateInterface $tpl
static _lookGlossaryID(int $term_id)
get glossary id form term id
+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilGlossaryTermGUI::_goto ( string  $a_target,
int  $a_ref_id = 0 
)
static

Definition at line 403 of file class.ilGlossaryTermGUI.php.

References $DIC, ilObject\_getAllReferences(), ilObjectGUI\_gotoRepositoryRoot(), ilGlossaryTerm\_lookGlossaryID(), ilObject\_lookupTitle(), ilCtrl\redirectByClass(), ROOT_FOLDER_ID, ilCtrl\setParameterByClass(), and ilLanguage\txt().

Referenced by ILIAS\StaticURL\Handler\LegacyGotoHandler\handle().

406  : void {
407  global $DIC;
408  $main_tpl = $DIC->ui()->mainTemplate();
409 
410  $ctrl = $DIC->ctrl();
411  $lng = $DIC->language();
412  $ilAccess = $DIC->access();
413 
414  $glo_id = ilGlossaryTerm::_lookGlossaryID($a_target);//::_lookupContObjID($a_target);
415 
416  // get all references
417  if ($a_ref_id > 0) {
418  $ref_ids = array($a_ref_id);
419  } else {
420  $ref_ids = ilObject::_getAllReferences($glo_id);
421  }
422 
423  // check read permissions
424  foreach ($ref_ids as $ref_id) {
425  // Permission check
426  if ($ilAccess->checkAccess("read", "", $ref_id)) {
427  $ctrl->setParameterByClass("ilGlossaryPresentationGUI", "term_id", $a_target);
428  $ctrl->setParameterByClass("ilGlossaryPresentationGUI", "ref_id", $ref_id);
429  $ctrl->redirectByClass("ilGlossaryPresentationGUI", "listDefinitions");
430  }
431  }
432  if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
433  $main_tpl->setOnScreenMessage('failure', sprintf(
434  $lng->txt("msg_no_perm_read_item"),
435  ilObject::_lookupTitle($glo_id)
436  ), true);
438  }
439 
440  throw new ilPermissionException($lng->txt("msg_no_perm_read_lm"));
441  }
redirectByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
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...
const ROOT_FOLDER_ID
Definition: constants.php:32
static _getAllReferences(int $id)
get all reference ids for object ID
setParameterByClass(string $a_class, string $a_parameter, $a_value)
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupTitle(int $obj_id)
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
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:

◆ displayLocator()

ilGlossaryTermGUI::displayLocator ( )

Definition at line 344 of file class.ilGlossaryTermGUI.php.

Referenced by editTerm(), and listUsages().

344  : void
345  {
346  $gloss_loc = new ilGlossaryLocatorGUI();
347  $gloss_loc->setGlossary($this->glossary);
348  $gloss_loc->display();
349  }
+ Here is the caller graph for this function:

◆ editTerm()

ilGlossaryTermGUI::editTerm ( ilPropertyFormGUI  $a_form = null)

Definition at line 149 of file class.ilGlossaryTermGUI.php.

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

Referenced by updateTerm().

151  : void {
152  $ilTabs = $this->tabs_gui;
153  $ilCtrl = $this->ctrl;
154 
155  // $this->getTemplate();
156  $this->displayLocator();
157  $this->setTabs();
158  $ilTabs->activateTab("properties");
159 
160  $this->tpl->setTitle($this->lng->txt("cont_term") . ": " . $this->term->getTerm());
161  $this->tpl->setTitleIcon(ilUtil::getImagePath("standard/icon_glo.svg"));
162 
163  if (!$a_form) {
164  $a_form = $this->getEditTermForm();
165  }
166 
167  $this->tpl->setContent($ilCtrl->getHTML($a_form));
168 
169  $this->quickList();
170  }
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
quickList()
Set quick term list cmd into left navigation URL.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilGlossaryTermGUI::executeCommand ( )

Definition at line 86 of file class.ilGlossaryTermGUI.php.

References $tabs_gui, ILIAS\Repository\ctrl(), getEditTermForm(), quickList(), and setTabs().

86  : void
87  {
88  $ilTabs = $this->tabs_gui;
89 
90  $next_class = $this->ctrl->getNextClass($this);
91  $cmd = $this->ctrl->getCmd();
92 
93  $this->log->debug("glossary term, next class " . $next_class . ", cmd: " . $cmd);
94 
95  switch ($next_class) {
96  case "iltermdefinitioneditorgui":
97  $def_edit = new ilTermDefinitionEditorGUI();
98  $this->ctrl->forwardCommand($def_edit);
99  $this->quickList();
100  break;
101 
102  case "ilpropertyformgui":
103  $form = $this->getEditTermForm();
104  $this->ctrl->forwardCommand($form);
105  break;
106 
107  case "ilobjectmetadatagui":
108  $this->setTabs();
109  $ilTabs->activateTab('meta_data');
110  $md_gui = new ilObjectMetaDataGUI(
111  $this->term_glossary,
112  'term',
113  $this->term->getId()
114  );
115  $this->ctrl->forwardCommand($md_gui);
116  $this->quickList();
117  break;
118 
119  default:
120  $ret = $this->$cmd();
121  break;
122  }
123  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
quickList()
Set quick term list cmd into left navigation URL.
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:

◆ getEditTermForm()

ilGlossaryTermGUI::getEditTermForm ( )

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

References Vendor\Package\$a, $lang, ilMDLanguageItem\_getLanguages(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilAdvancedMDRecordGUI\MODE_EDITOR, and ilAdvancedMDRecordGUI\setPropertyForm().

Referenced by editTerm(), executeCommand(), and updateTerm().

173  {
174  $form = new ilPropertyFormGUI();
175  $form->setFormAction($this->ctrl->getFormAction($this, "updateTerm"));
176  $form->setTitle($this->lng->txt("cont_edit_term"));
177 
178  $term = new ilTextInputGUI($this->lng->txt("cont_term"), "term");
179  $term->setRequired(true);
180  $term->setValue($this->term->getTerm());
181  $form->addItem($term);
182 
183  $lang = new ilSelectInputGUI($this->lng->txt("language"), "term_language");
184  $lang->setRequired(true);
185  $lang->setOptions(ilMDLanguageItem::_getLanguages());
186  $lang->setValue($this->term->getLanguage());
187  $form->addItem($lang);
188 
189  // taxonomy
190  if ($this->term_glossary->getTaxonomyId() > 0) {
191  $tax_node_assign = new ilTaxSelectInputGUI($this->term_glossary->getTaxonomyId(), "tax_node", true);
192 
193  $ta = new ilTaxNodeAssignment("glo", $this->term_glossary->getId(), "term", $this->term_glossary->getTaxonomyId());
194  $assgnmts = $ta->getAssignmentsOfItem($this->term->getId());
195  $node_ids = array();
196  foreach ($assgnmts as $a) {
197  $node_ids[] = $a["node_id"];
198  }
199  $tax_node_assign->setValue($node_ids);
200 
201  $form->addItem($tax_node_assign);
202  }
203 
204  // advanced metadata
205  $this->record_gui = new ilAdvancedMDRecordGUI(
207  'glo',
208  $this->term_glossary->getId(),
209  'term',
210  $this->term->getId()
211  );
212  $this->record_gui->setPropertyForm($form);
213  $this->record_gui->parse();
214 
215  $form->addCommandButton("updateTerm", $this->lng->txt("save"));
216 
217  return $form;
218  }
setPropertyForm(ilPropertyFormGUI $form)
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...
This class represents a selection list property in a property form.
$lang
Definition: xapiexit.php:26
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getInternalLinks()

ilGlossaryTermGUI::getInternalLinks ( )

Definition at line 326 of file class.ilGlossaryTermGUI.php.

References ILIAS\LTI\ToolProvider\$key, and ilPageObject\buildDom().

326  : array
327  {
328  $term_links = array();
329  $page = new ilGlossaryDefPage($this->term->getId());
330  $page->buildDom();
331  $page_links = $page->getInternalLinks();
332  foreach ($page_links as $key => $page_link) {
333  $term_links[$key] = $page_link;
334  }
335 
336  return $term_links;
337  }
buildDom(bool $a_force=false)
string $key
Consumer key/client ID value.
Definition: System.php:193
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:

◆ getOfflineDirectory()

ilGlossaryTermGUI::getOfflineDirectory ( )

Definition at line 130 of file class.ilGlossaryTermGUI.php.

References $offline_directory.

Referenced by output().

130  : string
131  {
133  }
+ Here is the caller graph for this function:

◆ getOverlayHTML()

ilGlossaryTermGUI::getOverlayHTML ( string  $a_close_el_id,
string  $a_glo_ov_id = "",
string  $a_lang = "",
string  $a_outputmode = "offline" 
)

Definition at line 248 of file class.ilGlossaryTermGUI.php.

References $lng, ilGlobalTemplateInterface\get(), ilLanguage\getLangKey(), output(), ilGlobalTemplateInterface\parseCurrentBlock(), ilGlobalTemplateInterface\setCurrentBlock(), ilGlobalTemplateInterface\setVariable(), and ilLanguage\txtlng().

253  : string {
254  $lng = $this->lng;
255 
256  if ($a_lang == "") {
257  $a_lang = $lng->getLangKey();
258  }
259 
260  $tpl = new ilTemplate("tpl.glossary_overlay.html", true, true, "Modules/Glossary");
261  // $this->output(true, $tpl);
262  if ($a_outputmode == "preview") {
263  $a_outputmode = "presentation";
264  }
265  if ($a_outputmode == "offline") {
266  $this->output(true, $tpl, $a_outputmode);
267  } else {
268  $this->output(false, $tpl, $a_outputmode);
269  }
270  if ($a_glo_ov_id != "") {
271  $tpl->setCurrentBlock("glovlink");
272  $tpl->setVariable("TXT_LINK", $lng->txtlng("content", "cont_sco_glossary", $a_lang));
273  $tpl->setVariable("ID_LINK", $a_glo_ov_id);
275  }
276  $tpl->setVariable("TXT_CLOSE", $lng->txtlng("common", "close", $a_lang));
277  $tpl->setVariable("ID_CLOSE", $a_close_el_id);
278  return $tpl->get();
279  }
txtlng(string $a_module, string $a_topic, string $a_language)
gets the text for a given topic in a given language if the topic is not in the list, the topic itself with "-" will be returned
getLangKey()
Return lang key.
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string.
setVariable(string $variable, $value='')
Sets the given variable to the given value.
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
ilGlobalTemplateInterface $tpl
output(bool $a_offline=false, ilGlobalTemplateInterface $a_tpl=null, string $a_outputmode="presentation")
output glossary term definitions used in ilLMPresentationGUI->ilGlossary()
+ Here is the call graph for this function:

◆ getTabs()

ilGlossaryTermGUI::getTabs ( )

Definition at line 351 of file class.ilGlossaryTermGUI.php.

References $help, $lng, CLIENT_ID, ILIAS\Repository\ctrl(), ilGlossaryTerm\getNumberOfUsages(), ilObjectMetaDataGUI\getTab(), ILIAS\Repository\lng(), ilHelpGUI\setScreenIdComponent(), and ilLanguage\txt().

Referenced by setTabs().

351  : void
352  {
353  $lng = $this->lng;
354  $ilHelp = $this->help;
355 
356  $ilHelp->setScreenIdComponent("glo_term");
357 
358  if ($this->request->getTermId() > 0) {
359  $this->tabs_gui->addTab(
360  "properties",
361  $lng->txt("term"),
362  $this->ctrl->getLinkTarget($this, "editTerm")
363  );
364 
365  $this->tabs_gui->addTab(
366  "usage",
367  $lng->txt("cont_usage") . " (" . ilGlossaryTerm::getNumberOfUsages($this->request->getTermId()) . ")",
368  $this->ctrl->getLinkTarget($this, "listUsages")
369  );
370 
371  $mdgui = new ilObjectMetaDataGUI(
372  $this->term_glossary,
373  "term",
374  $this->term->getId()
375  );
376  $mdtab = $mdgui->getTab();
377  if ($mdtab) {
378  $this->tabs_gui->addTab(
379  "meta_data",
380  $lng->txt("meta_data"),
381  $mdtab
382  );
383  }
384 
385  $this->tabs_gui->addNonTabbedLink(
386  "presentation_view",
387  $this->lng->txt("glo_presentation_view"),
388  ILIAS_HTTP_PATH .
389  "/goto.php?target=" .
390  "git" .
391  "_" . $this->request->getTermId() . "_" . $this->request->getRefId() . "&client_id=" . CLIENT_ID,
392  "_top"
393  );
394  }
395 
396  // back to glossary
397  $this->tabs_gui->setBackTarget(
398  $this->lng->txt("glossary"),
399  $this->ctrl->getLinkTargetByClass("ilobjglossarygui", "listTerms")
400  );
401  }
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...
setScreenIdComponent(string $a_comp)
const CLIENT_ID
Definition: constants.php:41
static getNumberOfUsages(int $a_term_id)
getTab(string $base_class=null)
Get tab link if available.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listUsages()

ilGlossaryTermGUI::listUsages ( )

Definition at line 443 of file class.ilGlossaryTermGUI.php.

References $tabs_gui, $tpl, displayLocator(), ilUtil\getImagePath(), ILIAS\Repository\lng(), quickList(), ilGlobalTemplateInterface\setContent(), and setTabs().

443  : void
444  {
445  $ilTabs = $this->tabs_gui;
446  $tpl = $this->tpl;
447 
448  //$this->displayLocator();
449  // $this->getTemplate();
450  $this->displayLocator();
451  $this->setTabs();
452  $ilTabs->activateTab("usage");
453 
454  $this->tpl->setTitle($this->lng->txt("cont_term") . ": " . $this->term->getTerm());
455  $this->tpl->setTitleIcon(ilUtil::getImagePath("standard/icon_glo.svg"));
456 
457  $tab = new ilTermUsagesTableGUI($this, "listUsages", $this->request->getTermId());
458 
459  $tpl->setContent($tab->getHTML());
460 
461  $this->quickList();
462  }
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...
quickList()
Set quick term list cmd into left navigation URL.
setContent(string $a_html)
Sets content for standard template.
ilGlobalTemplateInterface $tpl
+ Here is the call graph for this function:

◆ output()

ilGlossaryTermGUI::output ( bool  $a_offline = false,
ilGlobalTemplateInterface  $a_tpl = null,
string  $a_outputmode = "presentation" 
)

output glossary term definitions used in ilLMPresentationGUI->ilGlossary()

Definition at line 285 of file class.ilGlossaryTermGUI.php.

References $tpl, ilMathJax\getInstance(), getOfflineDirectory(), ilGlobalTemplateInterface\parseCurrentBlock(), ilGlobalTemplateInterface\setCurrentBlock(), ilPageObjectGUI\setTemplate(), and ilGlobalTemplateInterface\setVariable().

Referenced by getOverlayHTML().

289  : void {
290  if ($a_tpl != null) {
291  $tpl = $a_tpl;
292  } else {
293  $tpl = $this->tpl;
294  }
295 
296  $tpl->setVariable("TXT_TERM", $this->term->getTerm());
297 
298  $page_gui = new ilGlossaryDefPageGUI($this->term->getId());
299  $page_gui->setTemplate($tpl);
300  $page_gui->setSourcecodeDownloadScript("ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=" . $this->ref_id);
301  if ($a_offline) {
302  $page_gui->setFullscreenLink("fullscreen.html"); // id is set by xslt
303  }
304  $page_gui->setFileDownloadLink("ilias.php?baseClass=ilGlossaryPresentationGUI&cmd=downloadFile&ref_id=" . $this->ref_id);
305 
306  if (!$a_offline) {
307  $page_gui->setOutputMode($a_outputmode);
308  } else {
309  $page_gui->setOutputMode("offline");
310  $page_gui->setOfflineDirectory($this->getOfflineDirectory());
311  }
312 
313  //$page_gui->setOutputMode("edit");
314  //$page_gui->setPresentationTitle($this->term->getTerm());
315  $page_gui->setPageLinker($this->page_linker);
316  $page_gui->setTemplateOutput(false);
317  $output = $page_gui->presentation($page_gui->getOutputMode());
318 
319  ilMathJax::getInstance()->includeMathJax($tpl);
320 
321  $tpl->setCurrentBlock("definition");
322  $tpl->setVariable("PAGE_CONTENT", $output);
324  }
setVariable(string $variable, $value='')
Sets the given variable to the given value.
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
static getInstance()
Singleton: get instance for use in ILIAS requests with a config loaded from the settings.
setTemplate(ilGlobalTemplateInterface $main_tpl)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
ilGlobalTemplateInterface $tpl
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ quickList()

ilGlossaryTermGUI::quickList ( )

Set quick term list cmd into left navigation URL.

Definition at line 467 of file class.ilGlossaryTermGUI.php.

References $tpl, and ilGlobalTemplateInterface\setLeftNavContent().

Referenced by editTerm(), executeCommand(), and listUsages().

467  : void
468  {
469  $tpl = $this->tpl;
470 
471  $tab = new ilTermQuickListTableGUI($this, "editTerm");
472  $tpl->setLeftNavContent($tab->getHTML());
473  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilGlobalTemplateInterface $tpl
setLeftNavContent(string $a_content)
Sets content of left navigation column.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setGlossary()

ilGlossaryTermGUI::setGlossary ( ilObjGlossary  $a_glossary)

Definition at line 136 of file class.ilGlossaryTermGUI.php.

136  : void
137  {
138  $this->glossary = $a_glossary;
139  if (!is_object($this->term_glossary)) {
140  $this->term_glossary = $a_glossary;
141  }
142  }

◆ setOfflineDirectory()

ilGlossaryTermGUI::setOfflineDirectory ( string  $offdir)

Definition at line 125 of file class.ilGlossaryTermGUI.php.

125  : void
126  {
127  $this->offline_directory = $offdir;
128  }

◆ setPageLinker()

ilGlossaryTermGUI::setPageLinker ( \ILIAS\COPage\PageLinker  $page_linker)

Definition at line 144 of file class.ilGlossaryTermGUI.php.

References $page_linker.

144  : void
145  {
146  $this->page_linker = $page_linker;
147  }
ILIAS COPage PageLinker $page_linker

◆ setTabs()

ilGlossaryTermGUI::setTabs ( )

Definition at line 339 of file class.ilGlossaryTermGUI.php.

References getTabs().

Referenced by editTerm(), executeCommand(), and listUsages().

339  : void
340  {
341  $this->getTabs();
342  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateTerm()

ilGlossaryTermGUI::updateTerm ( )

Definition at line 220 of file class.ilGlossaryTermGUI.php.

References ILIAS\Repository\ctrl(), ilTaxNodeAssignment\deleteAssignmentsOfItem(), editTerm(), getEditTermForm(), and ILIAS\Repository\lng().

220  : void
221  {
222  $form = $this->getEditTermForm();
223  if ($form->checkInput() &&
224  $this->record_gui->importEditFormPostValues()) {
225  // update term
226  $this->term->setTerm($form->getInput("term"));
227  $this->term->setLanguage($form->getInput("term_language"));
228  $this->term->update();
229 
230  // update taxonomy assignment
231  if ($this->term_glossary->getTaxonomyId() > 0) {
232  $ta = new ilTaxNodeAssignment("glo", $this->term_glossary->getId(), "term", $this->term_glossary->getTaxonomyId());
233  $ta->deleteAssignmentsOfItem($this->term->getId());
234  foreach ($this->request->getTaxNodes() as $node_id) {
235  $ta->addAssignment($node_id, $this->term->getId());
236  }
237  }
238 
239  $this->record_gui->writeEditForm();
240  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
241  $this->ctrl->redirect($this, "editTerm");
242  }
243 
244  $form->setValuesByPost();
245  $this->editTerm($form);
246  }
editTerm(ilPropertyFormGUI $a_form=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
deleteAssignmentsOfItem(int $a_item_id)
+ Here is the call graph for this function:

Field Documentation

◆ $content_style_domain

ILIAS Style Content DomainService ilGlossaryTermGUI::$content_style_domain
protected

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

◆ $content_style_gui

ILIAS Style Content GUIService ilGlossaryTermGUI::$content_style_gui
protected

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

◆ $ctrl

ilCtrl ilGlossaryTermGUI::$ctrl
protected

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

Referenced by editTerm().

◆ $glossary

ilObjGlossary ilGlossaryTermGUI::$glossary

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

◆ $help

ilHelpGUI ilGlossaryTermGUI::$help
protected

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

Referenced by getTabs().

◆ $lng

ilLanguage ilGlossaryTermGUI::$lng

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

Referenced by __construct(), getOverlayHTML(), and getTabs().

◆ $log

ilLogger ilGlossaryTermGUI::$log
protected

Definition at line 39 of file class.ilGlossaryTermGUI.php.

◆ $offline_directory

string ilGlossaryTermGUI::$offline_directory
protected

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

Referenced by getOfflineDirectory().

◆ $page_linker

ILIAS COPage PageLinker ilGlossaryTermGUI::$page_linker
protected

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

Referenced by setPageLinker().

◆ $record_gui

ilAdvancedMDRecordGUI ilGlossaryTermGUI::$record_gui
protected

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

◆ $ref_id

int ilGlossaryTermGUI::$ref_id
protected

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

◆ $request

ILIAS Glossary Editing EditingGUIRequest ilGlossaryTermGUI::$request
protected

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

◆ $tabs_gui

ilTabsGUI ilGlossaryTermGUI::$tabs_gui
protected

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

Referenced by editTerm(), executeCommand(), and listUsages().

◆ $term

ilGlossaryTerm ilGlossaryTermGUI::$term

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

◆ $term_glossary

ilObjGlossary ilGlossaryTermGUI::$term_glossary = null
protected

Definition at line 40 of file class.ilGlossaryTermGUI.php.

◆ $toolbar

ilToolbarGUI ilGlossaryTermGUI::$toolbar
protected

Definition at line 41 of file class.ilGlossaryTermGUI.php.

◆ $tpl

ilGlobalTemplateInterface ilGlossaryTermGUI::$tpl

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

Referenced by __construct(), listUsages(), output(), and quickList().


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