kharanenka / oc-pagination
Get pagination elements for OctoberCMS
Installs: 31 132
Dependents: 1
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=5.6
- kharanenka/php-pagination: 2.0.*
This package is auto-updated.
Last update: 2024-10-29 04:53:07 UTC
README
You can get pagination elements with "Pagination" class. See php-pagination package. You can copy the lang file from example oc-pagination/src/Kharanenka/lang/en/lang.php
#Installation
Require this package in your composer.json
and update composer.
"kharanenka/oc-pagination": "1.0.*"
#Component properties
public function defineProperties() { $arProperties = [ //Component property array ]; $arProperties = array_merge($arProperties, Pagination::getProperties('plugin_name')); return $arProperties; }
Usage
//$arSettings = $this->properties $arPagination = Pagination::get($iCurrentPage, $iTotalCount, $arSettings);
#Result
[ [ 'name' => 'First', 'value' => 1, 'class' => 'pagination-first-button', 'code' => 'first', ], ... [ 'name' => '3', 'value' => 3, 'class' => 'pagination-i _act', 'code' => null, ], ... [ 'name' => 'Last', 'value' => 10, 'class' => 'pagination-last-button', 'code' => 'last', ] ]