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();
74 foreach ($this->adv_cols_order as
$c) {
78 $this->
addColumn($c[
"text"],
"md_" . $c[
"id"]);
84 if ($this->glossary->isVirtual()) {
89 if (!$this->offline) {
94 $this->
setRowTemplate(
"tpl.term_tbl_pres_row.html",
"Modules/Glossary");
97 if (!$this->offline) {
108 $this->glossary->getId(),
112 $this->record_gui->parse();
115 $this->
setData($this->glossary->getTermList(
116 $this->filter[
"term"] ??
"",
117 $this->request->getLetter(),
118 $this->
filter[
"definition"] ??
"",
122 $this->record_gui->getFilterElements(),
126 if ($this->offline) {
142 $ti->setMaxLength(64);
144 $ti->setSubmitFormOnEnter(
true);
146 $ti->readFromSession();
147 $this->
filter[
"term"] = $ti->getValue();
150 if ($this->glossary->supportsLongTextQuery()) {
152 $ti->setMaxLength(64);
154 $ti->setSubmitFormOnEnter(
true);
156 $ti->readFromSession();
157 $this->
filter[
"definition"] = $ti->getValue();
163 if (strpos($a_field,
"md_") === 0) {
164 $md_id = (
int) substr($a_field, 3);
172 protected function fillRow(array $a_set): void
174 $term_id = $a_set[
"id"];
175 $this->
ctrl->setParameter($this->parent_obj,
"term_id", $term_id);
178 $this->tpl->setCurrentBlock(
"definition");
182 $term_obj->updateShortText();
183 $short_str = $term_obj->getShortText();
188 if (!$this->page_config->getPreventHTMLUnmasking()) {
189 $short_str = str_replace([
"<",
">"], [
"<",
">"], $short_str);
194 $ltexs = strrpos($short_str,
"[tex]");
195 $ltexe = strrpos($short_str,
"[/tex]");
196 if ($ltexs > $ltexe) {
199 $short_str = $page->getFirstParagraphText();
200 $short_str = strip_tags($short_str,
"<br>");
201 $ltexe = strpos($short_str,
"[/tex]", $ltexs);
205 if (!$this->offline) {
217 $this->tpl->setVariable(
"DEF_SHORT", $short_str);
218 $this->tpl->parseCurrentBlock();
220 $this->tpl->setCurrentBlock(
"definition_row");
221 $this->tpl->parseCurrentBlock();
224 if ($this->glossary->isVirtual()) {
225 $this->tpl->setCurrentBlock(
"glossary_row");
227 $this->tpl->setVariable(
"GLO_TITLE", $glo_title);
228 $this->tpl->parseCurrentBlock();
231 $this->
ctrl->clearParameters($this->parent_obj);
234 foreach ($this->adv_cols_order as
$c) {
236 $this->tpl->setCurrentBlock(
"link_start");
237 if (!$this->offline) {
238 $this->
ctrl->setParameter($this->parent_obj,
"term_id", $term_id);
239 $this->tpl->setVariable(
241 $this->
ctrl->getLinkTarget($this->parent_obj,
"listDefinitions")
244 $this->
ctrl->clearParameters($this->parent_obj);
246 $this->tpl->setVariable(
"LINK_VIEW_TERM",
"term_" . $term_id .
".html");
248 $this->tpl->parseCurrentBlock();
250 $this->tpl->setCurrentBlock(
"link_end");
251 $this->tpl->setVariable(
"ANCHOR_TERM",
"term_" . $term_id);
252 $this->tpl->parseCurrentBlock();
254 $this->tpl->setCurrentBlock(
"td");
255 $this->tpl->setVariable(
"TEXT", $a_set[
"term"]);
260 if (isset($a_set[
"md_" .
$id .
"_presentation"])) {
261 $pb = $a_set[
"md_" . $id .
"_presentation"]->getList();
267 $this->tpl->setCurrentBlock(
"td");
268 $this->tpl->setVariable(
"TEXT", $val);
270 $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...
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
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="")
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...
ilAdvancedMDRecordGUI $record_gui
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)
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)
filter(string $filter_id, $class_path, string $cmd, bool $activated=true, bool $expanded=true)
setEnableHeader(bool $a_enableheader)
ilPageConfig $page_config