ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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)
 
 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
 
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 39 of file class.ilGlossaryLocatorGUI.php.

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

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

+ Here is the call graph for this function:

Member Function Documentation

◆ display()

ilGlossaryLocatorGUI::display ( )

display locator

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

84 : void
85 {
86 $ilCtrl = $this->ctrl;
87 $ilLocator = $this->locator;
89
90 // repository links
91 $ilLocator->addRepositoryItems();
92
93 // glossary link
94 $title = $this->glossary->getTitle();
95 if ($this->mode == "edit") {
96 $link = $ilCtrl->getLinkTargetByClass("ilobjglossarygui", "listTerms");
97 } else {
98 $ilCtrl->setParameterByClass("ilglossarypresentationgui", "term_id", "");
99 $link = $ilCtrl->getLinkTargetByClass("ilglossarypresentationgui");
100 if (is_object($this->term)) {
101 $ilCtrl->setParameterByClass("ilglossarypresentationgui", "term_id", $this->term->getId());
102 }
103 }
104 $ilLocator->addItem($title, $link, "");
105
106 if (is_object($this->term) && $this->mode != "edit") {
107 $ilCtrl->setParameterByClass("ilglossarypresentationgui", "term_id", $this->term->getId());
108 $ilLocator->addItem(
109 $this->term->getTerm(),
110 $ilCtrl->getLinkTargetByClass("ilglossarypresentationgui", "listDefinitions")
111 );
112 $ilCtrl->setParameterByClass(
113 "ilglossarypresentationgui",
114 "term_id",
115 $this->presentation_request->getTermId()
116 );
117 } elseif (is_object($this->term)) {
118 $title = $this->term->getTerm() . " (" . $this->lng->txt("cont_definition") . ")";
119 $link = $ilCtrl->getLinkTargetByClass("ilglossarydefpagegui", "edit");
120 $ilLocator->addItem($title, $link);
121 }
122
123 $tpl->setLocator();
124 }
setLocator()
Insert locator.

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

+ Here is the call graph for this function:

◆ setGlossary()

ilGlossaryLocatorGUI::setGlossary ( ilObjGlossary  $a_glossary)

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

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

◆ setMode()

ilGlossaryLocatorGUI::setMode ( string  $a_mode)

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

76 : void
77 {
78 $this->mode = $a_mode;
79 }

◆ setTemplateVariable()

ilGlossaryLocatorGUI::setTemplateVariable ( string  $a_temp_var)

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

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

◆ setTerm()

ilGlossaryLocatorGUI::setTerm ( ilGlossaryTerm  $a_term)

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

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

Field Documentation

◆ $ctrl

ilCtrl ilGlossaryLocatorGUI::$ctrl
protected

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

Referenced by display().

◆ $glossary

ilObjGlossary ilGlossaryLocatorGUI::$glossary

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

◆ $lng

ilLanguage ilGlossaryLocatorGUI::$lng

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

Referenced by __construct().

◆ $locator

ilLocatorGUI ilGlossaryLocatorGUI::$locator
protected

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

Referenced by display().

◆ $mode

string ilGlossaryLocatorGUI::$mode

Definition at line 32 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 33 of file class.ilGlossaryLocatorGUI.php.

◆ $term

ilGlossaryTerm ilGlossaryLocatorGUI::$term = null
protected

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

◆ $tpl

ilGlobalTemplateInterface ilGlossaryLocatorGUI::$tpl

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

Referenced by __construct(), and display().

◆ $tree

ilTree ilGlossaryLocatorGUI::$tree

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

Referenced by __construct().


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