/** * * @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; }