Created
September 24, 2010 13:47
-
-
Save kwylez/595396 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Example Code | |
private function _notifyGroup() { | |
$data = array(); | |
$data = $this->getForm()->getValues(); | |
/** | |
* Setup view instance to pass to notifier | |
*/ | |
$view = new Zend_View(); | |
/** | |
* Assign all form data to view property | |
*/ | |
$view->assign("formvalues", $data); | |
/** | |
* Location of view scripts | |
*/ | |
$view->addScriptPath(dirname(__FILE__).'/../../../../views'); | |
$body = $view->render('email-templates/mir.phtml'); | |
/** | |
* Custom notify class that abstracts different 'notify' methodologies. For example you can notfiy | |
* by writing to a log or email. Email can be Zend_Mail, PEAR or plain ol' php mail() | |
*/ | |
$notifier = CW_Notify::factory('mail_zend', $body, $options['email']); | |
$notifier->notify(); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment