Yii2 Behaviors for keeping GridView pagination and filters

Hi folks!

This is my first public Yii2 contributtion: yii2-behaviors

A collection of useful behaviors for Yii2.

Currently 2 behaviors are available, both for use with GridView.

  • SaveGridPaginationBehavior

  • SaveGridFiltersBehavior

The SaveGridPaginationBehavior keeps the last page number viewed in session so when the user gets back to the grid view, the last viewed page is shown.

The SaveGridFiltersBehavior keeps the last used filters in session. When the user gets back to the grid view, the filters are restored.


Checkout the project page on GitHub for instructions on how to install and use the behaviors: https://github.com/marqu3s/yii2-behaviors

Sorry for not posting the install and usage instructions here. It’s just to keep them in one place. Easy to update and keep instructions always up to date.


I’ve been trying to setup your mod and can’t seem to get it working. The idea is great, but without more details on exactly how this is supposed to be setup, I’m stuck! Is there any way for you to setup an install and publish the entire project so everyone can see how this is implemented? Or if you can detail the install instructions here, that would be a start. I need the behaviors your project addresses.