ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilGlossaryLocatorGUI Class Reference

Glossary Locator GUI. More...

+ Collaboration diagram for ilGlossaryLocatorGUI:

Public Member Functions

 __construct ()
 
 setTemplateVariable (string $a_temp_var)
 
 setTerm (ilGlossaryTerm $a_term)
 
 setGlossary (ilObjGlossary $a_glossary)
 
 setDefinition (ilGlossaryDefinition $a_def)
 
 setMode (string $a_mode)
 
 display ()
 display locator More...
 

Data Fields

string $mode
 
string $temp_var
 
ilTree $tree
 
ilObjGlossary $glossary
 
ilLanguage $lng
 
ilGlobalTemplateInterface $tpl
 

Protected Attributes

PresentationGUIRequest $presentation_request
 
ilGlossaryDefinition $definition = null
 
ilGlossaryTerm $term = null
 
ilCtrl $ctrl
 
ilLocatorGUI $locator
 

Detailed Description

Glossary Locator GUI.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

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

Constructor & Destructor Documentation

◆ __construct()

ilGlossaryLocatorGUI::__construct ( )

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

References $DIC, $lng, $tpl, $tree, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ILIAS\Repository\locator().

41  {
42  global $DIC;
43 
44  $this->ctrl = $DIC->ctrl();
45  $this->locator = $DIC["ilLocator"];
46  $lng = $DIC->language();
47  $tpl = $DIC["tpl"];
48  $tree = $DIC->repositoryTree();
49 
50  $this->mode = "edit";
51  $this->temp_var = "LOCATOR";
52  $this->lng = $lng;
53  $this->tpl = $tpl;
54  $this->tree = $tree;
55  $this->presentation_request = $DIC->glossary()
56  ->internal()
57  ->gui()
58  ->presentation()
59  ->request();
60  }
global $DIC
Definition: feed.php:28
ilGlobalTemplateInterface $tpl
+ Here is the call graph for this function:

Member Function Documentation

◆ display()

ilGlossaryLocatorGUI::display ( )

display locator

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

References $ctrl, $locator, $tpl, ILIAS\Repository\lng(), and ilGlobalTemplateInterface\setLocator().

90  : void
91  {
92  $ilCtrl = $this->ctrl;
93  $ilLocator = $this->locator;
94  $tpl = $this->tpl;
95 
96  // repository links
97  $ilLocator->addRepositoryItems();
98 
99  // glossary link
100  $title = $this->glossary->getTitle();
101  if ($this->mode == "edit") {
102  $link = $ilCtrl->getLinkTargetByClass("ilobjglossarygui", "listTerms");
103  } else {
104  $ilCtrl->setParameterByClass("ilglossarypresentationgui", "term_id", "");
105  $link = $ilCtrl->getLinkTargetByClass("ilglossarypresentationgui");
106  if (is_object($this->term)) {
107  $ilCtrl->setParameterByClass("ilglossarypresentationgui", "term_id", $this->term->getId());
108  }
109  }
110  $ilLocator->addItem($title, $link, "");
111 
112  if (is_object($this->term) && $this->mode != "edit") {
113  $ilCtrl->setParameterByClass("ilglossarypresentationgui", "term_id", $this->term->getId());
114  $ilLocator->addItem(
115  $this->term->getTerm(),
116  $ilCtrl->getLinkTargetByClass("ilglossarypresentationgui", "listDefinitions")
117  );
118  $ilCtrl->setParameterByClass(
119  "ilglossarypresentationgui",
120  "term_id",
121  $this->presentation_request->getTermId()
122  );
123  }
124 
125  if (is_object($this->definition)) {
126  $title = $this->term->getTerm() . " (" . $this->lng->txt("cont_definition") . " " . $this->definition->getNr() . ")";
127  if ($this->mode == "edit") {
128  $link = $ilCtrl->getLinkTargetByClass("ilglossarydefpagegui", "edit");
129  } else {
130  $ilCtrl->setParameterByClass(
131  "ilglossarypresentationgui",
132  "def",
133  $this->presentation_request->getDefinitionId()
134  );
135  $link = $ilCtrl->getLinkTargetByClass("ilglossarypresentationgui", "view");
136  }
137  $ilLocator->addItem($title, $link);
138  }
139 
140  $tpl->setLocator();
141  }
setLocator()
Insert locator.
ilGlobalTemplateInterface $tpl
+ Here is the call graph for this function:

◆ setDefinition()

ilGlossaryLocatorGUI::setDefinition ( ilGlossaryDefinition  $a_def)

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

77  : void
78  {
79  $this->definition = $a_def;
80  }

◆ setGlossary()

ilGlossaryLocatorGUI::setGlossary ( ilObjGlossary  $a_glossary)

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

72  : void
73  {
74  $this->glossary = $a_glossary;
75  }

◆ setMode()

ilGlossaryLocatorGUI::setMode ( string  $a_mode)

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

82  : void
83  {
84  $this->mode = $a_mode;
85  }

◆ setTemplateVariable()

ilGlossaryLocatorGUI::setTemplateVariable ( string  $a_temp_var)

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

62  : void
63  {
64  $this->temp_var = $a_temp_var;
65  }

◆ setTerm()

ilGlossaryLocatorGUI::setTerm ( ilGlossaryTerm  $a_term)

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

67  : void
68  {
69  $this->term = $a_term;
70  }

Field Documentation

◆ $ctrl

ilCtrl ilGlossaryLocatorGUI::$ctrl
protected

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

Referenced by display().

◆ $definition

ilGlossaryDefinition ilGlossaryLocatorGUI::$definition = null
protected

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

◆ $glossary

ilObjGlossary ilGlossaryLocatorGUI::$glossary

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

◆ $lng

ilLanguage ilGlossaryLocatorGUI::$lng

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

Referenced by __construct().

◆ $locator

ilLocatorGUI ilGlossaryLocatorGUI::$locator
protected

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

Referenced by display().

◆ $mode

string ilGlossaryLocatorGUI::$mode

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

◆ $presentation_request

PresentationGUIRequest ilGlossaryLocatorGUI::$presentation_request
protected

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

◆ $temp_var

string ilGlossaryLocatorGUI::$temp_var

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

◆ $term

ilGlossaryTerm ilGlossaryLocatorGUI::$term = null
protected

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

◆ $tpl

ilGlobalTemplateInterface ilGlossaryLocatorGUI::$tpl

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

Referenced by __construct(), and display().

◆ $tree

ilTree ilGlossaryLocatorGUI::$tree

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

Referenced by __construct().


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