Skip to content

Commit

Permalink
merged branch greg0ire/fix_upgrade_prototype_name_option (PR #5833)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.1 branch.

Commits
-------

6fb4a1b Remove § about prototype_name customization in 2.0
8a347fd fix option name

Discussion
----------

Fix upgrade prototype name option
  • Loading branch information
fabpot committed Oct 25, 2012
2 parents 94f5f49 + 6fb4a1b commit f31c6f9
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions UPGRADE-2.1.md
Expand Up @@ -423,22 +423,13 @@
* In the collection type's template, the default name of the prototype field
has changed from `$$name$$` to `__name__`.

For custom names, dollar signs are no longer prepended and appended. You are
advised to prepend and append two underscores wherever you specify a value
for the field's "prototype_name" option.

Before:

```
$builder->add('tags', 'collection', array('prototype' => 'proto'));
// results in the name "$$proto$$" in the template
```

After:
You can now customize the name of the prototype field by changin the
"prototype_name" option. You are advised to prepend and append two
underscores wherever you specify a value for the field's "prototype_name"
option.

```
$builder->add('tags', 'collection', array('prototype' => '__proto__'));
$builder->add('tags', 'collection', array('prototype_name' => '__proto__'));
// results in the name "__proto__" in the template
```
Expand Down

0 comments on commit f31c6f9

Please sign in to comment.