• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

aplus-framework / pagination / 8127679472

16 Jan 2024 08:39PM UTC coverage: 100.0%. Remained the same
8127679472

push

github

natanfelles
Merge branch 'new' into development

589 of 589 relevant lines covered (100.0%)

6.3 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/src/Views/foundation.php
1
<?php
2
/*
3
 * This file is part of Aplus Framework Pagination Library.
4
 *
5
 * (c) Natan Felles <natanfelles@gmail.com>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
/**
11
 * @var Framework\Pagination\Pager $pager
12
 */
13
$language = $pager->getLanguage();
1✔
14
?>
15
<ul class="pagination text-center">
1✔
16
    <?php if ($pager->getCurrentPage() - $pager->getSurround() > 1) : ?>
1✔
17
        <li>
1✔
18
            <a href="<?= $pager->getFirstPageUrl() ?>"><?= $pager->getLanguage()
1✔
19
        ->render('pagination', 'first') ?></a>
1✔
20
        </li>
21
    <?php endif ?>
22

23
    <?php if ($pager->getPreviousPage()) : ?>
1✔
24
        <li>
1✔
25
            <a href="<?= $pager->getPreviousPageUrl() ?>" rel="prev" title="<?=
1✔
26
            $language->render('pagination', 'previous') ?>">&laquo;</a>
1✔
27
        </li>
28
    <?php endif ?>
29

30
    <?php foreach ($pager->getPreviousPagesUrls() as $p => $url) : ?>
1✔
31
        <li>
1✔
32
            <a href="<?= $url ?>"><?= $p ?></a>
1✔
33
        </li>
34
    <?php endforeach ?>
35

36
    <li class="current">
1✔
37
        <?= $pager->getCurrentPage() ?>
1✔
38
    </li>
1✔
39

40
    <?php foreach ($pager->getNextPagesUrls() as $p => $url) : ?>
1✔
41
        <li>
1✔
42
            <a href="<?= $url ?>"><?= $p ?></a>
1✔
43
        </li>
44
    <?php endforeach ?>
45

46
    <?php if ($pager->getNextPage() && $pager->getNextPage() < $pager->getLastPage() + 1) : ?>
1✔
47
        <li>
1✔
48
            <a href="<?= $pager->getNextPageUrl() ?>" rel="next" title="<?=
1✔
49
            $language->render('pagination', 'next') ?>">&raquo;</a>
1✔
50
        </li>
51
    <?php endif ?>
52

53
    <?php if ($pager->getLastPage()
1✔
54
        && $pager->getCurrentPage() + $pager->getSurround() < $pager->getLastPage()
1✔
55
    ) : ?>
56
        <li>
1✔
57
            <a href="<?= $pager->getLastPageUrl() ?>"><?= $pager->getLanguage()
1✔
58
        ->render('pagination', 'last') ?></a>
1✔
59
        </li>
60
    <?php endif ?>
61
</ul>
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc