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"];
68 $this->foreign_glossary =
new ilObjGlossary($this->fglo_ref_id,
true);
71 $this->ctrl->saveParameter($this,
"fglo_ref_id");
82 return new self($a_glossary_gui);
90 $next_class = $this->ctrl->getNextClass($this);
91 $cmd = $this->ctrl->getCmd(
"showGlossarySelector");
93 switch ($next_class) {
95 if (in_array($cmd, array(
"showGlossarySelector",
"setForeignGlossary",
"showTerms",
"copyTerms",
"referenceTerms"))) {
109 "showGlossarySelector",
111 "setForeignGlossary",
114 $exp->setTypeWhiteList(array(
"root",
"cat",
"grp",
"crs",
"glo",
"fold"));
115 $exp->setClickableTypes(array(
"glo"));
116 if (!$exp->handleCommand()) {
117 $this->tpl->setContent($exp->getHTML());
129 $ref_id = (int)
$_GET[
"fglo_ref_id"];
131 if ($ref_id == $this->glossary->getRefId()) {
133 $ilCtrl->redirect($this,
"showGlossarySelector");
136 $ilCtrl->redirect($this,
"showTerms");
149 $this->tpl->setContent($t->getHTML());
160 if (!is_array(
$_POST[
"term_id"])) {
162 $this->ctrl->redirect($this,
"showTerms");
165 foreach (
$_POST[
"term_id"] as $id) {
166 $act->copyTerm($this->foreign_glossary, (
int) $id);
168 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
169 $this->ctrl->returnToParent($this);
180 if (!is_array(
$_POST[
"term_id"])) {
182 $this->ctrl->redirect($this,
"showTerms");
186 foreach (
$_POST[
"term_id"] as $id) {
187 $terms[] = (int) $id;
189 $act->referenceTerms($this->foreign_glossary, $terms);
191 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
192 $this->ctrl->returnToParent($this);
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.
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.