Yii 2.0: yii2-sortable-behavior

Suite of five classes to handle the interactive sorting of ActiveRecords

Sortable is a suite of five classes to interactively handle the sorting (or ordering) of ActiveRecords. Simple sorting is supported, but also sorting of related data in one-to-many, and in many-to-many relations.

There are two widgets:

  • SortableGridView - extended GridView;
  • SortableListView - extended ListView.

In both widgets, items can be moved to another position by means of drag and drop, using jQuery UI widgets.

Two classes are ActiveRecord Behaviors:

  • Sortable - to handle simple sorting and one-to-many sorting;
  • MMSortable - to handle many-to-many sorting.

Finally, there's one utility class:

  • PivotRecord - base class for the ActiveRecord of the pivot table in a many-to-many relation.


Yii 2.0


Total 2 comments

#19003 report it
apotter at 2015/02/22 09:40am
Nice Behavior

I was considering doing something like this. Unfortunately, it's quite close to what I needed but not exactly.

Some of the documentation is not identical:

  • inline: Notice that the options 'axis', 'helper', and 'update' will be overwritten.
  • GitHub Readme: Notice that the options 'axis', 'items', 'helper', and 'update' will be overwritten.
#18119 report it
Scott_Huang at 2014/09/12 05:45am
Your home page look clean and well, so I guess your software should be good too:)

as title.

Leave a comment

Please to leave your comment.

Create extension
No downloadable files yet