PHPackages                             2rats/yii2-sortable-gridview - 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. 2rats/yii2-sortable-gridview

ActiveYii2-extension

2rats/yii2-sortable-gridview
============================

Sortable modification of standard Yii2 GridView widget

0203PHP

Since Aug 11Pushed 1y agoCompare

[ Source](https://github.com/2rats/yii2-sortable-gridview)[ Packagist](https://packagist.org/packages/2rats/yii2-sortable-gridview)[ RSS](/packages/2rats-yii2-sortable-gridview/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Sortable GridView Widget for Yii2
=================================

[](#sortable-gridview-widget-for-yii2)

Sortable modification of standard Yii2 GridView widget.

![Packagist](https://camo.githubusercontent.com/5bdb7184cb630830decaf5600bbeeb75218798d53eeb54496d71a89ca47b0e6d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f68696d696b6c61622f796969322d736f727461626c652d677269642d766965772d7769646765742e737667) ![Packagist](https://camo.githubusercontent.com/7f97a5f5abb23f1037d87d581dea06a2381c3618a388f848b09f4666f92eb4fe/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f68696d696b6c61622f796969322d736f727461626c652d677269642d766965772d7769646765742e737667) ![license](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

- Either run

```
php composer.phar require --prefer-dist "himiklab/yii2-sortable-grid-view-widget" "*"

```

or add

```
"himiklab/yii2-sortable-grid-view-widget" : "*"
```

to the `require` section of your application's `composer.json` file.

- Add to your database new `unsigned int` attribute, such `sortOrder`.
- Add new behavior in the AR model, for example:

```
use himiklab\sortablegrid\SortableGridBehavior;

public function behaviors()
{
    return [
        'sort' => [
            'class' => SortableGridBehavior::className(),
            'sortableAttribute' => 'sortOrder'
        ],
    ];
}
```

- Add action in the controller, for example:

```
use himiklab\sortablegrid\SortableGridAction;

public function actions()
{
    return [
        'sort' => [
            'class' => SortableGridAction::className(),
            'modelName' => Model::className(),
        ],
    ];
}
```

Usage
-----

[](#usage)

- Use SortableGridView as standard GridView with `sortableAction` option. You can also subscribe to the JS event 'sortableSuccess' generated widget after a successful sorting.

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity17

Early-stage or recently created project

 Bus Factor1

Top contributor holds 70.2% 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.

### Community

Maintainers

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

---

Top Contributors

[![himiklab](https://avatars.githubusercontent.com/u/6266409?v=4)](https://github.com/himiklab "himiklab (33 commits)")[![arstar](https://avatars.githubusercontent.com/u/2492098?v=4)](https://github.com/arstar "arstar (4 commits)")[![kazda01](https://avatars.githubusercontent.com/u/62554904?v=4)](https://github.com/kazda01 "kazda01 (4 commits)")[![lav45](https://avatars.githubusercontent.com/u/675367?v=4)](https://github.com/lav45 "lav45 (2 commits)")[![egml](https://avatars.githubusercontent.com/u/2691888?v=4)](https://github.com/egml "egml (1 commits)")[![randycoder](https://avatars.githubusercontent.com/u/7973684?v=4)](https://github.com/randycoder "randycoder (1 commits)")[![nick-denry](https://avatars.githubusercontent.com/u/1450983?v=4)](https://github.com/nick-denry "nick-denry (1 commits)")[![Evgen1986](https://avatars.githubusercontent.com/u/10276586?v=4)](https://github.com/Evgen1986 "Evgen1986 (1 commits)")

### Embed Badge

![Health badge](/badges/2rats-yii2-sortable-gridview/health.svg)

```
[![Health](https://phpackages.com/badges/2rats-yii2-sortable-gridview/health.svg)](https://phpackages.com/packages/2rats-yii2-sortable-gridview)
```

PHPackages © 2026

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