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

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -