Changeset 24438
- Timestamp:
- 11/26/09 14:05:29 (3 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfUnobstrusiveWidgetPlugin/trunk/lib/widget/orm/doctrine/listing/sfUoWidgetDoctrineTable.class.php
r21697 r24438 4 4 * This file is part of the symfony package. 5 5 * (c) Fabien Potencier <fabien.potencier@symfony-project.com> 6 * 6 * 7 7 * For the full copyright and license information, please view the LICENSE 8 8 * file that was distributed with this source code. … … 19 19 class sfUoWidgetDoctrineTable extends sfUoWidgetTable 20 20 { 21 /** 22 * Configures the widget. 23 * 24 * @param arrya $options 25 * @param array $attributes 26 */ 21 27 protected function configure($options = array(), $attributes = array()) 22 28 { … … 25 31 $this->addOption('primary_key_getter', 'getId'); 26 32 } 27 33 34 /** 35 * Returns the number of data in the widget. 36 * 37 * @return int 38 */ 28 39 public function getNbData() 29 40 { 30 return $this->getOption('data')->count();41 return count($this->getOption('data')); 31 42 } 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 */ 33 51 protected function getKeyValue($key, $object) 34 52 {