ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilGlossaryLocatorGUI Class Reference

Glossary Locator GUI. More...

+ Collaboration diagram for ilGlossaryLocatorGUI:

Public Member Functions

 __construct ()
 
 setTemplateVariable ($a_temp_var)
 
 setTerm (&$a_term)
 
 setGlossary (&$a_glossary)
 
 setDefinition (&$a_def)
 
 setMode ($a_mode)
 
 display ()
 display locator More...
 

Data Fields

 $mode
 
 $temp_var
 
 $tree
 
 $obj
 
 $lng
 
 $tpl
 

Detailed Description

Glossary Locator GUI.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 13 of file class.ilGlossaryLocatorGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilGlossaryLocatorGUI::__construct ( )

Definition at line 23 of file class.ilGlossaryLocatorGUI.php.

References $lng, $tpl, and $tree.

24  {
25  global $lng, $tpl, $tree;
26 
27  $this->mode = "edit";
28  $this->temp_var = "LOCATOR";
29  $this->lng = $lng;
30  $this->tpl = $tpl;
31  $this->tree = $tree;
32  }

Member Function Documentation

◆ display()

ilGlossaryLocatorGUI::display ( )

display locator

Definition at line 62 of file class.ilGlossaryLocatorGUI.php.

References $_GET, $ilCtrl, $lng, $title, and $tpl.

63  {
64  global $lng, $ilCtrl, $ilLocator, $tpl;
65 
66  // repository links
67  $ilLocator->addRepositoryItems();
68 
69  // glossary link
70  $title = $this->glossary->getTitle();
71  if ($this->mode == "edit")
72  {
73  $link = $ilCtrl->getLinkTargetByClass("ilobjglossarygui", "listTerms");
74  }
75  else
76  {
77  $ilCtrl->setParameterByClass("ilglossarypresentationgui", "term_id", "");
78  $link = $ilCtrl->getLinkTargetByClass("ilglossarypresentationgui");
79  if (is_object($this->term))
80  {
81  $ilCtrl->setParameterByClass("ilglossarypresentationgui", "term_id", $this->term->getId());
82  }
83  }
84  $ilLocator->addItem($title, $link, "");
85 
86  if (is_object($this->term) && $this->mode != "edit")
87  {
88  $ilCtrl->setParameterByClass("ilglossarypresentationgui", "term_id", $this->term->getId());
89  $ilLocator->addItem($this->term->getTerm(),
90  $ilCtrl->getLinkTargetByClass("ilglossarypresentationgui", "listDefinitions"));
91  $ilCtrl->setParameterByClass("ilglossarypresentationgui", "term_id", $_GET["term_id"]);
92  }
93 
94  if (is_object($this->definition))
95  {
96  $title = $this->term->getTerm()." (".$this->lng->txt("cont_definition")." ".$this->definition->getNr().")";
97  if ($this->mode == "edit")
98  {
99  $link = $ilCtrl->getLinkTargetByClass("ilglossarydefpagegui", "edit");
100  }
101  else
102  {
103  $ilCtrl->setParameterByClass("ilglossarypresentationgui", "def", $_GET["def"]);
104  $link = $ilCtrl->getLinkTargetByClass("ilglossarypresentationgui", "view");
105  }
106  $ilLocator->addItem($title, $link);
107  }
108 
109  $tpl->setLocator();
110  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18

◆ setDefinition()

ilGlossaryLocatorGUI::setDefinition ( $a_def)

Definition at line 49 of file class.ilGlossaryLocatorGUI.php.

50  {
51  $this->definition = $a_def;
52  }

◆ setGlossary()

ilGlossaryLocatorGUI::setGlossary ( $a_glossary)

Definition at line 44 of file class.ilGlossaryLocatorGUI.php.

45  {
46  $this->glossary = $a_glossary;
47  }

◆ setMode()

ilGlossaryLocatorGUI::setMode (   $a_mode)

Definition at line 54 of file class.ilGlossaryLocatorGUI.php.

55  {
56  $this->mode = $a_mode;
57  }

◆ setTemplateVariable()

ilGlossaryLocatorGUI::setTemplateVariable (   $a_temp_var)

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

35  {
36  $this->temp_var = $a_temp_var;
37  }

◆ setTerm()

ilGlossaryLocatorGUI::setTerm ( $a_term)

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

40  {
41  $this->term = $a_term;
42  }

Field Documentation

◆ $lng

ilGlossaryLocatorGUI::$lng

Definition at line 19 of file class.ilGlossaryLocatorGUI.php.

Referenced by __construct(), and display().

◆ $mode

ilGlossaryLocatorGUI::$mode

Definition at line 15 of file class.ilGlossaryLocatorGUI.php.

◆ $obj

ilGlossaryLocatorGUI::$obj

Definition at line 18 of file class.ilGlossaryLocatorGUI.php.

◆ $temp_var

ilGlossaryLocatorGUI::$temp_var

Definition at line 16 of file class.ilGlossaryLocatorGUI.php.

◆ $tpl

ilGlossaryLocatorGUI::$tpl

Definition at line 20 of file class.ilGlossaryLocatorGUI.php.

Referenced by __construct(), and display().

◆ $tree

ilGlossaryLocatorGUI::$tree

Definition at line 17 of file class.ilGlossaryLocatorGUI.php.

Referenced by __construct().


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