ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilGlossaryDefPageGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
4
15{
19 protected $glossary;
20
24 public function __construct($a_id = 0, $a_old_nr = 0)
25 {
26 global $DIC;
27
28 $this->tpl = $DIC["tpl"];
29 $tpl = $DIC["tpl"];
30
31 parent::__construct("gdf", $a_id, $a_old_nr);
32 }
33
39 public function setGlossary($a_val)
40 {
41 $this->glossary = $a_val;
42 }
43
49 public function getGlossary()
50 {
51 return $this->glossary;
52 }
53
57 public function postOutputProcessing($a_output)
58 {
59 if ($this->getOutputMode() == "print" && $this->glossary instanceof ilObjGlossary) {
60 $term_id = ilGlossaryDefinition::_lookupTermId($this->getId());
61 $mdgui = new ilObjectMetaDataGUI($this->glossary, "term", $term_id);
62 $md = $mdgui->getKeyValueList();
63 if ($md != "") {
64 $a_output = str_replace("<!--COPage-PageTop-->", "<p>" . $md . "</p>", $a_output);
65 }
66 }
67
68 return $a_output;
69 }
70}
An exception for terminatinating execution or to throw for unit testing.
Glossary definition page GUI class.
setGlossary($a_val)
Set glossary.
postOutputProcessing($a_output)
Output metadata.
__construct($a_id=0, $a_old_nr=0)
Constructor.
static _lookupTermId($a_def_id)
Looks up term id for a definition id.
Class ilObjGlossary.
Class ilObjectMetaDataGUI.
Class ilPageObjectGUI.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$DIC
Definition: xapitoken.php:46