コード例 #1
0
 /**
  * 
  * @return Aitoc_Aitsys_Model_Mysql4_Notification_Collection
  */
 public function getNewCollection()
 {
     if (!$this->_newCollection) {
         $this->_newCollection = Mage::getResourceModel('aitsys/notification_collection');
         $this->_newCollection->addNotViewedFilter();
     }
     return $this->_newCollection;
 }
コード例 #2
0
 /**
  * 
  * @param Aitoc_Aitsys_Model_Mysql4_Notification_Collection $collection
  * @return Aitoc_Aitsys_Model_Mysql4_Notification
  */
 public function markAsViewed(Aitoc_Aitsys_Model_Mysql4_Notification_Collection $collection)
 {
     $this->_getWriteAdapter()->update($this->getMainTable(), array('viewed' => 1), $this->_getWriteAdapter()->quoteInto('entity_id IN(?)', $collection->getAllIds()));
     return $this;
 }