Permalink
Browse files

bug #3551 [Cookbook][Dynamic Form Modification] Fix sample code (ryba…

…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 de71a5143f6d30fff7e890cea250d047a63916d2
Showing with 2 additions and 2 deletions.
  1. +2 −2 cookbook/form/dynamic_form_modification.rst
@@ -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');
}
});
@@ -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');
}
}

0 comments on commit de71a51

Please sign in to comment.