Skip to content

Commit

Permalink
Pagination feature refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Vahram1995 committed Sep 10, 2024
1 parent 189fd9e commit 7201be7
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions src/Libraries/Database/BasePaginator.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Quantum\Libraries\Database;

class BasePaginator implements PaginatorInterface
abstract class BasePaginator implements PaginatorInterface
{
/**
* @var string
Expand Down Expand Up @@ -292,27 +292,12 @@ protected function getPreviousPageItem(?string $previousPageLink): string
return $link;
}

protected function getItemsLinks($pagination, $startPage, $endPage, $currentPage, array $links, bool $withBaseUrl = false)
protected function getItemsLinks($pagination, $startPage, $endPage, $currentPage, array $links)
{
for ($i = $startPage; $i <= $endPage; $i++) {
$active = $i == $currentPage ? 'class="'. self::PAGINATION_CLASS_ACTIVE .'"' : '';
$pagination .= '<li ' . $active . '><a href="' . $links[$i - 1] . '">' . $i . '</a></li>';
}
return $pagination;
}

public function firstItem()
{
// TODO: Implement firstItem() method.
}

public function lastItem()
{
// TODO: Implement lastItem() method.
}

public function data()
{
// TODO: Implement data() method.
}
}

0 comments on commit 7201be7

Please sign in to comment.