fsv / sortable-collection-type-bundle
This package is abandoned and no longer maintained.
No replacement package was suggested.
Symfony sortable collection form type
Package info
github.com/sergeyfedotov/symfony-sortable-collection-type-bundle
pkg:composer/fsv/sortable-collection-type-bundle
0.1.1
2017-02-14 14:15 UTC
Requires
- php: >=5.5.9
- symfony/symfony: ^2.7|^3.0
Requires (Dev)
- phpunit/phpunit: ~4.8
This package is not auto-updated.
Last update: 2022-10-15 08:40:54 UTC
README
The bundle is used to sort the FormView objects in the CollectionType.
Sorting is based on the value of the specified property.
The property is determined by the property path in the format of the Symfony PropertyAccess component.
Installation
$ composer require fsv/sortable-collection-type-bundle
// app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Fsv\SortableCollectionTypeBundle\FsvSortableCollectionTypeBundle(), ); }
Configuration
The bundle does not have any configurable parameters.
Usage
// AppBundle\Form\Type\ExampleFormType.php public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('collection', CollectionType::class, [ // ... 'sort_by' => [ 'property' => 'asc' ] ]); // ... }