ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
class.ilBlockGUI.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
29 use ILIAS\UI\Component\Panel\Listing\Standard as StandardListingPanel;
31 use ILIAS\UI\Component\Panel\Secondary\Listing as SecondaryListingPanel;
32 use ILIAS\UI\Component\Panel\Secondary\Legacy as SecondaryLegacyPanel;
33 
39 abstract class ilBlockGUI
40 {
41  public const PRES_MAIN_LEG = 0; // main legacy panel
42  public const PRES_SEC_LEG = 1; // secondary legacy panel
43  public const PRES_SEC_LIST = 2; // secondary list panel
44  public const PRES_MAIN_LIST = 3; // main standard list panel
45  public const PRES_MAIN_TILE = 4; // main standard list panel
46  private int $offset = 0;
47  private int $limit;
48  private bool $enableedit;
49  private string $subtitle;
50  private int $refid;
51  private string $rowtemplatename;
52  private string $rowtemplatedir;
54  private array $modals = [];
56  private array $sort_options = [];
58  private array $presentations = [];
59  private string $activePresentation = '';
60  private string $activeSortOption = '';
61  private string $sort_target = '';
62  protected \ILIAS\UI\Renderer $renderer;
63  protected Factory $factory;
64  protected object $gui_object;
65  protected \ILIAS\Block\StandardGUIRequest $request;
66  protected \ILIAS\Block\BlockManager $block_manager;
67  private \ILIAS\HTTP\GlobalHttpState $http;
68 
69  protected bool $repositorymode = false;
70  protected \ILIAS\DI\UIServices $ui;
71  protected array $data = array();
72  protected bool $enablenuminfo = true;
73  protected array $footer_links = array();
74  protected string $block_id = "0";
75  protected bool $allow_moving = true;
76  protected array $move = array("left" => false, "right" => false, "up" => false, "down" => false);
77  protected array $block_commands = array();
78  protected int $max_count = 0;
79  protected bool $close_command = false;
80  protected bool $image = false;
81  protected array $property = [];
82  protected string $nav_value = "";
83  protected string $css_row = "";
84  protected string $title = "";
85  protected bool $admincommands = false;
86  protected array $dropdown;
87  protected ?ilTemplate $tpl;
89  protected ilObjUser $user;
90  protected ilCtrl $ctrl;
92  protected ilLanguage $lng;
94  protected int $presentation;
95  protected ?int $requested_ref_id;
96 
97  public function __construct()
98  {
99  global $DIC;
100  $this->factory = $DIC->ui()->factory();
101  $this->renderer = $DIC->ui()->renderer();
102 
103  $this->http = $DIC->http();
104  $block_service = new ILIAS\Block\Service($DIC);
105  $this->block_manager = $block_service->internal()
106  ->domain()
107  ->block();
108  $this->request = $block_service->internal()
109  ->gui()
110  ->standardRequest();
111 
112 
113  // default presentation
114  $this->presentation = self::PRES_SEC_LEG;
115 
116  $this->user = $DIC->user();
117  $this->ctrl = $DIC->ctrl();
118  $this->access = $DIC->access();
119  $this->lng = $DIC->language();
120  $this->main_tpl = $DIC["tpl"];
121  $this->obj_def = $DIC["objDefinition"];
122  $this->ui = $DIC->ui();
123 
125  $this->main_tpl->addJavaScript("./Services/Block/js/ilblockcallback.js");
126 
127  $this->setLimit((int) $this->user->getPref("hits_per_page"));
128 
129  $this->requested_ref_id = $this->request->getRefId();
130  }
131 
132  abstract public function getBlockType(): string;
133 
137  abstract protected function isRepositoryObject(): bool;
138 
139  protected function specialCharsAsEntities(string $string): string
140  {
141  // Should be replaced by a proper refinery transformation once https://github.com/ILIAS-eLearning/ILIAS/pull/6314 is merged
142  return htmlspecialchars(
143  $string,
144  ENT_QUOTES | ENT_SUBSTITUTE,
145  'utf-8'
146  );
147  }
148 
149  public function setData(array $a_data): void
150  {
151  $this->data = $a_data;
152  }
153 
154  public function getData(): array
155  {
156  return $this->data;
157  }
158 
159  public function setPresentation(int $type): void
160  {
161  $this->presentation = $type;
162  }
163 
164  public function getPresentation(): int
165  {
166  return $this->presentation;
167  }
168 
169  public function setBlockId(string $a_block_id = "0"): void
170  {
171  $this->block_id = $a_block_id;
172  }
173 
174  public function getBlockId(): string
175  {
176  return $this->block_id;
177  }
178 
184  public function setGuiObject(object $a_gui_object): void
185  {
186  $this->gui_object = $a_gui_object;
187  }
188 
189  public function getGuiObject(): object
190  {
191  return $this->gui_object;
192  }
193 
194  public function setTitle(string $a_title): void
195  {
196  $this->title = $a_title;
197  }
198 
199  public function getTitle(): string
200  {
201  return $this->title;
202  }
203 
204  public function setOffset(int $a_offset): void
205  {
206  // see https://github.com/ILIAS-eLearning/ILIAS/pull/6551/files
207  $this->max_count = count($this->getData());
208  if ($this->checkOffset($a_offset)) {
209  $this->offset = $a_offset;
210  } else {
211  throw new ilException("ilBlockGUI::setOffset(): Offset out of range.");
212  }
213  }
214 
215  public function getOffset(): int
216  {
217  return $this->offset;
218  }
219 
220  public function checkOffset(int $offset): bool
221  {
222  return $offset <= $this->max_count && $offset >= 0;
223  }
224 
225  public function setLimit(int $a_limit): void
226  {
227  $this->limit = $a_limit;
228  }
229 
230  public function getLimit(): int
231  {
232  return $this->limit;
233  }
234 
235  public function setEnableEdit(bool $a_enableedit): void
236  {
237  $this->enableedit = $a_enableedit;
238  }
239 
240  public function getEnableEdit(): bool
241  {
242  return $this->enableedit;
243  }
244 
245  public function setRepositoryMode(bool $a_repositorymode): void
246  {
247  $this->repositorymode = $a_repositorymode;
248  }
249 
250  public function getRepositoryMode(): bool
251  {
252  return $this->repositorymode;
253  }
254 
255  public function setSubtitle(string $a_subtitle): void
256  {
257  $this->subtitle = $a_subtitle;
258  }
259 
260  public function getSubtitle(): string
261  {
262  return $this->subtitle;
263  }
264 
268  public function setRefId(int $a_refid): void
269  {
270  $this->refid = $a_refid;
271  }
272 
273  public function getRefId(): int
274  {
275  return $this->refid;
276  }
277 
278  public function setAdminCommands(bool $a_admincommands): void
279  {
280  $this->admincommands = $a_admincommands;
281  }
282 
283  public function getAdminCommands(): bool
284  {
285  return $this->admincommands;
286  }
287 
288  public function setEnableNumInfo(bool $a_enablenuminfo): void
289  {
290  $this->enablenuminfo = $a_enablenuminfo;
291  }
292 
293  public function getEnableNumInfo(): bool
294  {
295  return $this->enablenuminfo;
296  }
297 
302  public function setProperties(array $a_properties): void
303  {
304  $this->property = $a_properties;
305  }
306 
307  public function getProperty(string $a_property): ?string
308  {
309  return $this->property[$a_property] ?? null;
310  }
311 
312  public function setProperty(string $a_property, string $a_value): void
313  {
314  $this->property[$a_property] = $a_value;
315  }
316 
320  public function setRowTemplate(
321  string $a_rowtemplatename,
322  string $a_rowtemplatedir = ""
323  ): void {
324  $this->rowtemplatename = $a_rowtemplatename;
325  $this->rowtemplatedir = $a_rowtemplatedir;
326  }
327 
328  final public function getNavParameter(): string
329  {
330  return $this->getBlockType() . "_" . $this->getBlockId() . "_blnav";
331  }
332 
333  final public function getConfigParameter(): string
334  {
335  return $this->getBlockType() . "_" . $this->getBlockId() . "_blconf";
336  }
337 
338  final public function getMoveParameter(): string
339  {
340  return $this->getBlockType() . "_" . $this->getBlockId() . "_blmove";
341  }
342 
343  public function getRowTemplateName(): string
344  {
345  return $this->rowtemplatename;
346  }
347 
348  public function getRowTemplateDir(): string
349  {
350  return $this->rowtemplatedir;
351  }
352 
353  public function addBlockCommand(string $a_href, string $a_text, string $a_onclick = "", RoundTrip $modal = null): void
354  {
355  $this->block_commands[] = [
356  "href" => $a_href,
357  "text" => $a_text,
358  "onclick" => $a_onclick,
359  "modal" => $modal
360  ];
361  }
362 
363  public function getBlockCommands(): array
364  {
365  return $this->block_commands;
366  }
367 
368  public static function getScreenMode(): string
369  {
370  return IL_SCREEN_SIDE;
371  }
372 
373  protected function initCommands(): void
374  {
375  }
376 
377  public function getHTML(): string
378  {
379  $this->initCommands();
380 
381  $access = $this->access;
382  $panel = null;
383 
384  $ctrl = $this->ctrl;
385 
386  if ($this->isRepositoryObject()) {
387  if (!$access->checkAccess("read", "", $this->getRefId())) {
388  return "";
389  }
390  }
391 
392  $this->addRepoCommands();
393 
394  switch ($this->getPresentation()) {
395  case self::PRES_SEC_LEG:
396  $panel = $this->factory->panel()->secondary()->legacy(
397  $this->specialCharsAsEntities($this->getTitle()),
398  $this->factory->legacy($this->getLegacyContent())
399  );
400  break;
401 
402  case self::PRES_MAIN_LEG:
403  $panel = $this->factory->panel()->standard(
404  $this->specialCharsAsEntities($this->getTitle()),
405  $this->factory->legacy($this->getLegacyContent())
406  );
407  break;
408 
409  case self::PRES_SEC_LIST:
410  $this->handleNavigation();
411  $panel = $this->factory->panel()->secondary()->listing(
412  $this->specialCharsAsEntities($this->getTitle()),
413  $this->getListItemGroups()
414  );
415  break;
416 
417  case self::PRES_MAIN_TILE:
418  case self::PRES_MAIN_LIST:
419  $this->handleNavigation();
420  $panel = $this->factory->panel()->listing()->standard(
421  $this->specialCharsAsEntities($this->getTitle()),
422  $this->getListItemGroups()
423  );
424  break;
425  }
426 
427  // check for empty list panel
428  if (in_array($this->getPresentation(), [self::PRES_SEC_LIST, self::PRES_MAIN_LIST], true) &&
429  ($panel->getItemGroups() === [] || (count($panel->getItemGroups()) === 1 && $panel->getItemGroups()[0]->getItems() === []))) {
430  if ($this->getPresentation() === self::PRES_SEC_LIST) {
431  $panel = $this->factory->panel()->secondary()->legacy(
432  $this->specialCharsAsEntities($this->getTitle()),
433  $this->factory->legacy($this->getNoItemFoundContent())
434  );
435  } else {
436  $panel = $this->factory->panel()->standard(
437  $this->specialCharsAsEntities($this->getTitle()),
438  $this->factory->legacy($this->getNoItemFoundContent())
439  );
440  }
441  }
442 
443  $actions = $this->getActionsForPanel();
444  if ($actions !== null) {
445  $panel = $panel->withActions($actions);
446  }
447  $viewControls = $this->getViewControlsForPanel();
448  if ($viewControls !== [] &&
449  (
450  $panel instanceof StandardPanel ||
451  $panel instanceof SecondaryListingPanel ||
452  $panel instanceof SecondaryLegacyPanel ||
453  $panel instanceof StandardListingPanel
454  )
455  ) {
456  $panel = $panel->withViewControls($viewControls);
457  }
458 
459  if ($ctrl->isAsynch()) {
460  $html = $this->renderer->renderAsync([$panel, ...$this->modals]);
461  } else {
462  $html = $this->renderer->render([$panel, ...$this->modals]);
463  }
464 
465 
466  if ($ctrl->isAsynch()) {
467  $this->send($html);
468  } else {
469  // return incl. wrapping div with id
470  $html = '<div id="' . 'block_' . $this->getBlockType() . '_' . $this->block_id . '">' .
471  $html . '</div>';
472  }
473 
474  return $html;
475  }
476 
481  protected function preloadData(array $data): void
482  {
483  }
484 
489  public function getAsynch(): string
490  {
491  header("Content-type: text/html; charset=UTF-8");
492  return $this->tpl->get();
493  }
494 
495 
501  protected function getLegacyContent(): string
502  {
503  return "";
504  }
505 
512  protected function getListItemForData(array $data): ?\ILIAS\UI\Component\Item\Item
513  {
514  return null;
515  }
516 
517 
521  protected function handleNavigation(): void
522  {
523  $reg_page = $this->request->getNavPage($this->getNavParameter());
524  if ($reg_page !== "") {
525  $this->nav_value = "::" . ($reg_page * $this->getLimit());
526  }
527 
528  if ($this->nav_value == "") {
529  $this->nav_value = $this->block_manager->getNavPar($this->getNavParameter());
530  }
531 
532  $this->block_manager->setNavPar(
533  $this->getNavParameter(),
534  $this->nav_value
535  );
536 
537  $nav = explode(":", $this->nav_value);
538  if (isset($nav[2])) {
539  $this->setOffset((int) $nav[2]);
540  } else {
541  $this->setOffset(0);
542  }
543  }
544 
549  protected function loadData(): array
550  {
551  $data = $this->getData();
552  $this->max_count = count($data);
553  $data = array_slice($data, $this->getOffset(), $this->getLimit(), true);
554  $this->preloadData($data);
555  return $data;
556  }
557 
558 
564  protected function getListItemGroups(): array
565  {
566  global $DIC;
567  $factory = $DIC->ui()->factory();
568 
569  $data = $this->loadData();
570 
571  $items = [];
572 
573  foreach ($data as $record) {
574  $item = $this->getListItemForData($record);
575  if ($item !== null) {
576  $items[] = $item;
577  }
578  }
579 
580  $item_group = $factory->item()->group("", $items);
581 
582  return [$item_group];
583  }
584 
589  {
590  global $DIC;
591  $factory = $DIC->ui()->factory();
592 
593  $ilCtrl = $this->ctrl;
594 
595  if ($this->max_count <= $this->getLimit()) {
596  return null;
597  }
598 
599 
600  // $ilCtrl->setParameterByClass("ilcolumngui",
601  // $this->getNavParameter(), "::" . $prevoffset);
602 
603  // ajax link
604  $ilCtrl->setParameterByClass(
605  "ilcolumngui",
606  "block_id",
607  "block_" . $this->getBlockType() . "_" . $this->block_id
608  );
609  $block_id = "block_" . $this->getBlockType() . "_" . $this->block_id;
610  $onclick = $ilCtrl->getLinkTargetByClass(
611  "ilcolumngui",
612  "updateBlock",
613  "",
614  true
615  );
616  $ilCtrl->setParameterByClass(
617  "ilcolumngui",
618  "block_id",
619  ""
620  );
621 
622  // normal link
623  $href = $ilCtrl->getLinkTargetByClass("ilcolumngui", "", "", false, false);
624 
625  //$ilCtrl->setParameterByClass("ilcolumngui",
626  // $this->getNavParameter(), "");
627 
628  return $factory->viewControl()->pagination()
629  ->withTargetURL($href, $this->getNavParameter() . "page")
630  ->withTotalEntries($this->max_count)
631  ->withPageSize($this->getLimit())
632  ->withMaxPaginationButtons(1)
633  ->withCurrentPage($this->getOffset() / $this->getLimit());
634  }
635 
639  protected function addRepoCommands(): void
640  {
641  $access = $this->access;
642  $lng = $this->lng;
643  $ctrl = $this->ctrl;
644  $obj_def = $this->obj_def;
645 
646  if ($this->getRepositoryMode() && $this->isRepositoryObject()) {
647  // #10993
648  // @todo: fix this in new presentation somehow
649  /*
650  if ($this->getAdminCommands()) {
651  $this->tpl->setCurrentBlock("block_check");
652  $this->tpl->setVariable("BL_REF_ID", $this->getRefId());
653  $this->tpl->parseCurrentBlock();
654  }*/
655 
656  if ($access->checkAccess("delete", "", $this->getRefId())) {
657  $this->addBlockCommand(
658  "ilias.php?baseClass=ilRepositoryGUI&ref_id=" . $this->requested_ref_id . "&cmd=delete" .
659  "&item_ref_id=" . $this->getRefId(),
660  $lng->txt("delete")
661  );
662 
663  $this->addBlockCommand(
664  "ilias.php?baseClass=ilRepositoryGUI&ref_id=" . $this->requested_ref_id . "&cmd=link" .
665  "&item_ref_id=" . $this->getRefId(),
666  $lng->txt("link")
667  );
668 
669  // see ilObjectListGUI::insertCutCommand();
670  $this->addBlockCommand(
671  "ilias.php?baseClass=ilRepositoryGUI&ref_id=" . $this->requested_ref_id . "&cmd=cut" .
672  "&item_ref_id=" . $this->getRefId(),
673  $lng->txt("move")
674  );
675  }
676 
677  // #14595 - see ilObjectListGUI::insertCopyCommand()
678  if ($access->checkAccess("copy", "", $this->getRefId())) {
679  $parent_type = ilObject::_lookupType($this->requested_ref_id, true);
680  $parent_gui = "ilObj" . $obj_def->getClassName($parent_type) . "GUI";
681 
682  $ctrl->setParameterByClass("ilobjectcopygui", "source_id", $this->getRefId());
683  $copy_cmd = $ctrl->getLinkTargetByClass(
684  array("ilrepositorygui", $parent_gui, "ilobjectcopygui"),
685  "initTargetSelection"
686  );
687 
688  // see ilObjectListGUI::insertCopyCommand();
689  $this->addBlockCommand(
690  $copy_cmd,
691  $lng->txt("copy")
692  );
693  }
694  }
695  }
696 
697  protected function getActionsForPanel(): ?Dropdown
698  {
699  // actions
700  $actions = [];
701  $modals = [];
702 
703  foreach ($this->getBlockCommands() as $command) {
704  $href = ($command['onclick'] !== '')
705  ? ''
706  : $command['href'];
707  $button = $this->factory->button()->shy($command['text'], $href);
708  if ($command['onclick']) {
709  $button = $button->withOnLoadCode(function ($id) use ($command) {
710  return
711  "$(\"#$id\").click(function() { ilBlockJSHandler('" . "block_" . $this->getBlockType() . "_" . $this->block_id .
712  "','" . $command["onclick"] . "');});";
713  });
714  }
715 
716  if (isset($command['modal']) && $command['modal'] instanceof Modal) {
717  $button = $button->withOnClick($command['modal']->getShowSignal());
718  $this->modals[] = $command['modal'];
719  }
720  $actions[] = $button;
721  }
722 
723  if (count($actions) > 0) {
724  $actions = $this->factory->dropdown()->standard($actions)
725  ->withAriaLabel(sprintf(
726  $this->lng->txt('actions_for'),
727  $this->specialCharsAsEntities($this->getTitle())
728  ));
729  return $actions;
730  }
731  return null;
732  }
733 
735  public function getViewControlsForPanel(): array
736  {
737  $viewControls = [];
738  if (count($this->presentations) > 1) {
739  $presentation = $this->factory->viewControl()->mode(
740  $this->presentations,
741  'label'
742  )->withActive($this->activePresentation);
743  $viewControls[] = $presentation;
744  }
745 
746  if ($this->sort_options !== []) {
747  $sortation = $this->factory->viewControl()->sortation(
748  $this->sort_options
749  )->withTargetURL(
750  $this->sort_target,
751  'sorting'
752  )->withLabel(
753  $this->activeSortOption
754  );
755  $viewControls[] = $sortation;
756  }
757 
758 
759  if ($this->getPresentation() === self::PRES_SEC_LIST) {
760  $pg_view_control = $this->getPaginationViewControl();
761  if ($pg_view_control !== null) {
762  $viewControls[] = $pg_view_control;
763  }
764  }
765  return $viewControls;
766  }
767 
768  public function sortObject(): string
769  {
770  return $this->getHTML();
771  }
772 
773  public function addSortOption(string $option, string $label, bool $active): void
774  {
775  if ($active) {
776  $this->activeSortOption = $label;
777  } else {
778  $this->sort_options[$option] = $label;
779  }
780  }
781 
782  public function setSortTarget(string $target): void
783  {
784  $this->sort_target = $target;
785  }
786 
787  public function addPresentation(string $label, string $target, bool $active): void
788  {
789  $this->presentations[$label] = $target;
790  if ($active) {
791  $this->activePresentation = $label;
792  }
793  }
794 
799  protected function send(string $output): void
800  {
801  $this->http->saveResponse($this->http->response()->withBody(
802  Streams::ofString($output)
803  ));
804  $this->http->sendResponse();
805  $this->http->close();
806  }
807 
808  public function getNoItemFoundContent(): string
809  {
810  return $this->lng->txt("no_items");
811  }
812 }
This describes commonalities between the different modals.
Definition: Modal.php:34
ILIAS Block BlockManager $block_manager
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilObjUser $user
ILIAS DI UIServices $ui
getLinkTargetByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
ilObjectDefinition $obj_def
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...
addPresentation(string $label, string $target, bool $active)
setProperties(array $a_properties)
This function is supposed to be used for block type specific properties, that should be inherited thr...
array $block_commands
ilLanguage $lng
setLimit(int $a_limit)
setBlockId(string $a_block_id="0")
handleNavigation()
Handle navigation.
string $rowtemplatename
send(string $output)
Send.
Class ChatMainBarProvider .
addRepoCommands()
Add repo commands.
setEnableNumInfo(bool $a_enablenuminfo)
Factory $factory
array $presentations
checkAccess(string $a_permission, string $a_cmd, int $a_ref_id, string $a_type="", ?int $a_obj_id=null, ?int $a_tree_id=null)
check access for an object (provide $a_type and $a_obj_id if available for better performance) ...
setEnableEdit(bool $a_enableedit)
checkOffset(int $offset)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const PRES_MAIN_LIST
const PRES_MAIN_TILE
setSortTarget(string $target)
setParameterByClass(string $a_class, string $a_parameter, $a_value)
specialCharsAsEntities(string $string)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Factory.php:21
getLegacyContent()
Get legacy content.
setProperty(string $a_property, string $a_value)
This describes a Pagination Control.
Definition: Pagination.php:32
This describes commonalities between all types of Dropdowns.
Definition: Dropdown.php:34
global $DIC
Definition: feed.php:28
ILIAS Block StandardGUIRequest $request
setRowTemplate(string $a_rowtemplatename, string $a_rowtemplatedir="")
Set Row Template Name.
parses the objects.xml it handles the xml-description of all ilias objects
object $gui_object
string $activeSortOption
ilGlobalTemplateInterface $main_tpl
static http()
Fetches the global http state from ILIAS.
string $rowtemplatedir
setOffset(int $a_offset)
ilTemplate $tpl
preloadData(array $data)
Can be overwritten in subclasses.
static getScreenMode()
getListItemForData(array $data)
Get list item for data array.
setAdminCommands(bool $a_admincommands)
getListItemGroups()
Get items.
getPaginationViewControl()
Fill previous/next row.
getClassName(string $obj_name)
getAsynch()
Use this for final get before sending asynchronous output (ajax) per echo to output.
setRefId(int $a_refid)
Set Ref Id (only used if isRepositoryObject() is true).
addBlockCommand(string $a_href, string $a_text, string $a_onclick="", RoundTrip $modal=null)
setGuiObject(object $a_gui_object)
Set GuiObject.
ILIAS HTTP GlobalHttpState $http
string $sort_target
loadData()
Load data for current page.
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
setTitle(string $a_title)
setSubtitle(string $a_subtitle)
isRepositoryObject()
Returns whether block has a corresponding repository object.
string $activePresentation
This class represents a block method of a block.
setData(array $a_data)
ilAccessHandler $access
This describes a Standard Dropdown.
Definition: Standard.php:26
ILIAS UI Renderer $renderer
setRepositoryMode(bool $a_repositorymode)
static _lookupType(int $id, bool $reference=false)
addSortOption(string $option, string $label, bool $active)
const IL_SCREEN_SIDE
getProperty(string $a_property)
static initConnection(?ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI Connection module.
setPresentation(int $type)
pagination()
description: purpose: > Pagination allows structured data being displayed in chunks by limiting the ...