/** * Send notifcations. * * @param array $rule the rule * @param FireGento_Logger_Model_Db_Entry $loggerEntry the db entry */ protected function _sendNotification($rule, $loggerEntry) { /** @var Mage_Core_Model_Email_Template $template */ $template = Mage::getModel('core/email_template')->loadDefault('firegento_logger_notification_email_template'); $email = Mage::getStoreConfig('trans_email/ident_general/email'); $name = Mage::getStoreConfig('trans_email/ident_general/name'); $template->setData('sender_name', $name)->setData('sender_email', $email); $variables = array('loggerentry_url' => Mage::getUrl('adminhtml/logger/view', array('loggerentry_id' => $loggerEntry->getId())), 'loggerentry' => $loggerEntry); $recipientsCsv = $rule['email_list_csv']; $recipients = array_map('trim', explode(",", $recipientsCsv)); $template->send($recipients, null, $variables); }
/** * Get the current row url * * @param FireGento_Logger_Model_Db_Entry $item the entry * * @return string */ public function getRowUrl($item) { return $this->getUrl('*/*/view', array('loggerentry_id' => $item->getId())); }