File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ $pagination = new \yidas\data\Pagination([
157157 'totalCount' => $count,
158158 'pergpage' => 10,
159159]);
160- $pagination->offst
160+ // ...use $pagination offset/limit info for your query
161161```
162162
163163For more parameters, you could refer to [ API Documentation] ( #api-documentation ) .
@@ -393,7 +393,7 @@ API DOCUMENTATION
393393| :-- | :-- | :-- |
394394| $limit | integer| The limit of the data|
395395| $offset | integer| The offset of the data|
396- | $page | integer| The zero-based current page number |
396+ | $page | integer| The current page number ( zero-based). The default value is 1, meaning the first page. |
397397| $pageCount | integer| Number of pages|
398398| $pageParam | string | Name of the parameter storing the current page index, default value is ` page ` |
399399| $perPage | integer| The number of items per page, default value is 20|
Original file line number Diff line number Diff line change 88 * Pagination
99 *
1010 * @author Nick Tsai <myintaer@gmail.com>
11- * @version 1.0.0
11+ * @version 1.0.4
1212 */
1313class Pagination
1414{
@@ -27,7 +27,7 @@ class Pagination
2727 public $ offset ;
2828
2929 /**
30- * The zero-based current page number
30+ * The current page number ( zero-based). The default value is 1, meaning the first page.
3131 *
3232 * @var integer
3333 */
Original file line number Diff line number Diff line change 33 <?php if ($ this ->firstPageLabel ):?>
44 <li class="<?= $ this ->pageCssClass ?> <?= $ this ->firstPageCssClass ?> <?php if ($ isFirst ):?> disabled<?php endif ?> ">
55 <?php if ($ isFirst ):?>
6- <span><?= $ this ->firstPageLabel ?> </span>
6+ <span <?= $ linkAttributes ?> ><?= $ this ->firstPageLabel ?> </span>
77 <?php else : ?>
88 <a <?= $ linkAttributes?> href="<?= $ this ->pagination ->createUrl (1 );?> "><?= $ this ->firstPageLabel ?> </a>
99 <?php endif ?>
1010 </li>
1111 <?php endif ?>
1212 <li class="<?= $ this ->pageCssClass ?> <?= $ this ->prevPageCssClass ?> <?php if ($ isFirst ):?> disabled<?php endif ?> ">
1313 <?php if ($ isFirst ):?>
14- <span><?= $ this ->prevPageLabel ?> </span>
14+ <span <?= $ linkAttributes ?> ><?= $ this ->prevPageLabel ?> </span>
1515 <?php else : ?>
1616 <a <?= $ linkAttributes?> href="<?= $ this ->pagination ->createUrl ($ page -1 );?> "><?= $ this ->prevPageLabel ?> </a>
1717 <?php endif ?>
2323 <?php endforeach ?>
2424 <li class="<?= $ this ->pageCssClass ?> <?= $ this ->nextPageCssClass ?> <?php if ($ isLast ):?> disabled<?php endif ?> ">
2525 <?php if ($ isLast ):?>
26- <span><?= $ this ->nextPageLabel ?> </span>
26+ <span <?= $ linkAttributes ?> ><?= $ this ->nextPageLabel ?> </span>
2727 <?php else : ?>
2828 <a <?= $ linkAttributes?> href="<?= $ this ->pagination ->createUrl ($ page +1 );?> "><?= $ this ->nextPageLabel ?> </a>
2929 <?php endif ?>
3030 </li>
3131 <?php if ($ this ->lastPageLabel ):?>
3232 <li class="<?= $ this ->pageCssClass ?> <?= $ this ->lastPageCssClass ?> <?php if ($ isLast ):?> disabled<?php endif ?> ">
3333 <?php if ($ isLast ):?>
34- <span><?= $ this ->lastPageLabel ?> </span>
34+ <span <?= $ linkAttributes ?> ><?= $ this ->lastPageLabel ?> </span>
3535 <?php else : ?>
3636 <a <?= $ linkAttributes?> href="<?= $ this ->pagination ->createUrl ($ this ->pagination ->pageCount );?> "><?= $ this ->lastPageLabel ?> </a>
3737 <?php endif ?>
You can’t perform that action at this time.
0 commit comments