Skip to content
This repository was archived by the owner on Nov 28, 2018. It is now read-only.

Branch logic at first step doesn't work #5

Open
yarkm13 opened this issue Aug 11, 2011 · 0 comments
Open

Branch logic at first step doesn't work #5

yarkm13 opened this issue Aug 11, 2011 · 0 comments

Comments

@yarkm13
Copy link

yarkm13 commented Aug 11, 2011

Is it impossible to use branch mechanism at first step?

I can't figure out how to do it. I just need to skip first step in particular condotion.

My variants:

public function beforeFilter() {
    $this->Wizard->steps = array(array('childs' => array('child')), 'details', 'template', 'invite', 'message');
    $this->Wizard->defaultBranch = false;
}


public function wizard($step = null) {
    $this->Wizard->branch('childs', true);
    $this->Wizard->process($step); 
} 

Doesn't work. (error incorrect step. But if i returns to /wizard all goes correctly)

public function beforeFilter() {
    $this->Wizard->steps = array(array('family' => array('details'), 'childs' => array('child', 'details')), 'template', 'invite', 'message');
    //$this->Wizard->defaultBranch = false;
}

doesnt work after adding

public function wizard($step = null) {
    $this->Wizard->branch('childs');
    $this->Wizard->process($step); 
} 

but works without $this->Wizard->branch('childs');

How can i got this work?

bancer referenced this issue in bancer/cakephp-wizard Nov 24, 2016
Updated callback method signatures, visibility keywords (protected)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant