From e0f97552dd558ffdf112114d7637b5d8458c5008 Mon Sep 17 00:00:00 2001 From: Hoja Mustaffa Abdul Latheef Date: Thu, 9 Jan 2025 13:11:59 +0100 Subject: [PATCH] [TASK] Implemented getAllPageNumbers which returns all page numbers as array --- Classes/Pagination/CompanyPagination.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Classes/Pagination/CompanyPagination.php b/Classes/Pagination/CompanyPagination.php index f68a3c2..5f5b617 100644 --- a/Classes/Pagination/CompanyPagination.php +++ b/Classes/Pagination/CompanyPagination.php @@ -17,7 +17,7 @@ class CompanyPagination implements PaginationInterface { - protected string $pluginNamespace = 'tx_yellowpages2_directory'; + protected const PLUGIN_NAMESPACE = 'tx_yellowpages2_directory'; protected PaginatorInterface $paginator; @@ -26,7 +26,7 @@ class CompanyPagination implements PaginationInterface public function __construct(PaginatorInterface $paginator) { $this->paginator = $paginator; - foreach (RequestUtility::getMergedRequestArguments($this->pluginNamespace) as $argumentName => $argument) { + foreach (RequestUtility::getMergedRequestArguments(self::PLUGIN_NAMESPACE) as $argumentName => $argument) { if ($argumentName[0] === '_' && $argumentName[1] === '_') { continue; } @@ -123,6 +123,6 @@ public function getEndRecordNumber(): int public function getAllPageNumbers(): array { - // TODO: Implement getAllPageNumbers() method. + return range($this->getFirstPageNumber(), $this->getLastPageNumber()); } }