In short, we want to create a CRUD interface, 1N, with
which, when we are editing an item, we add a panel to manage all
the child items.Here we have a wtype table, with a wconf
table that contains a series of records linked to a wtype item.
Just like for the implementation example of sortable with
drag'n'drop ( available here ) we are going to use the
following
components:pixassociates/sortable-behavior-bundle
and stof/doctrine-extension...
You need to install pixassociates/sortable-behavior-bundle and stof/doctrine-extensions-bundle
composer require stof/doctrine-extensions-bundle
composer require pixassociates/sortable-behavior-bundle
Add the configuration in pix_sortable.yamlBy adding the entity and the field in position_field (here wconf, and the position field)
pix_sortable_behavior:
db_driver: orm # mongodb default value : orm
position_field:
default: position #default value : position
entities:
...