37 $this->ctrl = $DIC->ctrl();
38 $this->locator = $DIC[
"ilLocator"];
39 $lng = $DIC->language();
41 $tree = $DIC->repositoryTree();
44 $this->temp_var =
"LOCATOR";
52 $this->temp_var = $a_temp_var;
57 $this->term = $a_term;
62 $this->glossary = $a_glossary;
67 $this->definition = $a_def;
72 $this->mode = $a_mode;
86 $ilLocator->addRepositoryItems();
89 $title = $this->glossary->getTitle();
90 if ($this->mode ==
"edit") {
91 $link =
$ilCtrl->getLinkTargetByClass(
"ilobjglossarygui",
"listTerms");
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());
99 $ilLocator->addItem(
$title, $link,
"");
101 if (is_object($this->term) && $this->mode !=
"edit") {
102 $ilCtrl->setParameterByClass(
"ilglossarypresentationgui",
"term_id", $this->term->getId());
104 $this->term->getTerm(),
105 $ilCtrl->getLinkTargetByClass(
"ilglossarypresentationgui",
"listDefinitions")
107 $ilCtrl->setParameterByClass(
"ilglossarypresentationgui",
"term_id",
$_GET[
"term_id"]);
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");
115 $ilCtrl->setParameterByClass(
"ilglossarypresentationgui",
"def",
$_GET[
"def"]);
116 $link =
$ilCtrl->getLinkTargetByClass(
"ilglossarypresentationgui",
"view");
118 $ilLocator->addItem(
$title, $link);
setTemplateVariable($a_temp_var)
setGlossary(&$a_glossary)