ILIAS  release_8 Revision v8.24
class.ilGlossaryDefPageGUI.php
Go to the documentation of this file.
1<?php
2
27{
28 protected ?ilObjGlossary $glossary = null;
29
30 public function __construct(
31 int $a_id = 0,
32 int $a_old_nr = 0
33 ) {
34 parent::__construct("gdf", $a_id, $a_old_nr);
35 }
36
37 public function setGlossary(ilObjGlossary $a_val): void
38 {
39 $this->glossary = $a_val;
40 }
41
42 public function getGlossary(): ilObjGlossary
43 {
44 return $this->glossary;
45 }
46
47 public function postOutputProcessing(string $a_output): string
48 {
49 if ($this->getOutputMode() == "print" && !is_null($this->glossary)) {
50 $term_id = ilGlossaryDefinition::_lookupTermId($this->getId());
51 $mdgui = new ilObjectMetaDataGUI($this->glossary, "term", $term_id);
52 $md = $mdgui->getKeyValueList();
53 if ($md != "") {
54 $a_output = str_replace("<!--COPage-PageTop-->", "<p>" . $md . "</p>", $a_output);
55 }
56 }
57
58 return $a_output;
59 }
60
61 public function finishEditing(): void
62 {
63 $this->ctrl->redirectByClass("ilObjGlossaryGUI", "listTerms");
64 }
65}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
postOutputProcessing(string $a_output)
Finalizing output processing.
setGlossary(ilObjGlossary $a_val)
__construct(int $a_id=0, int $a_old_nr=0)
static _lookupTermId(int $a_def_id)
Looks up term id for a definition id.
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...
Class ilPageObjectGUI.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc