Public Member Functions | |
_construct () | |
addPollFilter ($pollId) | |
countPercent ($pollObject) |
Definition at line 32 of file Collection.php.
_construct | ( | ) |
Initialization here
Reimplemented from Mage_Core_Model_Mysql4_Collection_Abstract.
Definition at line 34 of file Collection.php.
00035 { 00036 $this->_init('poll/poll_answer'); 00037 }
addPollFilter | ( | $ | pollId | ) |
Definition at line 39 of file Collection.php.
00040 { 00041 $this->getSelect()->where("poll_id IN(?) ", $pollId); 00042 return $this; 00043 }
countPercent | ( | $ | pollObject | ) |
Definition at line 45 of file Collection.php.
00046 { 00047 if( !$pollObject ) { 00048 return; 00049 } else { 00050 foreach( $this->getItems() as $answer ) { 00051 $answer->countPercent($pollObject); 00052 } 00053 } 00054 return $this; 00055 }