Browse Source

Pagination doc fix.

tags/2.0.0-beta
resurtm 12 years ago
parent
commit
067c00843a
  1. 2
      framework/yii/data/Pagination.php

2
framework/yii/data/Pagination.php

@ -28,7 +28,7 @@ use yii\base\Object;
* { * {
* $query = Article::find()->where(array('status' => 1)); * $query = Article::find()->where(array('status' => 1));
* $countQuery = clone $query; * $countQuery = clone $query;
* $pages = new Pagination($countQuery->count()); * $pages = new Pagination(array('itemCount' => $countQuery->count()));
* $models = $query->offset($pages->offset) * $models = $query->offset($pages->offset)
* ->limit($pages->limit) * ->limit($pages->limit)
* ->all(); * ->all();

Loading…
Cancel
Save