PHPackages                             fousky/pix-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. fousky/pix-sortable-behavior-bundle

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

fousky/pix-sortable-behavior-bundle
===================================

Provides a way to sort your admin listing

044PHP

Since Dec 31Pushed 4mo agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

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

[](#pixsortablebehaviorbundle)

Offers a sortable feature for your Symfony2 admin listing

Compatibility
-------------

[](#compatibility)

This fork is compatible with Symfony 6.4 and Twig 3.x. The original bundle has been updated to work with:

- Symfony 6.4 (TreeBuilder API compatibility)
- Twig 3.x (AbstractExtension and TwigFunction compatibility)

### 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`.

```
