ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 
5 include_once("./Services/COPage/classes/class.ilPageObjectGUI.php");
6 include_once("./Modules/Glossary/classes/class.ilGlossaryDefPage.php");
7 
20 {
24  protected $glossary;
25 
29  function __construct($a_id = 0, $a_old_nr = 0)
30  {
31  global $tpl;
32 
33  parent::__construct("gdf", $a_id, $a_old_nr);
34  }
35 
41  function setGlossary($a_val)
42  {
43  $this->glossary = $a_val;
44  }
45 
51  function getGlossary()
52  {
53  return $this->glossary;
54  }
55 
59  function postOutputProcessing($a_output)
60  {
61  if ($this->getOutputMode() == "print" && $this->glossary instanceof ilObjGlossary)
62  {
63  include_once("./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
64  $term_id = ilGlossaryDefinition::_lookupTermId($this->getId());
65  include_once("./Services/Object/classes/class.ilObjectMetaDataGUI.php");
66  $mdgui = new ilObjectMetaDataGUI($this->glossary, "term", $term_id);
67  $md = $mdgui->getKeyValueList();
68  if ($md != "")
69  {
70  $a_output = str_replace("<!--COPage-PageTop-->", "<p>" . $md . "</p>", $a_output);
71  }
72  }
73 
74  return $a_output;
75  }
76 
77 
78 }
79 ?>
Class ilObjectMetaDataGUI.
setGlossary($a_val)
Set glossary.
Class ilObjGlossary.
Class ilPageObjectGUI.
postOutputProcessing($a_output)
Output metadata.
static _lookupTermId($a_def_id)
Looks up term id for a definition id.
__construct($a_id=0, $a_old_nr=0)
Constructor.
Glossary definition page GUI class.