Example #1
0
 /**
  *	Retrievs a list of moderated barcode groupped by moderator and moderation type
  *
  *	@return hash<moderator_id:moderation_type:quantity>
  **/
 public function getModerationLog($from, $to)
 {
     $result = array();
     foreach ($this->_mapper->getModerationLog()->filter('mdate >= ? and mdate <= ?', $from . ' 00:00:00', $to . ' 23:59:59')->sort('moderated') as $row) {
         if (!isset($result[$row->moderator_id])) {
             $result[$row->moderator_id] = array();
         }
         $result[$row->moderator_id][$row->moderated] = $row->qty;
     }
     return $result;
 }