Created
March 30, 2012 01:31
-
-
Save heptat/2245579 to your computer and use it in GitHub Desktop.
update
This file contains hidden or 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 | |
static::applyFilter('save', function($self, $params, $chain) { | |
// TODO if they are applying for concession, write this to the mysql_ | |
// "registrations" table | |
$data = $params['entity']->data(); | |
if ($data['registration_fee_type'] == 'concession') { | |
$registration = Registrations::first(array('conditions' => array('id' => $data['registration_id']))); | |
$registration->concession_applied_for = 1; | |
$registration->save(null, array('validate' => false)); | |
} | |
$data = $chain->next($self, $params, $chain); | |
return $data; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment