27 protected \ILIAS\Glossary\Editing\EditingGUIRequest
$request;
42 $lng = $DIC->language();
43 $ilCtrl = $DIC->ctrl();
44 $ilTabs = $DIC->tabs();
49 $this->
ctrl = $ilCtrl;
50 $this->request = $DIC->glossary()
57 $this->glossary =
new ilObjGlossary($this->request->getRefId(),
true);
60 $this->tabs_gui = $ilTabs;
62 $this->
ctrl->saveParameter($this, array(
"term"));
64 $cs = $DIC->contentStyle();
65 $this->content_style_gui = $cs->gui();
66 $this->content_style_domain = $cs->domain()->styleForRefId($this->glossary->getRefId());
70 public function executeCommand():
void 76 $next_class = $this->
ctrl->getNextClass($this);
77 $cmd = $this->
ctrl->getCmd();
80 $this->content_style_gui->addCss(
82 $this->term_glossary->getRefId(),
83 $this->term_glossary->getId()
87 $this->tpl->setCurrentBlock(
"SyntaxStyle");
88 $this->tpl->setVariable(
89 "LOCATION_SYNTAX_STYLESHEET",
92 $this->tpl->parseCurrentBlock();
95 $gloss_loc->setTerm($this->term);
96 $gloss_loc->setGlossary($this->glossary);
98 $this->tpl->setTitle($this->term->getTerm() .
" - " .
99 $this->
lng->txt(
"cont_definition"));
100 if ($this->
ctrl->getNextClass() ==
"ilglossarydefpagegui") {
104 switch ($next_class) {
105 case "ilglossarydefpagegui":
107 if ($ilCtrl->getCmd() ==
"edit" &&
108 $ilCtrl->getCmdClass() ==
"ilglossarydefpagegui") {
111 $link =
"[<a href='" .
112 $ilCtrl->getLinkTargetByClass(
"ilglossarytermgui",
"listUsages") .
113 "'>" . $lng->
txt(
"glo_list_usages") .
"</a>]";
114 $this->tpl->setOnScreenMessage(
"info", sprintf(
115 $lng->
txt(
"glo_term_is_used_n_times"),
122 if ($this->
ctrl->getNextClass() ==
"ilglossarydefpagegui" 123 || $this->
ctrl->getCmdClass() ==
"ileditclipboardgui") {
124 $gloss_loc->display();
127 $this->
ctrl->setReturnByClass(
"ilGlossaryDefPageGUI",
"edit");
128 $this->
ctrl->setReturn($this,
"listDefinitions");
133 $this->term->assignPageObject($page);
134 $page->addUpdateListener($this,
"saveShortText");
137 $page_gui->setSourcecodeDownloadScript(
"ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=" . $this->request->getRefId());
138 $page_gui->setFullscreenLink(
"ilias.php?baseClass=ilGlossaryPresentationGUI&cmd=fullscreen&ref_id=" . $this->request->getRefId());
139 $page_gui->setTemplateTargetVar(
"ADM_CONTENT");
140 $page_gui->setOutputMode(
"edit");
142 $page_gui->setStyleId($this->content_style_domain->getEffectiveStyleId());
144 $page_gui->setIntLinkReturn($this->
ctrl->getLinkTargetByClass(
151 $page_gui->setPageBackTitle($this->
lng->txt(
"cont_definition"));
152 $page_gui->setLinkParams(
"ref_id=" . $this->request->getRefId());
153 $page_gui->setHeader($this->term->getTerm());
154 $page_gui->setFileDownloadLink(
"ilias.php?baseClass=ilGlossaryPresentationGUI&cmd=downloadFile&ref_id=" . $this->request->getRefId());
155 $page_gui->setPresentationTitle($this->term->getTerm());
156 $ret = $this->
ctrl->forwardCommand($page_gui);
164 $gloss_loc->display();
178 $this->tabs_gui->setBack2Target(
179 $this->
lng->txt(
"glossary"),
180 $this->
ctrl->getLinkTargetByClass(
"ilobjglossarygui",
"")
184 $this->tabs_gui->setBackTarget(
185 $this->
lng->txt(
"term"),
186 $this->
ctrl->getLinkTargetByClass(
"ilglossarytermgui",
"editTerm")
192 $this->term->updateShortText();
setEditPreview(bool $a_editpreview)
Set Display first Edit tab, then Preview tab, instead of Page and Edit.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
ILIAS Style Content Object ObjectFacade $content_style_domain
ILIAS Glossary Editing EditingGUIRequest $request
ilGlobalTemplateInterface $tpl
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setContent(string $a_html)
Sets content for standard template.
ILIAS Style Content GUIService $content_style_gui
static getSyntaxStylePath()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getNumberOfUsages(int $a_term_id)
ilObjGlossary $term_glossary
static _lookGlossaryID(int $term_id)
get glossary id form term id