◆ __construct()
| ilPresentationFullGUI::__construct |
( |
|
$parent_object, |
|
|
ilObjGlossary |
$glossary, |
|
|
bool |
$offline, |
|
|
int |
$tax_node = 0 |
|
) |
| |
Definition at line 47 of file class.ilPresentationFullGUI.php.
References $DIC, $glossary, $offline, $tax_node, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ILIAS\Repository\user().
55 $this->
ctrl = $DIC->ctrl();
56 $this->
user = $DIC->user();
57 $this->
lng = $DIC->language();
58 $this->tpl = $DIC->ui()->mainTemplate();
59 $this->tabs_gui = $DIC->tabs();
60 $this->nav_history = $DIC[
"ilNavigationHistory"];
61 $this->ui_fac = $DIC->ui()->factory();
62 $this->ui_ren = $DIC->ui()->renderer();
63 $this->parent_obj = $parent_object;
67 $this->request = $DIC->glossary()
72 $this->manager = $DIC->glossary()
75 ->presentation($this->glossary);
76 $this->filter_service = $DIC->uiService()->filter();
77 $this->content_style = $DIC->contentStyle();
◆ determinePageLength()
| ilPresentationFullGUI::determinePageLength |
( |
| ) |
|
|
protected |
Definition at line 93 of file class.ilPresentationFullGUI.php.
References ILIAS\Repository\int(), and ILIAS\Repository\user().
Referenced by initPanel().
95 if ($this->request->getPageLength() === -1) {
96 $page_length = (
int) $this->
user->getPref(
"hits_per_page") ?: 9999;
97 $this->manager->setSessionPageLength($page_length);
98 } elseif ($this->request->getPageLength() > 0) {
99 $page_length = $this->request->getPageLength();
100 $this->manager->setSessionPageLength($page_length);
101 } elseif ($this->manager->getSessionPageLength() > 0) {
102 $page_length = $this->manager->getSessionPageLength();
104 $page_length = (
int) $this->
user->getPref(
"hits_per_page") ?: 9999;
◆ executeCommand()
| ilPresentationFullGUI::executeCommand |
( |
| ) |
|
◆ initDropdown()
| ilPresentationFullGUI::initDropdown |
( |
int |
$page_length | ) |
|
|
protected |
Definition at line 224 of file class.ilPresentationFullGUI.php.
References ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ILIAS\Repository\user().
Referenced by initPanel().
224 : UI\Component\Dropdown\Dropdown
226 $hpp = ($this->
user->getPref(
"hits_per_page") != 9999)
227 ? $this->
user->getPref(
"hits_per_page")
228 : $this->
lng->txt(
"no_limit");
230 $terms_per_page_sel = [-1 => $this->
lng->txt(
"default") .
" (" . $hpp .
")", 5 =>
"5", 10 =>
"10",
231 15 =>
"15", 20 =>
"20", 30 =>
"30", 40 =>
"40", 50 =>
"50", 100 =>
"100"];
233 foreach ($terms_per_page_sel as $count => $count_text) {
234 $this->
ctrl->setParameter($this->parent_obj,
"page_length", $count);
235 $items[] = $this->ui_fac->button()->shy($count_text, $this->
ctrl->getLinkTarget($this,
"show"));
236 $this->
ctrl->setParameter($this->parent_obj,
"page_length",
"");
238 $dropdown = $this->ui_fac->dropdown()->standard($items)
239 ->withLabel($page_length .
" " . $this->
lng->txt(
"glo_terms_per_page"));
◆ initFilter()
| ilPresentationFullGUI::initFilter |
( |
| ) |
|
|
protected |
Definition at line 136 of file class.ilPresentationFullGUI.php.
References ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ilUtil\stripSlashes().
Referenced by show().
136 : UI\Component\Input\Container\Filter\Standard
138 $first_letters = $this->glossary->getFirstLetters($this->tax_node);
140 if (!empty($session_letter) && !in_array($session_letter, $first_letters)) {
141 $first_letters[$session_letter] = $session_letter;
144 $filter = $this->filter_service->standard(
145 self::class .
"_filter_" . $this->glossary->getRefId(),
146 $this->
ctrl->getLinkTarget($this,
"show"),
148 "letter" => $this->ui_fac->input()->field()->select(
149 $this->
lng->txt(
"glo_term_letter"),
152 "term" => $this->ui_fac->input()->field()->text($this->
lng->txt(
"cont_term")),
153 "definition" => $this->ui_fac->input()->field()->text($this->
lng->txt(
"cont_definition"))
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
◆ initPanel()
| ilPresentationFullGUI::initPanel |
( |
int |
$page_length = 0 | ) |
|
|
protected |
Definition at line 163 of file class.ilPresentationFullGUI.php.
References ILIAS\Repository\ctrl(), determinePageLength(), initDropdown(), ILIAS\Repository\int(), ILIAS\Repository\lng(), and ilPageObjectGUI\PRESENTATION.
Referenced by renderPanelForOffline(), and show().
163 : UI\Component\Panel\Panel
169 $terms = $this->glossary->getTermList(
170 $this->filter_data[
"term"] ??
"",
171 $this->filter_data[
"letter"] ??
"",
172 $this->filter_data[
"definition"] ??
"",
181 $terms_sliced = array_slice(
183 $this->request->getCurrentPage() * $page_length,
188 foreach ($terms_sliced as $term) {
189 $subs[] = $this->ui_fac->panel()->sub(
191 $this->ui_fac->legacy($this->parent_obj->listDefinitions(
192 $this->request->getRefId(),
202 $panel = $this->ui_fac->panel()->standard($this->
lng->txt(
"cont_terms"), $subs);
203 if (!$this->offline) {
204 $pagination = $this->ui_fac->viewControl()->pagination()
206 $this->
ctrl->getLinkTarget($this,
"show"),
209 ->withTotalEntries(count($terms))
210 ->withPageSize($page_length)
211 ->withMaxPaginationButtons(5)
212 ->withCurrentPage($this->request->getCurrentPage());
217 ->withViewControls([$pagination])
218 ->withActions($dropdown);
initDropdown(int $page_length)
◆ renderPanelForOffline()
| ilPresentationFullGUI::renderPanelForOffline |
( |
| ) |
|
◆ show()
| ilPresentationFullGUI::show |
( |
| ) |
|
Definition at line 110 of file class.ilPresentationFullGUI.php.
References ILIAS\Repository\ctrl(), initFilter(), and initPanel().
112 $this->
ctrl->setParameter($this,
"term_id",
"");
113 $this->tabs_gui->activateTab(
"terms");
115 $this->nav_history->addItem(
116 $this->glossary->getRefId(),
117 $this->
ctrl->getLinkTargetByClass(
"ilGlossaryPresentationGUI",
"listTerms"),
121 $this->content_style->gui()->addCss(
123 $this->glossary->getRefId()
127 $this->filter_data = $this->filter_service->getData($filter);
128 $this->manager->setSessionLetter($this->filter_data[
"letter"] ??
"");
132 $this->tpl->setContent($this->ui_ren->render([$filter, $panel]));
133 $this->tpl->setPermanentLink(
"glo", $this->glossary->getRefId());
initPanel(int $page_length=0)
◆ $content_style
| ILIAS Style Content Service ilPresentationFullGUI::$content_style |
|
protected |
◆ $ctrl
| ilCtrl ilPresentationFullGUI::$ctrl |
|
protected |
◆ $filter_data
| array ilPresentationFullGUI::$filter_data = null |
|
protected |
◆ $filter_service
◆ $glossary
◆ $lng
◆ $manager
◆ $nav_history
◆ $offline
| bool ilPresentationFullGUI::$offline = false |
|
protected |
◆ $parent_obj
| ilPresentationFullGUI::$parent_obj |
|
protected |
◆ $request
◆ $tabs_gui
◆ $tax_node
| int ilPresentationFullGUI::$tax_node = 0 |
|
protected |
◆ $tpl
◆ $ui_fac
| UI Factory ilPresentationFullGUI::$ui_fac |
|
protected |
◆ $ui_ren
| UI Renderer ilPresentationFullGUI::$ui_ren |
|
protected |
◆ $user
The documentation for this class was generated from the following file: