PHPackages                             restlin/grid-to-session-behavior - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. restlin/grid-to-session-behavior

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

restlin/grid-to-session-behavior
================================

This is yii2 controller behavior. It can save and restore grid filters, page and sort in session.

1.0.2(8y ago)010GPL-3.0-or-laterPHP

Since Sep 27Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Restlin/GridToSessionBehavior)[ Packagist](https://packagist.org/packages/restlin/grid-to-session-behavior)[ Docs](https://github.com/Restlin/GridToSessionBehavior)[ RSS](/packages/restlin-grid-to-session-behavior/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

GridToSessionBehavior
=====================

[](#gridtosessionbehavior)

This is yii2 controller behavior. It can save grid filters, page and sort in session and restore when user return to action with grid.

example for using this behavior in controller:

```
/**
* Lists all Document models.
* @param integer $mode in this case this parameter is indicator for restore params from session
* @return mixed
*/
public function actionIndex($mode=null)
{
   $searchModel = new DocumentSearch();
   if(!$mode) {
       $this->loadParams();
       $mode = Yii::$app->request->get('mode');
   }
   $this->saveParams('DocumentSearch',['mode'=>1]);
   $dataProvider = $searchModel->search(Yii::$app->request->queryParams);

   return $this->render('index', [
       'searchModel' => $searchModel,
       'dataProvider' => $dataProvider,
   ]);
}
```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~251 days

Total

3

Last Release

3060d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e1ac80c359893733c4629d4b9cccc90fbd99704ba75d2a0be102702fc3446cb1?d=identicon)[Restlin](/maintainers/Restlin)

---

Top Contributors

[![Restlin](https://avatars.githubusercontent.com/u/4006315?v=4)](https://github.com/Restlin "Restlin (6 commits)")

---

Tags

gridsessionyii2extensioncontroller

### Embed Badge

![Health badge](/badges/restlin-grid-to-session-behavior/health.svg)

```
[![Health](https://phpackages.com/badges/restlin-grid-to-session-behavior/health.svg)](https://phpackages.com/packages/restlin-grid-to-session-behavior)
```

###  Alternatives

[kartik-v/yii2-grid

Yii 2 GridView on steroids. Various enhancements and utilities for the Yii 2.0 GridView widget.

5546.8M181](/packages/kartik-v-yii2-grid)[mickgeek/yii2-actionbar

A control bar with bulk actions for the GridView widget.

3445.4k](/packages/mickgeek-yii2-actionbar)[yiister/yii2-advanced-grid

Advanced GridView extension for Yii framework 2

4712.5k](/packages/yiister-yii2-advanced-grid)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
