php - Yii2 - how to set main config param pagination pageSizeLimit? -
i want set main config param pagesizelimit in class pagination.
example: (/backend/config/main.php)
'pagination' => [ 'class' => 'yii\data\pagination', [ 'pagesizelimit' => [1, 1000], ] ],
but not working. so, how set defaults entire site? thank much!
you can use dependency injection container purpose.
define default parameter's value in bootstrapping section of config:
\yii::$container->set('yii\data\pagination', [ 'pagesizelimit' => [1, 1000], ]);
read more on in guide https://github.com/yiisoft/yii2/blob/master/docs/guide/concept-configurations.md
Comments
Post a Comment