<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Agence de Développement Informatique du Nord &#187; Symfony</title>
	<atom:link href="http://blog.adin.pro/tag/symfony/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.adin.pro</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Thu, 26 Dec 2019 08:54:31 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.1.1</generator>
	<item>
		<title>Symfony validator custom error message</title>
		<link>http://blog.adin.pro/2013-05-13/symfony-validator-custom-error-message/</link>
		<comments>http://blog.adin.pro/2013-05-13/symfony-validator-custom-error-message/#comments</comments>
		<pubDate>Mon, 13 May 2013 07:55:21 +0000</pubDate>
		<dc:creator><![CDATA[blogadmin]]></dc:creator>
				<category><![CDATA[Symfony]]></category>
		<category><![CDATA[validator]]></category>

		<guid isPermaLink="false">http://blog.adin.pro/?p=195</guid>
		<description><![CDATA[<p>If you need to customize your validator error messages, you can use the setMessage() function. On your Form class (ex: /lib/form/doctrine/DemandeForm.class.php)</p>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2013-05-13/symfony-validator-custom-error-message/">Symfony validator custom error message</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>If you need to customize your validator error messages, you can use the setMessage() function.<br />
On your Form class (ex: /lib/form/doctrine/DemandeForm.class.php)</p>
<pre class="brush: php; title: ; notranslate">
//sfValidatorInteger
$this-&gt;validatorSchema['produit_ean']-&gt;setMessage('invalid', 'ean should be integer');
$this-&gt;validatorSchema['produit_ean']-&gt;setMessage('min', 'ean must be at least %min%');
$this-&gt;validatorSchema['produit_ean']-&gt;setMessage('max', 'ean must be at least %max%');

//sfValidatorDate
$this-&gt;validatorSchema['date']-&gt;setMessage('bad_format', 'Format must be dd/mm/YYYY');
$this-&gt;validatorSchema['date']-&gt;setMessage('max', 'Date should be after than 01/01/2013');
$this-&gt;validatorSchema['date']-&gt;setMessage('min', 'Date should be before than 01/02/2013');

//required
$this-&gt;validatorSchema['date']-&gt;setMessage('required', 'Date is mandatory');

</pre>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2013-05-13/symfony-validator-custom-error-message/">Symfony validator custom error message</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adin.pro/2013-05-13/symfony-validator-custom-error-message/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Symfony 1.x propel-insert-sql   [propel-sql-exec] SQLSTATE[42000]: Syntax error or access violation: 1064</title>
		<link>http://blog.adin.pro/2013-03-01/symfony-1-x-propel-insert-sql-propel-sql-exec-sqlstate42000-syntax-error-or-access-violation-1064/</link>
		<comments>http://blog.adin.pro/2013-03-01/symfony-1-x-propel-insert-sql-propel-sql-exec-sqlstate42000-syntax-error-or-access-violation-1064/#comments</comments>
		<pubDate>Fri, 01 Mar 2013 09:43:03 +0000</pubDate>
		<dc:creator><![CDATA[blogadmin]]></dc:creator>
				<category><![CDATA[Symfony]]></category>
		<category><![CDATA[Propel]]></category>

		<guid isPermaLink="false">http://blog.adin.pro/?p=120</guid>
		<description><![CDATA[<p>You are using a old version of symfony 1.x on a new version of mysql and when you try to insert the model on your database you get this error : [propel-sql-exec] SQLSTATE[42000]: Syntax error or access violation: 1064 You &#8230; <a href="http://blog.adin.pro/2013-03-01/symfony-1-x-propel-insert-sql-propel-sql-exec-sqlstate42000-syntax-error-or-access-violation-1064/">Continue reading <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2013-03-01/symfony-1-x-propel-insert-sql-propel-sql-exec-sqlstate42000-syntax-error-or-access-violation-1064/">Symfony 1.x propel-insert-sql   [propel-sql-exec] SQLSTATE[42000]: Syntax error or access violation: 1064</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>You are using a old version of symfony 1.x on a new version of mysql and when you try to insert the model on your database you get this error :</p>
<p>[propel-sql-exec] SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &#8216;Type=InnoDB&#8217; at line 6</p>
<p>The problem come from this query</p>
<pre class="brush: bash; title: ; notranslate">
CREATE TABLE `pret_externe_type`
 (
 `id_pret_externe_type` BIGINT(20)  NOT NULL AUTO_INCREMENT,
 `libelle` VARCHAR(100)  NOT NULL,
 PRIMARY KEY (`id_pret_externe_type`)
 )Type=InnoDB
</pre>
<p>Mysql do not use &#8220;Type=&#8221; option anymore, you have to replace it by &#8220;Engine=&#8221;</p>
<pre class="brush: bash; title: ; notranslate">
CREATE TABLE `pret_externe_type`
 (
 `id_pret_externe_type` BIGINT(20)  NOT NULL AUTO_INCREMENT,
 `libelle` VARCHAR(100)  NOT NULL,
 PRIMARY KEY (`id_pret_externe_type`)
 )Engine=InnoDB
</pre>
<p>To fix it the code, on symfony 1.2 go on this file /lib/plugins/sfPropelPlugin/lib/vendor/propel-generator/classes/propel/engine/builder/sql/mysql/MysqlDDLBuilder.php and change the line 156<br />
from</p>
<pre class="brush: php; title: ; notranslate">
 $script .= &quot;Type=$mysqlTableType&quot;;
</pre>
<p>to </p>
<pre class="brush: php; title: ; notranslate">
 $script .= &quot;Engine=$mysqlTableType&quot;;
</pre>
<p>On symfony 1.4, you have to change this file : lib/vendor/symfony/lib/plugins/sfPropelPlugin/lib/vendor/propel-generator/classes/propel/engine/builder/sql/mysql/MysqlDDLBuilder.php<br />
Always on ligne 156</p>
<p>After code change, rebuild your SQL model and insert it to your databases</p>
<pre class="brush: bash; title: ; notranslate">
php symfony propel-build-sql
php symfony propel-insert-sql
</pre>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2013-03-01/symfony-1-x-propel-insert-sql-propel-sql-exec-sqlstate42000-syntax-error-or-access-violation-1064/">Symfony 1.x propel-insert-sql   [propel-sql-exec] SQLSTATE[42000]: Syntax error or access violation: 1064</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adin.pro/2013-03-01/symfony-1-x-propel-insert-sql-propel-sql-exec-sqlstate42000-syntax-error-or-access-violation-1064/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Warning: ob_start(): function &#8221; not found or invalid function name Symfony</title>
		<link>http://blog.adin.pro/2013-02-28/warning-ob_start-function-not-found-or-invalid-function-name-symfony/</link>
		<comments>http://blog.adin.pro/2013-02-28/warning-ob_start-function-not-found-or-invalid-function-name-symfony/#comments</comments>
		<pubDate>Thu, 28 Feb 2013 13:51:42 +0000</pubDate>
		<dc:creator><![CDATA[blogadmin]]></dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://blog.adin.pro/?p=116</guid>
		<description><![CDATA[<p>If you are installing a symfony 1.x project on a PHP 5.4.1 (or later) version, you may encounter this warning message : Warning: ob_start(): function &#8221; not found or invalid function name in /var/www/lib/config/sfApplicationConfiguration.class.php on line 157 Notice: ob_start(): failed &#8230; <a href="http://blog.adin.pro/2013-02-28/warning-ob_start-function-not-found-or-invalid-function-name-symfony/">Continue reading <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2013-02-28/warning-ob_start-function-not-found-or-invalid-function-name-symfony/">Warning: ob_start(): function &#8221; not found or invalid function name Symfony</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>If you are installing a symfony 1.x project on a PHP 5.4.1 (or later) version, you may encounter this warning message :<br />
Warning: ob_start(): function &#8221; not found or invalid function name in /var/www/lib/config/sfApplicationConfiguration.class.php on line 157 Notice: ob_start(): failed to create buffer in /var/www/lib/config/sfApplicationConfiguration.class.php on line 157 </p>
<p>To fix it, go on your /lib/config/sfApplicationConfiguration.class.php file and change this</p>
<pre class="brush: php; title: ; notranslate">
// compress output
    if (!self::$coreLoaded)
    {
      ob_start(sfConfig::get('sf_compressed') ? 'ob_gzhandler' : '');
    }
</pre>
<p>to this</p>
<pre class="brush: php; title: ; notranslate">
// compress output
    if (!self::$coreLoaded)
    {
      ob_start(sfConfig::get('sf_compressed') ? 'ob_gzhandler' : null);
    }
</pre>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2013-02-28/warning-ob_start-function-not-found-or-invalid-function-name-symfony/">Warning: ob_start(): function &#8221; not found or invalid function name Symfony</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adin.pro/2013-02-28/warning-ob_start-function-not-found-or-invalid-function-name-symfony/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sfWidgetFormDateJQueryUI date format</title>
		<link>http://blog.adin.pro/2013-02-07/sfwidgetformdatejqueryui-date-format/</link>
		<comments>http://blog.adin.pro/2013-02-07/sfwidgetformdatejqueryui-date-format/#comments</comments>
		<pubDate>Thu, 07 Feb 2013 13:22:52 +0000</pubDate>
		<dc:creator><![CDATA[blogadmin]]></dc:creator>
				<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://blog.adin.pro/?p=101</guid>
		<description><![CDATA[<p>You want to use the sfWidgetFormDateJQueryUI widget but you cannot configure it to display the date in your culture ? I had the same problem, and there is what I did to fix it. I start to override the sfWidgetFormDateJQueryUI &#8230; <a href="http://blog.adin.pro/2013-02-07/sfwidgetformdatejqueryui-date-format/">Continue reading <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2013-02-07/sfwidgetformdatejqueryui-date-format/">sfWidgetFormDateJQueryUI date format</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>You want to use the sfWidgetFormDateJQueryUI widget but you cannot configure it to display the date in your culture ?</p>
<p>I had the same problem, and there is what I did to fix it.</p>
<p>I start to override the sfWidgetFormDateJQueryUI class to add a &#8220;format_date&#8221; option. Add a new class here lib/widget/adinWindgetFormDateJQueryUI.class.php and override the configure fonction to add the format_date option.</p>
<pre class="brush: php; title: ; notranslate">
 protected function configure($options = array(), $attributes = array())
  {
    $this-&gt;addOption('format_date', null);
    parent::configure($options, $attributes);
  }
</pre>
<p>In the render function, format the value</p>
<pre class="brush: php; title: ; notranslate">
   if($this-&gt;getOption('format_date') != null){
        $dateFormat = new sfDateFormat();
        $value = $dateFormat-&gt;format($value, $this-&gt;getOption('format_date'));
    }
</pre>
<p>(The complete class source is at the end of this post.)</p>
<p>In your formClass, configure the widget :</p>
<pre class="brush: php; title: ; notranslate">
class DemandeForm extends BaseDemandeForm
{
    public function configure()
    {
       $this-&gt;widgetSchema['date_creation'] = new adinWidgetFormDateJQueryUI(
                array(&quot;change_month&quot; =&gt; true, 
                      &quot;change_year&quot; =&gt; true, 
                      &quot;culture&quot; =&gt; 'fr', 
                      &quot;show_button_panel&quot; =&gt; true, 
                      &quot;format_date&quot; =&gt; 'dd/MM/y' //define here format
                      )
                 );

        $this-&gt;validatorSchema['date_creation'] = new sfValidatorDate(   
                array(&quot;date_format&quot; =&gt; '~(?P&lt;day&gt;\d{2})/(?P&lt;month&gt;\d{2})/(?P&lt;year&gt;\d{4})~' , //regex,
                      &quot;date_output&quot; =&gt; &quot;Y-m-d&quot;,  //format the value after validation to send to BDD
                      &quot;required&quot; =&gt; true
                      )
                 );
    }
}
</pre>
<p>Here the complete adinWidgetFormDateJQueryUI source code</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
class adinWidgetFormDateJQueryUI extends sfWidgetFormDateJQueryUI
{
 protected function configure($options = array(), $attributes = array())
  {
    $this-&gt;addOption('format_date', null);
    parent::configure($options, $attributes);
  }

  /**
   * @param  string $name        The element name
   * @param  string $value       The date displayed in this widget
   * @param  array  $attributes  An array of HTML attributes to be merged with the default HTML attributes
   * @param  array  $errors      An array of errors for the field
   *
   * @return string An HTML tag string
   *
   * @see sfWidgetForm
   */
  public function render($name, $value = null, $attributes = array(), $errors = array())
  {
    $attributes = $this-&gt;getAttributes();

    $input = new sfWidgetFormInput(array(), $attributes);

   if($this-&gt;getOption('format_date') != null){
        $dateFormat = new sfDateFormat();
        $value = $dateFormat-&gt;format($value, $this-&gt;getOption('format_date'));
    }
    $html = $input-&gt;render($name, $value);

    $id = $input-&gt;generateId($name);
    $culture = $this-&gt;getOption('culture');
    $cm = $this-&gt;getOption(&quot;change_month&quot;) ? &quot;true&quot; : &quot;false&quot;;
    $cy = $this-&gt;getOption(&quot;change_year&quot;) ? &quot;true&quot; : &quot;false&quot;;
    $nom = $this-&gt;getOption(&quot;number_of_months&quot;);
    $sbp = $this-&gt;getOption(&quot;show_button_panel&quot;) ? &quot;true&quot; : &quot;false&quot;;

    if ($culture!='en')
    {
    $html .= &lt;&lt;&lt;EOHTML
&lt;script type=&quot;text/javascript&quot;&gt;
        $(function() {
    var params = $.datepicker.regional['$culture'];
    params.changeMonth = $cm;
    params.changeYear = $cy;
    params.numberOfMonths = $nom;
    params.showButtonPanel = $sbp;
    $(&quot;#$id&quot;).datepicker(params);
        });
&lt;/script&gt;
EOHTML;
    }
    else
    {
    $html .= &lt;&lt;&lt;EOHTML
&lt;script type=&quot;text/javascript&quot;&gt;
        $(function() {
    var params = {
    changeMonth : $cm,
    changeYear : $cy,
    numberOfMonths : $nom,
    showButtonPanel : $sbp };
    $(&quot;#$id&quot;).datepicker(params);
        });
&lt;/script&gt;
EOHTML;
    }

    return $html;
  }
}
</pre>
<p>Don&#8217;t forget to run</p>
<pre class="brush: bash; title: ; notranslate">
php symfony cc
</pre>
<p>to clear your cache and enable this new class on prod environment.</p>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2013-02-07/sfwidgetformdatejqueryui-date-format/">sfWidgetFormDateJQueryUI date format</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adin.pro/2013-02-07/sfwidgetformdatejqueryui-date-format/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Symfony The default context does not exist</title>
		<link>http://blog.adin.pro/2013-02-06/symfony-the-default-context-does-not-exist/</link>
		<comments>http://blog.adin.pro/2013-02-06/symfony-the-default-context-does-not-exist/#comments</comments>
		<pubDate>Wed, 06 Feb 2013 20:24:33 +0000</pubDate>
		<dc:creator><![CDATA[blogadmin]]></dc:creator>
				<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://blog.adin.pro/?p=97</guid>
		<description><![CDATA[<p>You may have to use in your model class or somewhere else the &#8220;context instance&#8221; in your code but when this code is used by a task, a test or data fixture, you get a &#8220;The default contect does not &#8230; <a href="http://blog.adin.pro/2013-02-06/symfony-the-default-context-does-not-exist/">Continue reading <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2013-02-06/symfony-the-default-context-does-not-exist/">Symfony The default context does not exist</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>You may have to use in your model class or somewhere else the &#8220;context instance&#8221; in your code but when this code is used by a task, a test or data fixture, you get a &#8220;The default contect does not exist&#8221; error.<br />
To avoid that, you can use the sfContext::hasInstance() fonction. See below</p>
<pre class="brush: php; title: ; notranslate">
class Demande extends BaseDemande
{
   public function save(Doctrine_Connection $con = null)
   {
       if(sfContext::hasInstance())
       {
          $id_service = sfContext::getInstance()-&gt;getUser()-&gt;getAttribute('id_service', false, 'sfMatchlib/user');        
          $this-&gt;setIdService($id_service);
        }
        parent::save($con);
    }
}
</pre>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2013-02-06/symfony-the-default-context-does-not-exist/">Symfony The default context does not exist</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adin.pro/2013-02-06/symfony-the-default-context-does-not-exist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>unexpected extra form field named</title>
		<link>http://blog.adin.pro/2013-01-25/unexpected-extra-form-field-named/</link>
		<comments>http://blog.adin.pro/2013-01-25/unexpected-extra-form-field-named/#comments</comments>
		<pubDate>Fri, 25 Jan 2013 19:48:28 +0000</pubDate>
		<dc:creator><![CDATA[blogadmin]]></dc:creator>
				<category><![CDATA[Symfony]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[validator]]></category>

		<guid isPermaLink="false">http://blog.adin.pro/?p=89</guid>
		<description><![CDATA[<p>You had an unbound input in your form and Symfony throw you an &#8220;unexpected extra form field named &#8216;yourfield'&#8221; error ? Don&#8217;t worry, add a sfValitorPass() in your form description :</p>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2013-01-25/unexpected-extra-form-field-named/">unexpected extra form field named</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>You had an unbound input in your form and Symfony throw you an &#8220;unexpected extra form field named &#8216;yourfield'&#8221; error ?</p>
<p>Don&#8217;t worry, add a sfValitorPass() in your form description :</p>
<pre class="brush: php; title: ; notranslate">
class DemandeForm extends BaseDemandeForm
{
   public function configure()
   {
        $this-&gt;validatorSchema['yourfield'] = new sfValidatorPass();
   }
</pre>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2013-01-25/unexpected-extra-form-field-named/">unexpected extra form field named</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adin.pro/2013-01-25/unexpected-extra-form-field-named/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Symfony 1.4 format date doctrine object</title>
		<link>http://blog.adin.pro/2013-01-07/symfony-1-4-format-date-doctrine-object/</link>
		<comments>http://blog.adin.pro/2013-01-07/symfony-1-4-format-date-doctrine-object/#comments</comments>
		<pubDate>Mon, 07 Jan 2013 10:00:00 +0000</pubDate>
		<dc:creator><![CDATA[blogadmin]]></dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://blog.adin.pro/?p=79</guid>
		<description><![CDATA[<p>To format a date from a doctrine object, you can use this code, quick and easy. Sometimes, this first solution return current date even if the doctrine record is null. You then have to use this other solution You can &#8230; <a href="http://blog.adin.pro/2013-01-07/symfony-1-4-format-date-doctrine-object/">Continue reading <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2013-01-07/symfony-1-4-format-date-doctrine-object/">Symfony 1.4 format date doctrine object</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>To format a date from a doctrine object, you can use this code, quick and easy.</p>
<pre class="brush: php; title: ; notranslate">
$demande-&gt;getDateTimeObject('date_creation')-&gt;format('d/m/Y');
</pre>
<p>Sometimes, this first solution return current date even if the doctrine record is null.<br />
You then have to use this other solution</p>
<pre class="brush: php; title: ; notranslate">
use_helper('Date');
format_date($demande-&gt;getDateCreation(), 'dd-MM-yyyy');
</pre>
<p>You can found format rules <a href="http://trac.symfony-project.org/wiki/formatDateHowTo" target="_blank">here</a></p>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2013-01-07/symfony-1-4-format-date-doctrine-object/">Symfony 1.4 format date doctrine object</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adin.pro/2013-01-07/symfony-1-4-format-date-doctrine-object/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ckWebServicePlugin empty params</title>
		<link>http://blog.adin.pro/2012-12-21/ckwebserviceplugin-empty-params/</link>
		<comments>http://blog.adin.pro/2012-12-21/ckwebserviceplugin-empty-params/#comments</comments>
		<pubDate>Fri, 21 Dec 2012 14:01:23 +0000</pubDate>
		<dc:creator><![CDATA[blogadmin]]></dc:creator>
				<category><![CDATA[Symfony]]></category>
		<category><![CDATA[ckWebServicePlugin]]></category>

		<guid isPermaLink="false">http://blog.adin.pro/?p=75</guid>
		<description><![CDATA[<p>You are using Symfony and the ckWebServicePlugin but in your action method you can&#8217;t access params value ? They are desperately empty ? This may due to a configuration issue, in your apps/config/filters.yml, it is important to put the soap_parameter &#8230; <a href="http://blog.adin.pro/2012-12-21/ckwebserviceplugin-empty-params/">Continue reading <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2012-12-21/ckwebserviceplugin-empty-params/">ckWebServicePlugin empty params</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>You are using Symfony and the ckWebServicePlugin but in your action method you can&#8217;t access params value ? They are desperately empty ?</p>
<p>This may due to a configuration issue, in your apps/config/filters.yml, it is important to put the soap_parameter before the cache and execution parameters</p>
<p>doesn&#8217;t work</p>
<pre class="brush: bash; title: ; notranslate">
# You can find more information about this file on the symfony website:
# http://www.symfony-project.org/reference/1_4/en/12-Filters

rendering: ~
security:  ~

# insert your own filters here

cache:     ~
execution: ~

soap_parameter:
  class: ckSoapParameterFilter
  param:
    condition: %APP_ENABLE_SOAP_PARAMETER%

</pre>
<p>works</p>
<pre class="brush: bash; title: ; notranslate">
# You can find more information about this file on the symfony website:
# http://www.symfony-project.org/reference/1_4/en/12-Filters

rendering: ~
security:  ~

# insert your own filters here
soap_parameter:
  class: ckSoapParameterFilter
  param:
    condition: %APP_ENABLE_SOAP_PARAMETER%

cache:     ~
execution: ~
</pre>
<p>It looks weird but it works for me.</p>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2012-12-21/ckwebserviceplugin-empty-params/">ckWebServicePlugin empty params</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adin.pro/2012-12-21/ckwebserviceplugin-empty-params/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Symfony 1.4 in which module / action am I ?</title>
		<link>http://blog.adin.pro/2012-12-18/symfony-1-4-in-which-module-action-am-i/</link>
		<comments>http://blog.adin.pro/2012-12-18/symfony-1-4-in-which-module-action-am-i/#comments</comments>
		<pubDate>Tue, 18 Dec 2012 15:14:30 +0000</pubDate>
		<dc:creator><![CDATA[blogadmin]]></dc:creator>
				<category><![CDATA[Symfony]]></category>

		<guid isPermaLink="false">http://blog.adin.pro/?p=70</guid>
		<description><![CDATA[<p>Sometimes you need to know in which module or action you are, here the code to know it</p>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2012-12-18/symfony-1-4-in-which-module-action-am-i/">Symfony 1.4 in which module / action am I ?</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Sometimes you need to know in which module or action you are, here the code to know it</p>
<pre class="brush: php; title: ; notranslate">
sfContext::getInstance()-&gt;getModuleName();
sfContext::getInstance()-&gt;getActionName();
</pre>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2012-12-18/symfony-1-4-in-which-module-action-am-i/">Symfony 1.4 in which module / action am I ?</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adin.pro/2012-12-18/symfony-1-4-in-which-module-action-am-i/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Symfony 1.4 display an array in templates</title>
		<link>http://blog.adin.pro/2012-12-03/symfony-1-4-display-an-array-in-templates/</link>
		<comments>http://blog.adin.pro/2012-12-03/symfony-1-4-display-an-array-in-templates/#comments</comments>
		<pubDate>Mon, 03 Dec 2012 08:27:57 +0000</pubDate>
		<dc:creator><![CDATA[blogadmin]]></dc:creator>
				<category><![CDATA[Symfony]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[print_r]]></category>

		<guid isPermaLink="false">http://blog.adin.pro/?p=48</guid>
		<description><![CDATA[<p>You need to use an array in your template but this array is transform as an object by symfony. in your actions/actions.class.php in your template template/choixSuccess.php This is what you get : sfOutputEscaperArrayDecorator Object ( [count:sfOutputEscaperArrayDecorator:private] => 7 [value:protected] => &#8230; <a href="http://blog.adin.pro/2012-12-03/symfony-1-4-display-an-array-in-templates/">Continue reading <span class="meta-nav">&#8594;</span></a></p>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2012-12-03/symfony-1-4-display-an-array-in-templates/">Symfony 1.4 display an array in templates</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>You need to use an array in your template but this array is transform as an object by symfony.</p>
<p>in your actions/actions.class.php</p>
<pre class="brush: php; title: ; notranslate">
public function executeChoix(sfWebRequest $request)
{
        $this-&gt;nom_jour = array('Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi' , 'Samedi');
}
</pre>
<p>in your template template/choixSuccess.php</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php print_r($nom_jour); ?&gt;
</pre>
<p>This is what you get :<br />
sfOutputEscaperArrayDecorator Object ( [count:sfOutputEscaperArrayDecorator:private] => 7 [value:protected] => Array ( [0] => Dimanche [1] => Lundi [2] => Mardi [3] => Mercredi [4] => Jeudi [5] => Vendredi [6] => Samedi ) [escapingMethod:protected] => esc_specialchars ) </p>
<p>To display a proper array, use</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php print_r($sf_data-&gt;getRaw('nom_jour')); ?&gt;
</pre>
<p>You get the classic print_r render :<br />
Array ( [0] => Dimanche [1] => Lundi [2] => Mardi [3] => Mercredi [4] => Jeudi [5] => Vendredi [6] => Samedi )</p>
<p>The post <a rel="nofollow" href="http://blog.adin.pro/2012-12-03/symfony-1-4-display-an-array-in-templates/">Symfony 1.4 display an array in templates</a> appeared first on <a rel="nofollow" href="http://blog.adin.pro">Agence de Développement Informatique du Nord</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.adin.pro/2012-12-03/symfony-1-4-display-an-array-in-templates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
