Browse Source

Set totalCount.

tags/2.0.0-beta
Qiang Xue 11 years ago
parent
commit
d798cc791b
  1. 1
      framework/yii/data/ArrayDataProvider.php

1
framework/yii/data/ArrayDataProvider.php

@ -81,6 +81,7 @@ class ArrayDataProvider extends BaseDataProvider
}
if (($pagination = $this->getPagination()) !== false) {
$pagination->totalCount = $this->getTotalCount();
$models = array_slice($models, $pagination->getOffset(), $pagination->getLimit());
}

Loading…
Cancel
Save