Created
May 7, 2013 12:10
-
-
Save raoul2000/5532118 to your computer and use it in GitHub Desktop.
Initializing the simpleWorkflow behavior with 'transitionBeforeSave' set to false, will make all transition being fired AFTER the owner model is actually saved
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 | |
class User extends CActiveRecord | |
{ | |
public function behaviors() | |
{ | |
return array( | |
'swBehavior' => array( | |
'class' => 'application.extensions.simpleWorkflow.SWActiveRecordBehavior', | |
// add following initialisation | |
'transitionBeforeSave' => false | |
) | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment