@@ -42,7 +42,7 @@ abstract class AbstractListView
4242 private bool $ allowFiltering = true ;
4343 private bool $ allowSorting = true ;
4444 private bool $ allowInteractions = true ;
45- private int $ maxItems = 0 ;
45+ private int $ fixedNumberOfItems = 0 ;
4646
4747 /**
4848 * @var array<string, string>
@@ -86,19 +86,19 @@ public function setItemsPerPage(int $itemsPerPage): void
8686 }
8787
8888 /**
89- * Gets the maximum number of items shown.
89+ * Gets the fixed number of items shown.
9090 */
91- public function getMaxItems (): int
91+ public function getFixedNumberOfItems (): int
9292 {
93- return $ this ->maxItems ;
93+ return $ this ->fixedNumberOfItems ;
9494 }
9595
9696 /**
9797 * Sets the maximum number of items shown.
9898 */
99- public function setMaxItems (int $ maxItems ): void
99+ public function setFixedNumberOfItems (int $ fixedNumberOfItems ): void
100100 {
101- $ this ->maxItems = $ maxItems ;
101+ $ this ->fixedNumberOfItems = $ fixedNumberOfItems ;
102102 }
103103
104104 /**
@@ -199,8 +199,8 @@ public function getBaseUrl(): string
199199 protected function initObjectList (): void
200200 {
201201 $ this ->objectList = $ this ->createObjectList ();
202- $ this ->objectList ->sqlLimit = $ this ->getMaxItems () ?: $ this ->getItemsPerPage ();
203- if (!$ this ->getMaxItems ()) {
202+ $ this ->objectList ->sqlLimit = $ this ->getFixedNumberOfItems () ?: $ this ->getItemsPerPage ();
203+ if (!$ this ->getFixedNumberOfItems ()) {
204204 $ this ->objectList ->sqlOffset = ($ this ->getPageNo () - 1 ) * $ this ->getItemsPerPage ();
205205 }
206206 if ($ this ->getSortField ()) {
@@ -262,8 +262,8 @@ public function countItems(): int
262262 {
263263 if (!isset ($ this ->objectCount )) {
264264 $ this ->objectCount = $ this ->getObjectList ()->countObjects ();
265- if ($ this ->getMaxItems () && $ this ->getMaxItems () < $ this ->objectCount ) {
266- $ this ->objectCount = $ this ->getMaxItems ();
265+ if ($ this ->getFixedNumberOfItems () && $ this ->getFixedNumberOfItems () < $ this ->objectCount ) {
266+ $ this ->objectCount = $ this ->getFixedNumberOfItems ();
267267 }
268268 }
269269
0 commit comments