Skip to content

Commit

Permalink
Fix markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
webda2l committed Nov 7, 2013
1 parent 10816ac commit 3412358
Showing 1 changed file with 25 additions and 28 deletions.
53 changes: 25 additions & 28 deletions UPGRADE-1.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,39 @@ UPGRADE FROM 1.1 to 1.2

### [BC Break] Rename of type option into field_type

Previous:

```
$builder->add('translations', 'a2lix_translations', array(
'fields' => array(
'description' => array(
'type' => 'textarea',

Previous code:

$builder->add('translations', 'a2lix_translations', array(
'fields' => array(
'description' => array(
'type' => 'textarea',
)
)
)
))
```
))


Change into:

```
$builder->add('translations', 'a2lix_translations', array(
'fields' => array(
'description' => array(
'field_type' => 'textarea',
$builder->add('translations', 'a2lix_translations', array(
'fields' => array(
'description' => array(
'field_type' => 'textarea',
)
)
)
))
```
))


This modification occurs for manage collection, which need type field (http://symfony.com/doc/current/reference/forms/types/collection.html#type):

```
$builder->add('translations', 'a2lix_translations', array(
'fields' => array(
'textCollection' => array(
'field_type' => 'collection',
'type' => 'text',
'allow_add' => true,
'allow_remove' => false
$builder->add('translations', 'a2lix_translations', array(
'fields' => array(
'textCollection' => array(
'field_type' => 'collection',
'type' => 'text',
'allow_add' => true,
'allow_remove' => false
)
)
)
))
```
))

0 comments on commit 3412358

Please sign in to comment.