Author: chrodriguez
Date: 2010-03-04 01:48:48 +0100 (Thu, 04 Mar 2010)
New Revision: 28373

Modified:
   plugins/dcPropelReportsPlugin/trunk/lib/dcPropelReportColumnWrapper.class.php
Log:
Update event handling

Modified: 
plugins/dcPropelReportsPlugin/trunk/lib/dcPropelReportColumnWrapper.class.php
===================================================================
--- 
plugins/dcPropelReportsPlugin/trunk/lib/dcPropelReportColumnWrapper.class.php   
    2010-03-03 22:49:20 UTC (rev 28372)
+++ 
plugins/dcPropelReportsPlugin/trunk/lib/dcPropelReportColumnWrapper.class.php   
    2010-03-04 00:48:48 UTC (rev 28373)
@@ -28,29 +28,31 @@
 
        public function getValue($format = 'HTML')
        {
-           $res     = $this->value;
-           $event = null;
+    $res     = $this->value;
+    $event = null;
 
-            $event = $this->createEvent($format);                              
              // Creo el evento
-           
sfContext::getInstance()->getConfiguration()->getEventDispatcher()->filter($event,
 $this->value);  // Levanto la señal
-           $res   = $event->getReturnValue();                                  
      // Obtengo el valor modificado
-           
-           if (is_null($event) || (!$event->isProcessed() && !empty($value)))
-           {
-             // Si el evento no se procesó, obtengo el valor normalmente
-             $res = $this->value;
-           }
-           return $res;                
+    $event = $this->createEvent($format); // Creo el evento
+    
sfContext::getInstance()->getConfiguration()->getEventDispatcher()->filter($event,
 $this->value);  // Levanto la señal
+    $res   = $event->getReturnValue(); // Obtengo el valor modificado
+    
+    if (is_null($event) || (!$event->isProcessed() && !empty($value)))
+    {
+      // Si el evento no se procesó, obtengo el valor normalmente
+      $res = $this->value;
+    }
+    return $res;               
        }
 
 
-        protected function createEvent($format)
-        {
-           return new sfEvent(
-             $this,                                                           
// Objeto que levanto la señal
-             
'dc_propel_report_query_'.$format.'_'.$this->field->getDcReportQuery()->getNameSlug().'_'.$this->field->getRealColumnName(),
            // Nombre de la señal
-             array('fieldName' => $this->field->__toString())                  
    // Lista de parámetros
-           );
+  protected function createEvent($format)
+  {
+    return new sfEvent(
+      $this,                            // Objeto que levanto la señal
+      'dc_propel_report.render_value',  // Nombre de la señan
+      array(                            // Lista de parámetros
+        'format'    => $format,
+        'field' => $this->field) 
+    );
        }
 
 }

-- 
You received this message because you are subscribed to the Google Groups 
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-svn?hl=en.

Reply via email to