Skip to content

Instantly share code, notes, and snippets.

@raoul2000
Created May 7, 2013 12:10
Show Gist options
  • Save raoul2000/5532118 to your computer and use it in GitHub Desktop.
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
<?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