26 protected \ILIAS\Glossary\Editing\EditingGUIRequest
$request;
41 $this->tpl = $DIC[
"tpl"];
42 $this->
ctrl = $DIC->ctrl();
43 $this->
lng = $DIC->language();
44 $this->
user = $DIC->user();
46 $this->glossary_gui = $a_glossary_gui;
51 $this->term_manager = $DIC->glossary()
58 $this->request = $DIC->glossary()
64 $this->fglo_ref_id = $this->request->getForeignGlossaryRefId();
66 $this->foreign_glossary =
new ilObjGlossary($this->fglo_ref_id,
true);
69 $this->
ctrl->saveParameter($this,
"fglo_ref_id");
74 return new self($a_glossary_gui);
79 $next_class = $this->
ctrl->getNextClass($this);
80 $cmd = $this->
ctrl->getCmd(
"showGlossarySelector");
82 switch ($next_class) {
84 if (in_array($cmd, array(
"showGlossarySelector",
"setForeignGlossary",
"showTerms",
"copyTerms",
"referenceTerms"))) {
92 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"glo_select_source_glo"));
95 "showGlossarySelector",
100 $exp->setTypeWhiteList(array(
"root",
"cat",
"grp",
"crs",
"glo",
"fold"));
101 $exp->setClickableTypes(array(
"glo"));
102 if (!$exp->handleCommand()) {
103 $this->tpl->setContent($exp->getHTML());
112 $ref_id = $this->request->getForeignGlossaryRefId();
114 if (
$ref_id == $this->glossary->getRefId()) {
115 $this->tpl->setOnScreenMessage(
'failure', $lng->
txt(
"glo_please_select_other_glo"),
true);
116 $ilCtrl->redirect($this,
"showGlossarySelector");
119 $ilCtrl->redirect($this,
"showTerms");
126 $this->tpl->setContent($t->getHTML());
131 $term_ids = $this->request->getTermIds();
132 if (count($term_ids) == 0) {
133 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
134 $this->
ctrl->redirect($this,
"showTerms");
136 foreach ($term_ids as
$id) {
137 $this->term_manager->copyTermFromOtherGlossary(
138 $this->foreign_glossary->getRefId(),
142 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
143 $this->
ctrl->returnToParent($this);
148 $term_ids = $this->request->getTermIds();
149 if (count($term_ids) == 0) {
150 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
"no_checkbox"),
true);
151 $this->
ctrl->redirect($this,
"showTerms");
154 foreach ($term_ids as
$id) {
157 $this->term_manager->referenceTermsFromOtherGlossary(
158 $this->foreign_glossary->getRefId(),
162 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"msg_obj_modified"),
true);
163 $this->
ctrl->returnToParent($this);
static getInstance(ilObjGlossaryGUI $a_glossary_gui)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilObjGlossary $foreign_glossary
ILIAS Glossary Editing EditingGUIRequest $request
Explorer for selecting repository items.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilObjGlossaryGUI $glossary_gui
ILIAS Glossary Term TermManager $term_manager
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(Container $dic, ilPlugin $plugin)
ilGlobalTemplateInterface $tpl
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
static _lookupType(int $id, bool $reference=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...