Skip to content

Commit

Permalink
bug #3551 [Cookbook][Dynamic Form Modification] Fix sample code (ryba…
Browse files Browse the repository at this point in the history
…kit)

This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #3551).

Discussion
----------

[Cookbook][Dynamic Form Modification] Fix sample code

Commits
-------

0497b38 [Cookbook][Dynamic Form Modification] Fix sample code
  • Loading branch information
weaverryan committed Feb 16, 2014
2 parents 143db2f + 66c4d77 commit de71a51
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cookbook/form/dynamic_form_modification.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ the event listener might look like the following::
// check if the Product object is "new"
// If no data is passed to the form, the data is "null".
// This should be considered a new "Product"
if (!$product || null !== $product->getId()) {
if (!$product || null === $product->getId()) {
$form->add('name', 'text');
}
});
Expand Down Expand Up @@ -212,7 +212,7 @@ class::
$product = $event->getData();
$form = $event->getForm();

if (!$product || null !== $product->getId()) {
if (!$product || null === $product->getId()) {
$form->add('name', 'text');
}
}
Expand Down

0 comments on commit de71a51

Please sign in to comment.