Development

Changeset 24438

You must first sign up to be able to contribute.

Changeset 24438

Show
Ignore:
Timestamp:
11/26/09 14:05:29 (3 years ago)
Author:
hugo.hamon
Message:

[sfUnobstrusiveWidgetPlugin] removed trailing whitespaces and fixed getNbData() method for sfUoWidgetDoctrineTable component

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfUnobstrusiveWidgetPlugin/trunk/lib/widget/orm/doctrine/listing/sfUoWidgetDoctrineTable.class.php

    r21697 r24438  
    44 * This file is part of the symfony package. 
    55 * (c) Fabien Potencier <fabien.potencier@symfony-project.com> 
    6  *  
     6 * 
    77 * For the full copyright and license information, please view the LICENSE 
    88 * file that was distributed with this source code. 
     
    1919class sfUoWidgetDoctrineTable extends sfUoWidgetTable 
    2020{ 
     21  /** 
     22   * Configures the widget. 
     23   * 
     24   * @param arrya $options 
     25   * @param array $attributes 
     26   */ 
    2127  protected function configure($options = array(), $attributes = array()) 
    2228  { 
     
    2531    $this->addOption('primary_key_getter', 'getId'); 
    2632  } 
    27    
     33 
     34  /** 
     35   * Returns the number of data in the widget. 
     36   * 
     37   * @return int 
     38   */ 
    2839  public function getNbData() 
    2940  { 
    30     return $this->getOption('data')->count(); 
     41    return count($this->getOption('data')); 
    3142  } 
    32    
     43 
     44  /** 
     45   * Returns the value referenced at the object's given key. 
     46   * 
     47   * @param string $key 
     48   * @param Doctrine_Record $object 
     49   * @return mixed 
     50   */ 
    3351  protected function getKeyValue($key, $object) 
    3452  {