19 declare(strict_types=1);
59 $this->
ctrl = $DIC->ctrl();
62 $this->ui_factory = $DIC->ui()->factory();
63 $this->filter_service = $DIC->uiService()->filter();
65 $this->irss = $DIC->resourceStorage();
66 $this->query = $DIC->http()->wrapper()->query();
68 $this->data_source->setOffsetAndLimit(
69 $this->
determinePage() * $this->view_definition->getItemsPerPage(),
70 $this->view_definition->getItemsPerPage()
82 $filters = $this->data_source->getFilterItems($this->ui_factory, $this->
language);
83 if ($filters !== []) {
84 $embedding_gui = $this->view_definition->getEmbeddingGui();
85 $this->
components[] = $filter = $this->filter_service->standard(
87 $this->
ctrl->getLinkTargetByClass($embedding_gui, $this->view_definition->getEmbeddingCmd()),
90 fn($filter):
bool =>
true,
96 $this->data_source->applyFilterValues($this->filter_service->getData($filter));
108 $this->
components[] = $this->ui_factory->table()->presentation(
113 $this->data_source->getResourceIdentifications()
116 $this->
components = array_merge($this->
components, $this->action_generator->getCollectedModals());
125 $resource = $this->irss->manage()->getResource($resource_identification);
128 $this->action_generator
130 return $resource_to_component->getAsRowMapping()($row, $resource_identification);
144 foreach (array_keys($this->data_source->getSortationsMapping()) as $sort_id) {
145 $sortations[$sort_id] = $this->
language->txt(
'sorting_' . $sort_id);
148 $view_controls[] = $this->ui_factory->viewControl()->sortation($sortations, (
string) $this->
determineSortation())
150 $this->
ctrl->getLinkTargetByClass(
151 $this->view_definition->getEmbeddingGui(),
152 $this->view_definition->getEmbeddingCmd()
158 $count = $this->data_source->getFilteredAmountOfItems();
159 if ($count > $this->view_definition->getItemsPerPage()) {
160 $view_controls[] = $this->ui_factory->viewControl()->pagination()
162 $this->
ctrl->getLinkTargetByClass(
163 $this->view_definition->getEmbeddingGui(),
164 $this->view_definition->getEmbeddingCmd()
169 ->withPageSize($this->view_definition->getItemsPerPage())
170 ->withTotalEntries($count)
171 ->withMaxPaginationButtons(5);
174 return $view_controls;
179 if ($this->query->has(
'cmdFilter')) {
183 return $this->query->has(self::P_PAGE)
184 ? $this->query->retrieve(self::P_PAGE, $this->
refinery->kindlyTo()->int())
190 return $this->query->has(self::P_SORTATION)
191 ? $this->query->retrieve(self::P_SORTATION, $this->
refinery->kindlyTo()->int())
198 $this->
ctrl->saveParameterByClass($this->view_definition->getEmbeddingGui(), self::P_SORTATION);
199 $this->
ctrl->saveParameterByClass($this->view_definition->getEmbeddingGui(), self::P_PAGE);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ResourceIdentification.
ilUIFilterService $filter_service
This describes a Row used in Presentation Table.
__construct(private ViewDefinition $view_definition, private TableDataSource $data_source, private ActionGenerator $action_generator=new NullActionGenerator())
ArrayBasedRequestWrapper $query
language()
description: > Example for rendring a language glyph.
Class ilChatroomConfigFileHandler .
Class ArrayBasedRequestWrapper.