Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the difference between -state and state #147

Open
ryuuyq opened this issue Mar 25, 2019 · 2 comments
Open

the difference between -state and state #147

ryuuyq opened this issue Mar 25, 2019 · 2 comments

Comments

@ryuuyq
Copy link

ryuuyq commented Mar 25, 2019

below,there is 'from' => '-proposed' and 'from' => 'proposed'.

what is the difference ?

    'callbacks' => array(
        'before' => array(
            array(
                'from' => '-proposed',
                'do' => function(Finite\StatefulInterface $document, \Finite\Event\TransitionEvent $e) {
                    echo 'Applying transition '.$e->getTransition()->getName(), "\n";
                }
            ),
            array(
                'from' => 'proposed',
                'do' => function() {
                    echo 'Applying transition from proposed state', "\n";
                }
            )
        ),
        'after' => array(
            array(
                'to' => array('accepted'), 'do' => array($document, 'display')
            )
        )
    )
@imzeali
Copy link

imzeali commented Apr 10, 2019

image

@tsmgeek
Copy link

tsmgeek commented Apr 12, 2019

Just need some more clarification.

It will apply to all states except that one mentioned?
If so how do you add multiple exclusions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants