29 protected \ILIAS\Glossary\Presentation\PresentationGUIRequest
$request;
48 $this->
lng = $DIC->language();
49 $this->
ctrl = $DIC->ctrl();
51 $this->glossary = $a_glossary;
52 $this->offline = $a_offline;
53 $this->tax_node = $a_tax_node;
54 $this->tax_id = $a_tax_id;
55 $this->
setId(
"glopr" . $this->glossary->getId());
56 $this->request = $DIC->glossary()
63 $this->page_config = $gdf->getPageConfig();
72 if ($this->glossary->getPresentationMode() ==
"full_def") {
77 foreach ($this->adv_cols_order as
$c) {
81 $this->
addColumn($c[
"text"],
"md_" . $c[
"id"]);
87 if ($this->glossary->isVirtual()) {
93 if (!$this->offline) {
98 $this->
setRowTemplate(
"tpl.term_tbl_pres_row.html",
"Modules/Glossary");
101 if (!$this->offline) {
112 $this->glossary->getId(),
116 $this->record_gui->parse();
119 $this->
setData($this->glossary->getTermList(
120 $this->filter[
"term"] ??
"",
121 $this->request->getLetter(),
122 $this->
filter[
"definition"] ??
"",
126 $this->record_gui->getFilterElements(),
130 if ($this->offline) {
146 $ti->setMaxLength(64);
148 $ti->setSubmitFormOnEnter(
true);
150 $ti->readFromSession();
151 $this->
filter[
"term"] = $ti->getValue();
154 if ($this->glossary->supportsLongTextQuery()) {
156 $ti->setMaxLength(64);
158 $ti->setSubmitFormOnEnter(
true);
160 $ti->readFromSession();
161 $this->
filter[
"definition"] = $ti->getValue();
167 if (strpos($a_field,
"md_") === 0) {
168 $md_id = (
int) substr($a_field, 3);
176 protected function fillRow(array $a_set): void
179 $this->
ctrl->setParameter($this->parent_obj,
"term_id", $a_set[
"id"]);
181 if ($this->glossary->getPresentationMode() ==
"full_def") {
182 $this->tpl->setCurrentBlock(
"fd_td");
183 $this->tpl->setVariable(
185 $this->parent_obj->listDefinitions(
186 $this->request->getRefId(),
191 $this->tpl->parseCurrentBlock();
194 for ($j = 0, $jMax = count($defs); $j < $jMax; $j++) {
196 if (count($defs) > 1) {
197 if (!$this->offline) {
198 $this->
ctrl->setParameter($this->parent_obj,
"term_id", $a_set[
"id"]);
199 $def_href = $this->
ctrl->getLinkTarget($this->parent_obj,
"listDefinitions");
200 $this->
ctrl->clearParameters($this->parent_obj);
202 $def_href =
"term_" . $a_set[
"id"] .
".html";
204 $this->tpl->parseCurrentBlock();
206 $this->tpl->setCurrentBlock(
"definition");
207 $this->tpl->setVariable(
"DEF_TEXT", $this->
lng->txt(
"cont_definition") .
" " . ($j + 1));
208 $this->tpl->setVariable(
"HREF_DEF", $def_href .
"#ilPageTocDef" . ($j + 1));
209 $this->tpl->parseCurrentBlock();
213 $this->tpl->setCurrentBlock(
"definition");
214 if ($def[
"short_text_dirty"]) {
217 $def_obj->updateShortText();
218 $short_str = $def_obj->getShortText();
220 $short_str = $def[
"short_text"];
223 if (!$this->page_config->getPreventHTMLUnmasking()) {
224 $short_str = str_replace([
"<",
">"], [
"<",
">"], $short_str);
229 $ltexs = strrpos($short_str,
"[tex]");
230 $ltexe = strrpos($short_str,
"[/tex]");
231 if ($ltexs > $ltexe) {
234 $short_str = $page->getFirstParagraphText();
235 $short_str = strip_tags($short_str,
"<br>");
236 $ltexe = strpos($short_str,
"[/tex]", $ltexs);
240 if (!$this->offline) {
252 $this->tpl->setVariable(
"DEF_SHORT", $short_str);
253 $this->tpl->parseCurrentBlock();
255 $this->tpl->setCurrentBlock(
"definition_row");
256 $this->tpl->parseCurrentBlock();
259 $this->tpl->touchBlock(
"def_td");
263 if ($this->glossary->isVirtual()) {
264 $this->tpl->setCurrentBlock(
"glossary_row");
266 $this->tpl->setVariable(
"GLO_TITLE", $glo_title);
267 $this->tpl->parseCurrentBlock();
271 $this->
ctrl->clearParameters($this->parent_obj);
274 foreach ($this->adv_cols_order as
$c) {
276 $this->tpl->setCurrentBlock(
"link_start");
277 if (!$this->offline) {
278 $this->
ctrl->setParameter($this->parent_obj,
"term_id", $a_set[
"id"]);
279 $this->tpl->setVariable(
281 $this->
ctrl->getLinkTarget($this->parent_obj,
"listDefinitions")
284 $this->
ctrl->clearParameters($this->parent_obj);
286 $this->tpl->setVariable(
"LINK_VIEW_TERM",
"term_" . $a_set[
"id"] .
".html");
288 $this->tpl->parseCurrentBlock();
290 $this->tpl->setCurrentBlock(
"link_end");
291 $this->tpl->setVariable(
"ANCHOR_TERM",
"term_" . $a_set[
"id"]);
292 $this->tpl->parseCurrentBlock();
294 $this->tpl->setCurrentBlock(
"td");
295 $this->tpl->setVariable(
"TEXT", $a_set[
"term"]);
300 if (isset($a_set[
"md_" .
$id .
"_presentation"])) {
301 $pb = $a_set[
"md_" . $id .
"_presentation"]->getList();
307 $this->tpl->setCurrentBlock(
"td");
308 $this->tpl->setVariable(
"TEXT", $val);
310 $this->tpl->parseCurrentBlock();
__construct(object $a_parent_obj, string $a_parent_cmd, ilObjGlossary $a_glossary, bool $a_offline, int $a_tax_node, int $a_tax_id=0)
setFormAction(string $a_form_action, bool $a_multipart=false)
addFilterItem(ilTableFilterItem $a_input_item, bool $a_optional=false)
setEnableTitle(bool $a_enabletitle)
ILIAS Glossary Presentation PresentationGUIRequest $request
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.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
resetOffset(bool $a_in_determination=false)
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector.
static _lookupTitle(int $obj_id)
numericOrdering(string $a_field)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setFilterCommand(string $a_val, string $a_caption="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilAdvancedMDRecordGUI $record_gui
static getDefinitionList(int $a_term_id)
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.
__construct(Container $dic, ilPlugin $plugin)
static shortenTextExtended(string $a_str, int $a_len, bool $a_dots=false, bool $a_next_blank=false, bool $a_keep_extension=false)
setLimit(int $a_limit=0, int $a_default_limit=0)
setTableGUI(ilTable2GUI $a_val)
Set table for self::MODE_TABLE_FILTER.
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)
disable(string $a_module_name)
setEnableHeader(bool $a_enableheader)
ilPageConfig $page_config