<?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>Reacties op: Symfony: Multiple embedded forms in a specific layout</title>
	<atom:link href="http://www.paulderaaij.nl/2010/02/27/symfony-multiple-embedded-forms-layout/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.paulderaaij.nl/2010/02/27/symfony-multiple-embedded-forms-layout/</link>
	<description>Algemeen weblog van Paul de Raaij</description>
	<lastBuildDate>Tue, 13 Dec 2011 09:01:53 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
	<item>
		<title>Door: Paul de Raaij</title>
		<link>http://www.paulderaaij.nl/2010/02/27/symfony-multiple-embedded-forms-layout/comment-page-1/#comment-285</link>
		<dc:creator>Paul de Raaij</dc:creator>
		<pubDate>Sat, 24 Jul 2010 08:39:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.paulderaaij.nl/?p=162#comment-285</guid>
		<description>Hi Arif,

Glad this post helped you with you journey in Symfony. 

About the refactoring, you&#039;re absolutely right. But when I was figuring out this stuff I&#039;ve changed the code so much, that the MVC principle got lost along the way. In the end result everything was refeactored the correct way :)

Extending the baseform is a very good idea! Thanks for your feedback!</description>
		<content:encoded><![CDATA[<p>Hi Arif,</p>
<p>Glad this post helped you with you journey in Symfony. </p>
<p>About the refactoring, you&#8217;re absolutely right. But when I was figuring out this stuff I&#8217;ve changed the code so much, that the MVC principle got lost along the way. In the end result everything was refeactored the correct way <img src='http://www.paulderaaij.nl/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Extending the baseform is a very good idea! Thanks for your feedback!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Door: Arif Gebhardt</title>
		<link>http://www.paulderaaij.nl/2010/02/27/symfony-multiple-embedded-forms-layout/comment-page-1/#comment-284</link>
		<dc:creator>Arif Gebhardt</dc:creator>
		<pubDate>Mon, 19 Jul 2010 21:49:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.paulderaaij.nl/?p=162#comment-284</guid>
		<description>Hi Paul,
thank your for this post, it helped me a lot!
I am currently working on something similar (no football, but the object relations are similar).
But you definetly should refactor your code by putting something like

Doctrine_Query::create()-&gt;from(&#039;Predictions&#039;)-&gt;where(&#039;user_id = ? &#039;, sfContext::getInstance()-&gt;getUser()-&gt;getProfile()-&gt;getUserID())-&gt;andWhere(&#039;game_id = ?&#039;, $this-&gt;getObject()-&gt;getID());

into the corresponding model class! In this case it is PredictionsTable.class.php, i think.
That fits a lot better into the MVC pattern as the query stuff is done in the model, where it belongs.

One last thing:
You complained about the form extending BaseGamesForm which is forcing you to unset all widgets first.
You can avoid this workaround by simply building your custom form class which then extends BaseForm.

Arif</description>
		<content:encoded><![CDATA[<p>Hi Paul,<br />
thank your for this post, it helped me a lot!<br />
I am currently working on something similar (no football, but the object relations are similar).<br />
But you definetly should refactor your code by putting something like</p>
<p>Doctrine_Query::create()-&gt;from(&#8216;Predictions&#8217;)-&gt;where(&#8216;user_id = ? &#8216;, sfContext::getInstance()-&gt;getUser()-&gt;getProfile()-&gt;getUserID())-&gt;andWhere(&#8216;game_id = ?&#8217;, $this-&gt;getObject()-&gt;getID());</p>
<p>into the corresponding model class! In this case it is PredictionsTable.class.php, i think.<br />
That fits a lot better into the MVC pattern as the query stuff is done in the model, where it belongs.</p>
<p>One last thing:<br />
You complained about the form extending BaseGamesForm which is forcing you to unset all widgets first.<br />
You can avoid this workaround by simply building your custom form class which then extends BaseForm.</p>
<p>Arif</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
