26 protected \ILIAS\Glossary\InternalGUIService
$gui;
43 $this->glossary = $a_parent_obj->getObject();
44 $this->
setId(
"glotl" . $this->glossary->getId());
45 $this->tax_node = $a_tax_node;
47 $this->
lng = $DIC->language();
48 $this->
ctrl = $DIC->ctrl();
50 $this->selectable_cols = array();
56 foreach ($this->adv_fields as
$f) {
57 $this->selectable_cols[
"md_" . $f[
"id"]] = array(
64 $this->selectable_cols[
"language"] = array(
65 "txt" => $this->
lng->txt(
"language"),
67 $this->selectable_cols[
"usage"] = array(
68 "txt" => $this->
lng->txt(
"cont_usage"),
82 foreach ($this->adv_cols_order as
$c) {
85 } elseif (in_array(
"md_" . $c[
"id"], $this->selected_cols)) {
86 $this->
addColumn($c[
"text"],
"md_" . $c[
"id"]);
90 foreach (array(
"language",
"usage") as $c) {
91 if (in_array($c, $this->selected_cols)) {
92 $this->
addColumn($this->selectable_cols[$c][
"txt"]);
108 $this->
setRowTemplate(
"tpl.term_tbl_row.html",
"Modules/Glossary");
118 $this->
setData($this->glossary->getTermList(
119 $this->filter[
"term"],
121 $this->filter[
"definition"],
129 $this->gui = $DIC->glossary()
136 return ($this->glossary->getVirtualMode() ===
"coll" 149 if (strpos($a_field,
"md_") === 0) {
150 $md_id = (
int) substr($a_field, 3);
162 $ti->setMaxLength(64);
164 $ti->setSubmitFormOnEnter(
true);
166 $ti->readFromSession();
167 $this->
filter[
"term"] = $ti->getValue();
170 if ($this->glossary->supportsLongTextQuery()) {
172 $ti->setMaxLength(64);
174 $ti->setSubmitFormOnEnter(
true);
176 $ti->readFromSession();
177 $this->
filter[
"definition"] = $ti->getValue();
181 protected function fillRow(array $a_set): void
183 $ui_factory = $this->gui->ui()->factory();
184 $ui_renderer = $this->gui->ui()->renderer();
186 $term_id = $a_set[
"id"];
187 $this->
ctrl->setParameterByClass(
"ilobjglossarygui",
"term_id", $term_id);
188 $this->
ctrl->setParameterByClass(
"ilglossarytermgui",
"term_id", $term_id);
189 $this->
ctrl->setParameterByClass(
"ilglossarydefpagegui",
"term_id", $term_id);
194 if ($this->term_perm->checkPermission(
"write", $term_id) ||
195 $this->term_perm->checkPermission(
"edit_content", $term_id)) {
200 $actions[] = $ui_factory->link()->standard(
201 $this->
lng->txt(
"cont_edit_term"),
202 $this->
ctrl->getLinkTargetByClass(
"ilglossarytermgui",
"editTerm")
204 $this->
ctrl->setParameterByClass(
"ilglossarydefpagegui",
"term_id", $term_id);
205 $actions[] = $ui_factory->link()->standard(
206 $this->
lng->txt(
"cont_edit_definition"),
207 $this->
ctrl->getLinkTargetByClass(array(
"ilglossarytermgui",
208 "iltermdefinitioneditorgui",
209 "ilglossarydefpagegui"),
"edit")
211 $this->
ctrl->setParameterByClass(
"ilglossarydefpagegui",
"term_id",
"");
213 $dd = $ui_factory->dropdown()->standard($actions);
215 $this->tpl->setVariable(
"ACTIONS", $ui_renderer->render($dd));
220 $this->tpl->setCurrentBlock(
"definition");
227 $term_obj->updateShortText();
228 $short_str = $term_obj->getShortText();
235 $ltexs = strrpos($short_str,
"[tex]");
236 $ltexe = strrpos($short_str,
"[/tex]");
237 if ($ltexs > $ltexe) {
239 $short_str = $page->getFirstParagraphText();
240 $short_str = strip_tags($short_str,
"<br>");
241 $ltexe = strpos($short_str,
"[/tex]", $ltexs);
251 !$page->getPageConfig()->getPreventHTMLUnmasking()
254 $this->tpl->setVariable(
"DEF_SHORT", $short_str);
255 $this->tpl->parseCurrentBlock();
257 $this->tpl->setVariable(
"DEF_SHORT",
"Error: Page is missing.");
258 $this->tpl->parseCurrentBlock();
261 $this->tpl->setCurrentBlock(
"definition_row");
262 $this->tpl->parseCurrentBlock();
264 $this->tpl->setCurrentBlock(
"check_col");
265 $this->tpl->setVariable(
"CHECKBOX_ID", $term_id);
266 $this->tpl->parseCurrentBlock();
268 $this->
ctrl->setParameter($this->parent_obj,
"term_id", $term_id);
274 if ($nr_usage > 0 && $this->glossary->getId() == $a_set[
"glo_id"]) {
275 $this->tpl->setCurrentBlock(
"link_usage");
276 $this->
ctrl->setParameterByClass(
"ilglossarytermgui",
"term_id", $term_id);
278 $this->tpl->setVariable(
280 $this->
ctrl->getLinkTargetByClass(
"ilglossarytermgui",
"listUsages")
282 $this->
ctrl->setParameterByClass(
"ilglossarytermgui",
"term_id",
"");
284 $this->tpl->setCurrentBlock(
"usage");
287 $this->tpl->parseCurrentBlock();
288 $this->tpl->setCurrentBlock(
"td_usage");
289 $this->tpl->parseCurrentBlock();
294 $this->tpl->setCurrentBlock(
"glossary");
296 $this->tpl->parseCurrentBlock();
301 $this->tpl->setCurrentBlock(
"td_lang");
302 $this->tpl->setVariable(
"TEXT_LANGUAGE", $this->
lng->txt(
"meta_l_" . $a_set[
"language"]));
303 $this->tpl->parseCurrentBlock();
307 foreach ($this->adv_cols_order as
$c) {
309 $this->tpl->setCurrentBlock(
"td");
310 $this->tpl->setVariable(
"TD_VAL", $a_set[
"term"]);
311 $this->tpl->parseCurrentBlock();
312 } elseif (in_array(
"md_" . $c[
"id"], $this->selected_cols)) {
316 if (isset($a_set[
"md_" .
$id .
"_presentation"])) {
317 $pb = $a_set[
"md_" . $id .
"_presentation"]->getHTML();
323 $this->tpl->setCurrentBlock(
"td");
324 $this->tpl->setVariable(
"TD_VAL", $val);
325 $this->tpl->parseCurrentBlock();
setFormAction(string $a_form_action, bool $a_multipart=false)
addFilterItem(ilTableFilterItem $a_input_item, bool $a_optional=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setEnableTitle(bool $a_enabletitle)
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 xml2output(string $a_text, bool $a_wysiwyg=false, bool $a_replace_lists=true, bool $unmask=true)
Converts xml from DB to output in edit textarea.
static _lookShortTextDirty(int $term_id)
get definition short text dirty
static hasReferences(int $a_glossary_id)
Check if a glossary uses references.
static isReferenced(array $a_glo_id, int $a_term_id)
Is a term referenced by a set of glossaries.
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector.
static _lookupTitle(int $obj_id)
setDefaultOrderField(string $a_defaultorderfield)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
static _lookShortText(int $term_id)
get definition short text
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstance()
Singleton: get instance for use in ILIAS requests with a config loaded from the settings.
static shortenTextExtended(string $a_str, int $a_len, bool $a_dots=false, bool $a_next_blank=false, bool $a_keep_extension=false)
__construct(object $a_parent_obj, string $a_parent_cmd, int $a_tax_node)
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
ILIAS Glossary InternalGUIService $gui
filter(string $filter_id, $class_path, string $cmd, bool $activated=true, bool $expanded=true)
static getNumberOfUsages(int $a_term_id)
addMultiCommand(string $a_cmd, string $a_text)
ilGlossaryTermPermission $term_perm
setEnableHeader(bool $a_enableheader)
numericOrdering(string $a_field)
static _lookGlossaryID(int $term_id)
get glossary id form term id