<?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"
	>
<channel>
	<title>Komentarze do wpisu: Symfony 1.2 - sfForm - Yet another useful function</title>
	<atom:link href="http://blog.adryjanek.eu/2008/12/12/symfony-12-sfform-yet-another-useful-function/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.adryjanek.eu/2008/12/12/symfony-12-sfform-yet-another-useful-function/</link>
	<description>Kamil Adryjanek - projektowanie aplikacji internetowych</description>
	<pubDate>Sat, 31 Jul 2010 09:54:51 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>Przez: Kamil Adryjanek</title>
		<link>http://blog.adryjanek.eu/2008/12/12/symfony-12-sfform-yet-another-useful-function/#comment-6989</link>
		<dc:creator>Kamil Adryjanek</dc:creator>
		<pubDate>Sun, 30 Aug 2009 19:11:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.adryjanek.eu/?p=14#comment-6989</guid>
		<description>@krishan:
My mistake, cheers.</description>
		<content:encoded><![CDATA[<p>@krishan:<br />
My mistake, cheers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Przez: krishan gopal</title>
		<link>http://blog.adryjanek.eu/2008/12/12/symfony-12-sfform-yet-another-useful-function/#comment-6900</link>
		<dc:creator>krishan gopal</dc:creator>
		<pubDate>Fri, 28 Aug 2009 07:14:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.adryjanek.eu/?p=14#comment-6900</guid>
		<description>I believe this function is better after adding following line :)

$tmp = array();</description>
		<content:encoded><![CDATA[<p>I believe this function is better after adding following line <img src='http://blog.adryjanek.eu/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
$tmp = array();</p>
]]></content:encoded>
	</item>
	<item>
		<title>Przez: Create a pictures gallery with symfony in the admin &#171; Guide pour le framework Symfony</title>
		<link>http://blog.adryjanek.eu/2008/12/12/symfony-12-sfform-yet-another-useful-function/#comment-6575</link>
		<dc:creator>Create a pictures gallery with symfony in the admin &#171; Guide pour le framework Symfony</dc:creator>
		<pubDate>Tue, 18 Aug 2009 18:32:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.adryjanek.eu/?p=14#comment-6575</guid>
		<description>[...] used a method which allows to unset all fields of a form except one. I found it on the following  article but I write the code again since it was in a comment for Doctrine users  //in lib/form/doctrine [...]</description>
		<content:encoded><![CDATA[<p>[...] used a method which allows to unset all fields of a form except one. I found it on the following  article but I write the code again since it was in a comment for Doctrine users  //in lib/form/doctrine [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Przez: ymfony 1.2 - sfForm - unsetAllExcept - better way &#124; Projektant - Programista PHP</title>
		<link>http://blog.adryjanek.eu/2008/12/12/symfony-12-sfform-yet-another-useful-function/#comment-3991</link>
		<dc:creator>ymfony 1.2 - sfForm - unsetAllExcept - better way &#124; Projektant - Programista PHP</dc:creator>
		<pubDate>Mon, 15 Jun 2009 17:27:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.adryjanek.eu/?p=14#comment-3991</guid>
		<description>[...] kind of update of function: unsetAllExcept. Lately I had a problem with unsetting some default widgets. Using for example propel and relations [...]</description>
		<content:encoded><![CDATA[<p>[...] kind of update of function: unsetAllExcept. Lately I had a problem with unsetting some default widgets. Using for example propel and relations [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Przez: Duane Gran</title>
		<link>http://blog.adryjanek.eu/2008/12/12/symfony-12-sfform-yet-another-useful-function/#comment-3172</link>
		<dc:creator>Duane Gran</dc:creator>
		<pubDate>Tue, 26 May 2009 01:41:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.adryjanek.eu/?p=14#comment-3172</guid>
		<description>FYI... another implementation of this idea is at:

http://www.devexp.eu/?p=706

I found the above link helpful because it worked across embedded forms whereas I found the solution proposed here to only unset fields in the form in context.</description>
		<content:encoded><![CDATA[<p>FYI&#8230; another implementation of this idea is at:</p>
<p><a href="http://www.devexp.eu/?p=706" onclick="javascript:pageTracker._trackPageview('/outbound/comment/www.devexp.eu');" rel="nofollow">http://www.devexp.eu/?p=706</a></p>
<p>I found the above link helpful because it worked across embedded forms whereas I found the solution proposed here to only unset fields in the form in context.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Przez: Symfony 1.2 multipage form - wizard &#124; Projektant - Programista PHP</title>
		<link>http://blog.adryjanek.eu/2008/12/12/symfony-12-sfform-yet-another-useful-function/#comment-707</link>
		<dc:creator>Symfony 1.2 multipage form - wizard &#124; Projektant - Programista PHP</dc:creator>
		<pubDate>Tue, 24 Mar 2009 21:52:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.adryjanek.eu/?p=14#comment-707</guid>
		<description>[...] To create our forms we will use unsetAllExcept function introduced here. [...]</description>
		<content:encoded><![CDATA[<p>[...] To create our forms we will use unsetAllExcept function introduced here. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Przez: ramblings &#187; removing all fields from a symfony form</title>
		<link>http://blog.adryjanek.eu/2008/12/12/symfony-12-sfform-yet-another-useful-function/#comment-527</link>
		<dc:creator>ramblings &#187; removing all fields from a symfony form</dc:creator>
		<pubDate>Mon, 09 Mar 2009 18:48:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.adryjanek.eu/?p=14#comment-527</guid>
		<description>[...] process of removing close to 200 fields from a form.  I came across Kamil Adryjanek&#8217;s blog which showed how to code a great little function to remove all the fields from a form except the [...]</description>
		<content:encoded><![CDATA[<p>[...] process of removing close to 200 fields from a form.  I came across Kamil Adryjanek&#8217;s blog which showed how to code a great little function to remove all the fields from a form except the [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Przez: patrick</title>
		<link>http://blog.adryjanek.eu/2008/12/12/symfony-12-sfform-yet-another-useful-function/#comment-526</link>
		<dc:creator>patrick</dc:creator>
		<pubDate>Mon, 09 Mar 2009 18:28:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.adryjanek.eu/?p=14#comment-526</guid>
		<description>Thank you so much, you're the first result on google for 'unset all form variables'.  

You've saved me alot of work, I have some tables in my db that are 200 columns, and only 4-5 columns are going to be editable by the end user.</description>
		<content:encoded><![CDATA[<p>Thank you so much, you&#8217;re the first result on google for &#8216;unset all form variables&#8217;.  </p>
<p>You&#8217;ve saved me alot of work, I have some tables in my db that are 200 columns, and only 4-5 columns are going to be editable by the end user.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Przez: Symfony 1.2 - sfForm - Yet another useful function, part 2 &#124; Projektant - Programista PHP</title>
		<link>http://blog.adryjanek.eu/2008/12/12/symfony-12-sfform-yet-another-useful-function/#comment-26</link>
		<dc:creator>Symfony 1.2 - sfForm - Yet another useful function, part 2 &#124; Projektant - Programista PHP</dc:creator>
		<pubDate>Sat, 17 Jan 2009 13:25:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.adryjanek.eu/?p=14#comment-26</guid>
		<description>[...] couple of weeks ago i have shown you really useful example about unsetting sfForm fields - unsetAllExcept. Since that i was palying with sfForm and i found more functions that could help you working with [...]</description>
		<content:encoded><![CDATA[<p>[...] couple of weeks ago i have shown you really useful example about unsetting sfForm fields - unsetAllExcept. Since that i was palying with sfForm and i found more functions that could help you working with [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Przez: Caponica</title>
		<link>http://blog.adryjanek.eu/2008/12/12/symfony-12-sfform-yet-another-useful-function/#comment-16</link>
		<dc:creator>Caponica</dc:creator>
		<pubDate>Fri, 02 Jan 2009 22:40:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.adryjanek.eu/?p=14#comment-16</guid>
		<description>Great idea and would be great to see this in the Symfony code base.

For Doctrine I have modified your code and now use this:

  public function unsetAllExcept($keepFields = array()) {
    foreach($this as $key =&#62; $value) $baseFields[]=$key;
    $temp = array_diff($baseFields, $keepFields);
    foreach ($temp as $unsetField) unset($this[$unsetField]);
  }

Thanks for the inspiration!


C</description>
		<content:encoded><![CDATA[<p>Great idea and would be great to see this in the Symfony code base.</p>
<p>For Doctrine I have modified your code and now use this:</p>
<p>  public function unsetAllExcept($keepFields = array()) {<br />
    foreach($this as $key =&gt; $value) $baseFields[]=$key;<br />
    $temp = array_diff($baseFields, $keepFields);<br />
    foreach ($temp as $unsetField) unset($this[$unsetField]);<br />
  }</p>
<p>Thanks for the inspiration!</p>
<p>C</p>
]]></content:encoded>
	</item>
</channel>
</rss>
