I'm doing a bit of a hack to get some auto-transaction control for a
set of models.  The component is doing it's thing and saving down data
correctly.  So in app_model I have:

var $transaction_models =
array('Form','FormTemplate','FormRecord','FormGridRecord','FormExtended','Chain',
'ChainDefault', 'wCase', 'Token', 'Workitem', 'EmailReminder',
'CronJob', 'User');

        function save($data) {
                $result = parent::save($data);
                if (in_array($this->name, $this->transaction_models) && 
!$result) {
                        AppController::checkTransactions();
                }
        }

The component can be called from any controller.  I cannot seem to
have access to that controller to access my Flow component like so
$this->controller->Flow->_checkTransactions(); so I use
AppController::checkTransactions(); to forward it on but that doesn't
seem to work either (although I can get to the function in
AppController).

Can anyone help shed some light on how I can do this effectively?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to