mirror of
https://github.com/yiisoft/yii2.git
synced 2026-03-22 15:07:08 +01:00
2.0.5 bf7edc5
This commit is contained in:
@@ -80,7 +80,10 @@ class ArrayDataProvider extends BaseDataProvider
|
||||
|
||||
if (($pagination = $this->getPagination()) !== false) {
|
||||
$pagination->totalCount = $this->getTotalCount();
|
||||
$models = array_slice($models, $pagination->getOffset(), $pagination->getLimit());
|
||||
|
||||
if ($pagination->getPageSize() > 0) {
|
||||
$models = array_slice($models, $pagination->getOffset(), $pagination->getLimit(), true);
|
||||
}
|
||||
}
|
||||
|
||||
return $models;
|
||||
|
||||
Reference in New Issue
Block a user