<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Expanding forms with symfony 1.2 and Doctrine</title>
	<atom:link href="http://ezzatron.com/2009/12/03/expanding-forms-with-symfony-1-2-and-doctrine/feed/" rel="self" type="application/rss+xml" />
	<link>http://ezzatron.com/2009/12/03/expanding-forms-with-symfony-1-2-and-doctrine/</link>
	<description>Bringing together the fine arts of programming and death metal.</description>
	<lastBuildDate>Fri, 09 Mar 2012 18:01:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Fabrício Menna</title>
		<link>http://ezzatron.com/2009/12/03/expanding-forms-with-symfony-1-2-and-doctrine/comment-page-1/#comment-1008</link>
		<dc:creator>Fabrício Menna</dc:creator>
		<pubDate>Fri, 09 Mar 2012 18:01:46 +0000</pubDate>
		<guid isPermaLink="false">http://ezzatron.com/?p=177#comment-1008</guid>
		<description>I guess there&#039;s some code missing there. Got kinda lost</description>
		<content:encoded><![CDATA[<p>I guess there&#8217;s some code missing there. Got kinda lost</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erin</title>
		<link>http://ezzatron.com/2009/12/03/expanding-forms-with-symfony-1-2-and-doctrine/comment-page-1/#comment-984</link>
		<dc:creator>Erin</dc:creator>
		<pubDate>Mon, 04 Jul 2011 23:50:28 +0000</pubDate>
		<guid isPermaLink="false">http://ezzatron.com/?p=177#comment-984</guid>
		<description>I think you&#039;re probably right :) I&#039;ll try to get around to updating this with your suggestions.</description>
		<content:encoded><![CDATA[<p>I think you&#8217;re probably right <img src='http://ezzatron.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I&#8217;ll try to get around to updating this with your suggestions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Graham</title>
		<link>http://ezzatron.com/2009/12/03/expanding-forms-with-symfony-1-2-and-doctrine/comment-page-1/#comment-982</link>
		<dc:creator>Graham</dc:creator>
		<pubDate>Fri, 01 Jul 2011 20:28:15 +0000</pubDate>
		<guid isPermaLink="false">http://ezzatron.com/?p=177#comment-982</guid>
		<description>This tutorial was so helpful! Thank you kindly for taking the time to write this up!

The only recommended change I have is to pass the Band object in the options() array rather than overriding the constructor.

The change is as follows.

BandMembersForm.class.php would become:

class BandMembersForm extends sfForm
{
  public function configure()
  {
    $i = 0;

    foreach ($this-&gt;options[&#039;band&#039;]-&gt;Members as $member)
    {
      $this-&gt;embedForm($i, new EmbeddedBandMemberForm($member));
      $i ++;
    }

    for ($j = $i; $j embedForm($j, new EmbeddedBandMemberForm());
    }
  }
}

And you&#039;d call it in BandForm.class.php-&gt;configure() as:

class BandForm extends BaseBandForm
{
  public function configure()
  {
    $this-&gt;embedForm(&#039;members&#039;, new BandMembersForm(array(), array(&#039;band&#039; =&gt; $this-&gt;object)));
  }
}

I always try to avoid overriding constructors. I mean, that&#039;s what the options() array is there for, right?</description>
		<content:encoded><![CDATA[<p>This tutorial was so helpful! Thank you kindly for taking the time to write this up!</p>
<p>The only recommended change I have is to pass the Band object in the options() array rather than overriding the constructor.</p>
<p>The change is as follows.</p>
<p>BandMembersForm.class.php would become:</p>
<p>class BandMembersForm extends sfForm<br />
{<br />
  public function configure()<br />
  {<br />
    $i = 0;</p>
<p>    foreach ($this-&gt;options['band']-&gt;Members as $member)<br />
    {<br />
      $this-&gt;embedForm($i, new EmbeddedBandMemberForm($member));<br />
      $i ++;<br />
    }</p>
<p>    for ($j = $i; $j embedForm($j, new EmbeddedBandMemberForm());<br />
    }<br />
  }<br />
}</p>
<p>And you&#8217;d call it in BandForm.class.php-&gt;configure() as:</p>
<p>class BandForm extends BaseBandForm<br />
{<br />
  public function configure()<br />
  {<br />
    $this-&gt;embedForm(&#8216;members&#8217;, new BandMembersForm(array(), array(&#8216;band&#8217; =&gt; $this-&gt;object)));<br />
  }<br />
}</p>
<p>I always try to avoid overriding constructors. I mean, that&#8217;s what the options() array is there for, right?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erin</title>
		<link>http://ezzatron.com/2009/12/03/expanding-forms-with-symfony-1-2-and-doctrine/comment-page-1/#comment-980</link>
		<dc:creator>Erin</dc:creator>
		<pubDate>Thu, 09 Jun 2011 12:06:55 +0000</pubDate>
		<guid isPermaLink="false">http://ezzatron.com/?p=177#comment-980</guid>
		<description>Can you be more specific? What sort of problems are you having?</description>
		<content:encoded><![CDATA[<p>Can you be more specific? What sort of problems are you having?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ido Schacham</title>
		<link>http://ezzatron.com/2009/12/03/expanding-forms-with-symfony-1-2-and-doctrine/comment-page-1/#comment-979</link>
		<dc:creator>Ido Schacham</dc:creator>
		<pubDate>Sun, 05 Jun 2011 14:13:30 +0000</pubDate>
		<guid isPermaLink="false">http://ezzatron.com/?p=177#comment-979</guid>
		<description>Excellent tutorial, it has helped me a lot. However, I can&#039;t get it to work with a many to many relationship. Any ideas about that?</description>
		<content:encoded><![CDATA[<p>Excellent tutorial, it has helped me a lot. However, I can&#8217;t get it to work with a many to many relationship. Any ideas about that?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brice</title>
		<link>http://ezzatron.com/2009/12/03/expanding-forms-with-symfony-1-2-and-doctrine/comment-page-1/#comment-975</link>
		<dc:creator>Brice</dc:creator>
		<pubDate>Wed, 04 May 2011 12:44:27 +0000</pubDate>
		<guid isPermaLink="false">http://ezzatron.com/?p=177#comment-975</guid>
		<description>Thanks a lot, work with 1.4, the best example I found on this subject.</description>
		<content:encoded><![CDATA[<p>Thanks a lot, work with 1.4, the best example I found on this subject.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sergey</title>
		<link>http://ezzatron.com/2009/12/03/expanding-forms-with-symfony-1-2-and-doctrine/comment-page-1/#comment-969</link>
		<dc:creator>Sergey</dc:creator>
		<pubDate>Tue, 05 Apr 2011 21:06:06 +0000</pubDate>
		<guid isPermaLink="false">http://ezzatron.com/?p=177#comment-969</guid>
		<description>Thanks a lot! Brilliant tutorial! It helps me very much in my work. I just modified a bit deletion method and its wokrs great for me!</description>
		<content:encoded><![CDATA[<p>Thanks a lot! Brilliant tutorial! It helps me very much in my work. I just modified a bit deletion method and its wokrs great for me!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yan</title>
		<link>http://ezzatron.com/2009/12/03/expanding-forms-with-symfony-1-2-and-doctrine/comment-page-1/#comment-959</link>
		<dc:creator>yan</dc:creator>
		<pubDate>Thu, 13 Jan 2011 09:04:44 +0000</pubDate>
		<guid isPermaLink="false">http://ezzatron.com/?p=177#comment-959</guid>
		<description>first, thanks for this great job!
second, is there anybody who could publish his code for sf 1.3 or 1.4?</description>
		<content:encoded><![CDATA[<p>first, thanks for this great job!<br />
second, is there anybody who could publish his code for sf 1.3 or 1.4?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erin</title>
		<link>http://ezzatron.com/2009/12/03/expanding-forms-with-symfony-1-2-and-doctrine/comment-page-1/#comment-958</link>
		<dc:creator>Erin</dc:creator>
		<pubDate>Tue, 11 Jan 2011 00:19:36 +0000</pubDate>
		<guid isPermaLink="false">http://ezzatron.com/?p=177#comment-958</guid>
		<description>Thanks very much for the kind words! Good to know people still find this useful :)</description>
		<content:encoded><![CDATA[<p>Thanks very much for the kind words! Good to know people still find this useful <img src='http://ezzatron.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://ezzatron.com/2009/12/03/expanding-forms-with-symfony-1-2-and-doctrine/comment-page-1/#comment-957</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Sun, 09 Jan 2011 06:26:04 +0000</pubDate>
		<guid isPermaLink="false">http://ezzatron.com/?p=177#comment-957</guid>
		<description>Wow! Thank you very much for your BRILLIANT post on embedding forms with Symfony! I am just integrating your approach in my own project and it works just great!

I added Delete-Buttons next to the (already saved) &quot;BandMember&quot;-Slots and linked them to the &quot;Band&quot;-Delete-Action. So when a Band already has Members, you can dynamically delete Members and the main form gets &quot;refreshed&quot; instantly.

In my opinion your tutorial here is the best of all the &quot;embedding forms&quot;-tutorials I have read... and I have read them all! ;-)

Thank you again!</description>
		<content:encoded><![CDATA[<p>Wow! Thank you very much for your BRILLIANT post on embedding forms with Symfony! I am just integrating your approach in my own project and it works just great!</p>
<p>I added Delete-Buttons next to the (already saved) &#8220;BandMember&#8221;-Slots and linked them to the &#8220;Band&#8221;-Delete-Action. So when a Band already has Members, you can dynamically delete Members and the main form gets &#8220;refreshed&#8221; instantly.</p>
<p>In my opinion your tutorial here is the best of all the &#8220;embedding forms&#8221;-tutorials I have read&#8230; and I have read them all! <img src='http://ezzatron.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Thank you again!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

