ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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
 

Protected Attributes

 $ctrl
 
 $locator
 

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 33 of file class.ilGlossaryLocatorGUI.php.

34 {
35 global $DIC;
36
37 $this->ctrl = $DIC->ctrl();
38 $this->locator = $DIC["ilLocator"];
39 $lng = $DIC->language();
40 $tpl = $DIC["tpl"];
41 $tree = $DIC->repositoryTree();
42
43 $this->mode = "edit";
44 $this->temp_var = "LOCATOR";
45 $this->lng = $lng;
46 $this->tpl = $tpl;
47 $this->tree = $tree;
48 }
$DIC
Definition: xapitoken.php:46

References $DIC, $lng, $tpl, and $tree.

Member Function Documentation

◆ display()

ilGlossaryLocatorGUI::display ( )

display locator

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

79 {
82 $ilLocator = $this->locator;
84
85 // repository links
86 $ilLocator->addRepositoryItems();
87
88 // glossary link
89 $title = $this->glossary->getTitle();
90 if ($this->mode == "edit") {
91 $link = $ilCtrl->getLinkTargetByClass("ilobjglossarygui", "listTerms");
92 } else {
93 $ilCtrl->setParameterByClass("ilglossarypresentationgui", "term_id", "");
94 $link = $ilCtrl->getLinkTargetByClass("ilglossarypresentationgui");
95 if (is_object($this->term)) {
96 $ilCtrl->setParameterByClass("ilglossarypresentationgui", "term_id", $this->term->getId());
97 }
98 }
99 $ilLocator->addItem($title, $link, "");
100
101 if (is_object($this->term) && $this->mode != "edit") {
102 $ilCtrl->setParameterByClass("ilglossarypresentationgui", "term_id", $this->term->getId());
103 $ilLocator->addItem(
104 $this->term->getTerm(),
105 $ilCtrl->getLinkTargetByClass("ilglossarypresentationgui", "listDefinitions")
106 );
107 $ilCtrl->setParameterByClass("ilglossarypresentationgui", "term_id", $_GET["term_id"]);
108 }
109
110 if (is_object($this->definition)) {
111 $title = $this->term->getTerm() . " (" . $this->lng->txt("cont_definition") . " " . $this->definition->getNr() . ")";
112 if ($this->mode == "edit") {
113 $link = $ilCtrl->getLinkTargetByClass("ilglossarydefpagegui", "edit");
114 } else {
115 $ilCtrl->setParameterByClass("ilglossarypresentationgui", "def", $_GET["def"]);
116 $link = $ilCtrl->getLinkTargetByClass("ilglossarypresentationgui", "view");
117 }
118 $ilLocator->addItem($title, $link);
119 }
120
121 $tpl->setLocator();
122 }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18

References $_GET, $ctrl, $ilCtrl, $lng, $locator, and $tpl.

◆ setDefinition()

ilGlossaryLocatorGUI::setDefinition ( $a_def)

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

66 {
67 $this->definition = $a_def;
68 }

◆ setGlossary()

ilGlossaryLocatorGUI::setGlossary ( $a_glossary)

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

61 {
62 $this->glossary = $a_glossary;
63 }

◆ setMode()

ilGlossaryLocatorGUI::setMode (   $a_mode)

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

71 {
72 $this->mode = $a_mode;
73 }

◆ setTemplateVariable()

ilGlossaryLocatorGUI::setTemplateVariable (   $a_temp_var)

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

51 {
52 $this->temp_var = $a_temp_var;
53 }

◆ setTerm()

ilGlossaryLocatorGUI::setTerm ( $a_term)

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

56 {
57 $this->term = $a_term;
58 }

Field Documentation

◆ $ctrl

ilGlossaryLocatorGUI::$ctrl
protected

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

Referenced by display().

◆ $lng

ilGlossaryLocatorGUI::$lng

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

Referenced by __construct(), and display().

◆ $locator

ilGlossaryLocatorGUI::$locator
protected

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

Referenced by display().

◆ $mode

ilGlossaryLocatorGUI::$mode

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

◆ $obj

ilGlossaryLocatorGUI::$obj

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

◆ $temp_var

ilGlossaryLocatorGUI::$temp_var

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

◆ $tpl

ilGlossaryLocatorGUI::$tpl

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

Referenced by __construct(), and display().

◆ $tree

ilGlossaryLocatorGUI::$tree

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

Referenced by __construct().


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