PHPackages                             alex-dwt/sortable-behavior-bundle - 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. [Admin Panels](/categories/admin)
4. /
5. alex-dwt/sortable-behavior-bundle

ActiveSymfony-bundle[Admin Panels](/categories/admin)

alex-dwt/sortable-behavior-bundle
=================================

Provides a way to sort your admin listing

v2.0.3(4y ago)06MITPHPPHP &gt;=7.2

Since Nov 6Pushed 4y agoCompare

[ Source](https://github.com/alex-dwt/pixSortableBehaviorBundle)[ Packagist](https://packagist.org/packages/alex-dwt/sortable-behavior-bundle)[ Docs](https://github.com/pix-digital/pixSortableBehaviorBundle)[ RSS](/packages/alex-dwt-sortable-behavior-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (6)Versions (17)Used By (0)

pixSortableBehaviorBundle
=========================

[](#pixsortablebehaviorbundle)

Offers a sortable feature for your Symfony2 admin listing

### SonataAdminBundle implementation

[](#sonataadminbundle-implementation)

The SonataAdminBundle provides a cookbook article here :

[https://github.com/sonata-project/SonataAdminBundle/blob/3.x/docs/cookbook/recipe\_sortable\_listing.rst](https://github.com/sonata-project/SonataAdminBundle/blob/3.x/docs/cookbook/recipe_sortable_listing.rst)

### Configuration

[](#configuration)

By default, this extension works with Doctrine ORM, but you can choose to use Doctrine MongoDB by defining the driver configuration :

```
# app/config/config.yml
pix_sortable_behavior:
    db_driver: mongodb # default value : orm
    position_field:
        default: sort #default value : position
        entities:
            AppBundle\Entity\Foobar: order
            AppBundle\Entity\Baz: rang
    sortable_groups:
        entities:
            AppBundle\Entity\Baz: [ group ]

```

#### Use a draggable list instead of up/down buttons

[](#use-a-draggable-list-instead-of-updown-buttons)

In order to use a draggable list instead of up/down buttons, change the template in the `move` action to `PixSortableBehaviorBundle:Default:_sort_drag_drop.html.twig`.

```
