| @@ 20-44 (lines=25) @@ | ||
| 17 | /** |
|
| 18 | * @inheritdoc |
|
| 19 | */ |
|
| 20 | protected function configureFormFields(FormMapper $formMapper) |
|
| 21 | { |
|
| 22 | $formMapper |
|
| 23 | ->add('name') |
|
| 24 | ->add('description', 'ckeditor') |
|
| 25 | ->add('toolResourceRights', 'sonata_type_collection', array( |
|
| 26 | 'cascade_validation' => true, |
|
| 27 | ), array( |
|
| 28 | //'allow_delete' => true, |
|
| 29 | //'by_reference' => false, |
|
| 30 | 'edit' => 'inline', |
|
| 31 | 'inline' => 'table', |
|
| 32 | //'btn_add' => true, |
|
| 33 | //'multiple' => true |
|
| 34 | //'sortable' => 'position', |
|
| 35 | //'link_parameters' => array('content' => $users), |
|
| 36 | 'admin_code' => 'sonata.admin.tool_resource_rights' |
|
| 37 | ) |
|
| 38 | ) |
|
| 39 | /*->add('image', 'sonata_media_type', array( |
|
| 40 | 'provider' => 'sonata.media.provider.image', |
|
| 41 | 'context' => 'default' |
|
| 42 | ));*/ |
|
| 43 | ; |
|
| 44 | } |
|
| 45 | ||
| 46 | /** |
|
| 47 | * @inheritdoc |
|
| @@ 23-43 (lines=21) @@ | ||
| 20 | /** |
|
| 21 | * @param FormMapper $formMapper |
|
| 22 | */ |
|
| 23 | protected function configureFormFields(FormMapper $formMapper) |
|
| 24 | { |
|
| 25 | $formMapper |
|
| 26 | ->add('name') |
|
| 27 | ->add('description', 'ckeditor') |
|
| 28 | ->add( |
|
| 29 | 'users', |
|
| 30 | 'sonata_type_collection', |
|
| 31 | array( |
|
| 32 | 'cascade_validation' => true, |
|
| 33 | ), |
|
| 34 | array( |
|
| 35 | // 'allow_delete' => true, |
|
| 36 | 'by_reference' => false, |
|
| 37 | 'edit' => 'inline', |
|
| 38 | 'inline' => 'table', |
|
| 39 | //'btn_add' => true, |
|
| 40 | //'multiple' => true |
|
| 41 | //'sortable' => 'position', |
|
| 42 | //'link_parameters' => array('content' => $users), |
|
| 43 | 'admin_code' => 'sonata.admin.user_group_rel_user', |
|
| 44 | ) |
|
| 45 | ) |
|
| 46 | ; |
|