symfony2 - A2Lix - Column positions -
is there way can rearrange field positions in edit/create form in sonata admin?
something that:
$formmapper->add('translations','a2lix_translations',array( 'fields'=>array( 'title' => array(); ) );
$formmapper->add('position');
$formmapper->add('translations','a2lix_translations',array( 'fields'=>array( 'subtitle' => array(); ) );
you have install sortable bundle - https://packagist.org/packages/pixassociates/sortable-behavior-bundle. there tutorial how implement in sonata admin.
you should enable sortable (https://github.com/atlantic18/doctrineextensions/blob/master/doc/sortable.md) adding variable entity like:
/** * @gedmo\sortableposition * @orm\column(name="position", type="integer") */ private $position;
after have in admin:
symfony2 sonata-admin a2lix-translation
No comments:
Post a Comment