mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-22 01:30:23 +08:00
Fixes #1221: make it easier to subclass BaseDataProvider with custom pagination.
This commit is contained in:
@@ -165,10 +165,7 @@ abstract class BaseDataProvider extends Component implements DataProviderInterfa
|
||||
public function getPagination()
|
||||
{
|
||||
if ($this->_pagination === null) {
|
||||
$this->_pagination = new Pagination;
|
||||
if ($this->id !== null) {
|
||||
$this->_pagination->pageVar = $this->id . '-page';
|
||||
}
|
||||
$this->setPagination([]);
|
||||
}
|
||||
return $this->_pagination;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user