ILIAS  release_8 Revision v8.23
ilGlossaryForeignTermCollectorGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilGlossaryForeignTermCollectorGUI:

Public Member Functions

 executeCommand ()
 
 showGlossarySelector ()
 
 setForeignGlossary ()
 
 showTerms ()
 
 copyTerms ()
 
 referenceTerms ()
 

Static Public Member Functions

static getInstance (ilObjGlossaryGUI $a_glossary_gui)
 

Protected Attributes

ilObjGlossary $foreign_glossary
 
ILIAS Glossary Editing EditingGUIRequest $request
 
ILIAS Glossary Term TermManager $term_manager
 
ilObjGlossaryGUI $glossary_gui
 
ilObjGlossary $glossary
 
int $fglo_ref_id
 
ilCtrl $ctrl
 
ilLanguage $lng
 
ilGlobalTemplateInterface $tpl
 
ilObjUser $user
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Collects terms (reference or copy) from other glossaries

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 23 of file class.ilGlossaryForeignTermCollectorGUI.php.

Member Function Documentation

◆ copyTerms()

ilGlossaryForeignTermCollectorGUI::copyTerms ( )

Definition at line 129 of file class.ilGlossaryForeignTermCollectorGUI.php.

References $id, ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

129  : void
130  {
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");
135  }
136  foreach ($term_ids as $id) {
137  $this->term_manager->copyTermFromOtherGlossary(
138  $this->foreign_glossary->getRefId(),
139  $id
140  );
141  }
142  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
143  $this->ctrl->returnToParent($this);
144  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the call graph for this function:

◆ executeCommand()

ilGlossaryForeignTermCollectorGUI::executeCommand ( )

Definition at line 77 of file class.ilGlossaryForeignTermCollectorGUI.php.

References ILIAS\Repository\ctrl().

77  : void
78  {
79  $next_class = $this->ctrl->getNextClass($this);
80  $cmd = $this->ctrl->getCmd("showGlossarySelector");
81 
82  switch ($next_class) {
83  default:
84  if (in_array($cmd, array("showGlossarySelector", "setForeignGlossary", "showTerms", "copyTerms", "referenceTerms"))) {
85  $this->$cmd();
86  }
87  }
88  }
+ Here is the call graph for this function:

◆ getInstance()

static ilGlossaryForeignTermCollectorGUI::getInstance ( ilObjGlossaryGUI  $a_glossary_gui)
static

Definition at line 72 of file class.ilGlossaryForeignTermCollectorGUI.php.

Referenced by ilObjGlossaryGUI\executeCommand().

72  : self
73  {
74  return new self($a_glossary_gui);
75  }
+ Here is the caller graph for this function:

◆ referenceTerms()

ilGlossaryForeignTermCollectorGUI::referenceTerms ( )

Definition at line 146 of file class.ilGlossaryForeignTermCollectorGUI.php.

References $id, ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

146  : void
147  {
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");
152  }
153  $terms = array();
154  foreach ($term_ids as $id) {
155  $terms[] = $id;
156  }
157  $this->term_manager->referenceTermsFromOtherGlossary(
158  $this->foreign_glossary->getRefId(),
159  $terms
160  );
161 
162  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
163  $this->ctrl->returnToParent($this);
164  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the call graph for this function:

◆ setForeignGlossary()

ilGlossaryForeignTermCollectorGUI::setForeignGlossary ( )

Definition at line 107 of file class.ilGlossaryForeignTermCollectorGUI.php.

References $ctrl, $lng, $ref_id, and ilLanguage\txt().

107  : void
108  {
109  $ilCtrl = $this->ctrl;
110  $lng = $this->lng;
111 
112  $ref_id = $this->request->getForeignGlossaryRefId();
113 
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");
117  }
118 
119  $ilCtrl->redirect($this, "showTerms");
120  }
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...
$ref_id
Definition: ltiauth.php:67
+ Here is the call graph for this function:

◆ showGlossarySelector()

ilGlossaryForeignTermCollectorGUI::showGlossarySelector ( )

Definition at line 90 of file class.ilGlossaryForeignTermCollectorGUI.php.

References ILIAS\Repository\lng().

90  : void
91  {
92  $this->tpl->setOnScreenMessage('info', $this->lng->txt("glo_select_source_glo"));
94  $this,
95  "showGlossarySelector",
96  $this,
97  "setForeignGlossary",
98  "fglo_ref_id"
99  );
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());
104  }
105  }
Explorer for selecting repository items.
+ Here is the call graph for this function:

◆ showTerms()

ilGlossaryForeignTermCollectorGUI::showTerms ( )

Definition at line 122 of file class.ilGlossaryForeignTermCollectorGUI.php.

122  : void
123  {
124  $t = new ilGlossaryForeignTermTableGUI($this, "showTerms", $this->foreign_glossary);
125 
126  $this->tpl->setContent($t->getHTML());
127  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

Field Documentation

◆ $ctrl

ilCtrl ilGlossaryForeignTermCollectorGUI::$ctrl
protected

Definition at line 31 of file class.ilGlossaryForeignTermCollectorGUI.php.

Referenced by setForeignGlossary().

◆ $fglo_ref_id

int ilGlossaryForeignTermCollectorGUI::$fglo_ref_id
protected

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

◆ $foreign_glossary

ilObjGlossary ilGlossaryForeignTermCollectorGUI::$foreign_glossary
protected

Definition at line 25 of file class.ilGlossaryForeignTermCollectorGUI.php.

◆ $glossary

ilObjGlossary ilGlossaryForeignTermCollectorGUI::$glossary
protected

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

◆ $glossary_gui

ilObjGlossaryGUI ilGlossaryForeignTermCollectorGUI::$glossary_gui
protected

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

◆ $lng

ilLanguage ilGlossaryForeignTermCollectorGUI::$lng
protected

Definition at line 32 of file class.ilGlossaryForeignTermCollectorGUI.php.

Referenced by setForeignGlossary().

◆ $request

ILIAS Glossary Editing EditingGUIRequest ilGlossaryForeignTermCollectorGUI::$request
protected

Definition at line 26 of file class.ilGlossaryForeignTermCollectorGUI.php.

◆ $term_manager

ILIAS Glossary Term TermManager ilGlossaryForeignTermCollectorGUI::$term_manager
protected

Definition at line 27 of file class.ilGlossaryForeignTermCollectorGUI.php.

◆ $tpl

ilGlobalTemplateInterface ilGlossaryForeignTermCollectorGUI::$tpl
protected

Definition at line 33 of file class.ilGlossaryForeignTermCollectorGUI.php.

◆ $user

ilObjUser ilGlossaryForeignTermCollectorGUI::$user
protected

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


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