ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
BaseTableDataSource.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
29 
33 abstract class BaseTableDataSource implements TableDataSource
34 {
35  protected \ilDBInterface $db;
36  protected Services $irss;
38  protected Sorter $sorter;
39  protected int $filtered_amount_of_items = 0;
40  protected int $offset = 0;
41  protected int $limit = 50;
43  protected ?array $filter_values = null;
44 
45  public function __construct(
47  ) {
48  global $DIC;
49  $this->db = $DIC->database();
50  $this->irss = $DIC->resourceStorage();
51  $this->collection = $this->irss->collection()->get(
52  $rcid
53  );
54  $this->sorter = $this->irss->collection()->sort($this->collection);
55  }
56 
57 
58  public function setOffsetAndLimit(int $offset, int $limit): void
59  {
60  $this->offset = $offset;
61  $this->limit = $limit;
62  }
63 
64  public function setSortDirection(int $sort_direction): void
65  {
66  $this->sort_direction = $sort_direction;
67  }
68 
69 
70  public function getFilteredAmountOfItems(): int
71  {
73  }
74 
75 
76  public function getResourceIdentifications(): array
77  {
78  return $this->collection->getResourceIdentifications();
79  }
80 
81  public function getFilterItems(
82  Factory $ui_factory,
84  ): array {
85  return [];
86  }
87 
88  public function applyFilterValues(?array $filter_values): void
89  {
90  $this->filter_values = $filter_values;
91  }
92 }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This is how the factory for UI elements looks.
Definition: Factory.php:37
global $DIC
Definition: shib_login.php:26
global $lng
Definition: privfeed.php:31