How to use the StateChanged event? #215
codesinging
started this conversation in
Ideas
Replies: 2 comments
-
Please add an example |
Beta Was this translation helpful? Give feedback.
0 replies
-
I recently added this (see #237). Now you can do the following to register your custom event: abstract class PaymentState extends State
{
abstract public function color(): string;
public static function config(): StateConfig
{
return parent::config()
->stateChangedEvent(CustomStateChanged::class)
;
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How to customize the state changed event?
Suggest to add configuration to set custom StateChanged event class.
Beta Was this translation helpful? Give feedback.
All reactions