58 $this->tpl = $DIC[
"tpl"];
59 $this->ctrl = $DIC->ctrl();
60 $this->lng = $DIC->language();
61 $this->
user = $DIC->user();
63 $this->glossary_gui = $a_glossary_gui;
64 $this->glossary = $a_glossary_gui->object;
66 $this->fglo_ref_id = (int)
$_GET[
"fglo_ref_id"];
69 $this->foreign_glossary =
new ilObjGlossary($this->fglo_ref_id,
true);
72 $this->ctrl->saveParameter($this,
"fglo_ref_id");
83 return new self($a_glossary_gui);
91 $next_class = $this->ctrl->getNextClass($this);
92 $cmd = $this->ctrl->getCmd(
"showGlossarySelector");
97 if (in_array(
$cmd,
array(
"showGlossarySelector",
"setForeignGlossary",
"showTerms",
"copyTerms",
"referenceTerms")))
110 include_once(
"./Services/Repository/classes/class.ilRepositorySelectorExplorerGUI.php");
112 $this,
"setForeignGlossary",
"fglo_ref_id");
113 $exp->setTypeWhiteList(
array(
"root",
"cat",
"grp",
"crs",
"glo",
"fold"));
114 $exp->setClickableTypes(
array(
"glo"));
115 if (!$exp->handleCommand())
117 $this->tpl->setContent($exp->getHTML());
130 if (
$ref_id == $this->glossary->getRefId())
133 $ilCtrl->redirect($this,
"showGlossarySelector");
136 $ilCtrl->redirect($this,
"showTerms");
147 include_once(
"./Modules/Glossary/classes/class.ilGlossaryForeignTermTableGUI.php");
150 $this->tpl->setContent(
$t->getHTML());
161 if(!is_array(
$_POST[
"term_id"]))
164 $this->ctrl->redirect($this,
"showTerms");
166 include_once(
"./Modules/Glossary/classes/class.ilGlossaryAct.php");
168 foreach (
$_POST[
"term_id"] as $id)
170 $act->copyTerm($this->foreign_glossary, (
int) $id);
173 $this->ctrl->returnToParent($this);
184 if(!is_array(
$_POST[
"term_id"]))
187 $this->ctrl->redirect($this,
"showTerms");
189 include_once(
"./Modules/Glossary/classes/class.ilGlossaryAct.php");
192 foreach (
$_POST[
"term_id"] as $id)
194 $terms[] = (int) $id;
197 $act->referenceTerms($this->foreign_glossary, $terms);
200 $this->ctrl->returnToParent($this);
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static getInstance(ilObjGlossaryGUI $a_glossary_gui)
Get instance.
Explorer for selecting repository items.
static getInstance(ilObjGlossary $a_glossary, ilObjUser $a_user)
Get instance.
setForeignGlossary()
Save level resource.
__construct(ilObjGlossaryGUI $a_glossary_gui)
Constructor.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
executeCommand()
Execute command.
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
Collects terms (reference or copy) from other glossaries.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
referenceTerms()
Reference terms.
TableGUI class for collecting foreign terms.
showGlossarySelector()
Add level resource.