ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilGlossaryDefPageGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5include_once("./Services/COPage/classes/class.ilPageObjectGUI.php");
6include_once("./Modules/Glossary/classes/class.ilGlossaryDefPage.php");
7
20{
24 protected $glossary;
25
29 public function __construct($a_id = 0, $a_old_nr = 0)
30 {
31 global $DIC;
32
33 $this->tpl = $DIC["tpl"];
34 $tpl = $DIC["tpl"];
35
36 parent::__construct("gdf", $a_id, $a_old_nr);
37 }
38
44 public function setGlossary($a_val)
45 {
46 $this->glossary = $a_val;
47 }
48
54 public function getGlossary()
55 {
56 return $this->glossary;
57 }
58
62 public function postOutputProcessing($a_output)
63 {
64 if ($this->getOutputMode() == "print" && $this->glossary instanceof ilObjGlossary) {
65 include_once("./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
66 $term_id = ilGlossaryDefinition::_lookupTermId($this->getId());
67 include_once("./Services/Object/classes/class.ilObjectMetaDataGUI.php");
68 $mdgui = new ilObjectMetaDataGUI($this->glossary, "term", $term_id);
69 $md = $mdgui->getKeyValueList();
70 if ($md != "") {
71 $a_output = str_replace("<!--COPage-PageTop-->", "<p>" . $md . "</p>", $a_output);
72 }
73 }
74
75 return $a_output;
76 }
77}
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.
global $DIC
Definition: saml.php:7