src/Wizard.php
public function addStep($name, $callback)
    {
        $step = $this->factory([
            'Step',
            'wizard'  => $this,
            'template'=> clone $this->stepTemplate,
            'sequence'=> count($this->steps),
        ], $name);

        // add tabs menu item
        $this->steps[] = $this->add($step, 'Step');

        if (!$this->stepCallback->triggered()) {
            $_GET[$this->stepCallback->urlTrigger] = 0;
        }

        if ($step->sequence == $this->currentStep) {
            $step->addClass('active');

            $this->stepCallback->set($callback, [$this]);
        } elseif ($step->sequence < $this->currentStep) {
            $step->addClass('completed');
        }

        if ($step->icon == null) {
            $step->icon = $this->defaultIcon;
        }

        return $step;
    }
public function addStep($name, $callback)
    {
        $step = $this->factory([
            'Step',
            'wizard'  => $this,
            'template'=> clone $this->stepTemplate,
            'sequence'=> count($this->steps),
        ], $name);

        // add tabs menu item
        $this->steps[] = $this->add($step, 'Step');

        if (!$this->stepCallback->triggered()) {
            $_GET[$this->stepCallback->urlTrigger] = 0;
        }

        if ($step->sequence == $this->currentStep) {
            $step->addClass('active');

            $this->stepCallback->set($callback, [$this]);
        } elseif ($step->sequence < $this->currentStep) {
            $step->addClass('completed');
        }

        if ($step->icon == null) {
            $step->icon = $this->defaultIcon;
        }

        return $step;
    }
public function addStep ( $ name , $ callback ) { $ step = $ this -> factory ( [ 'Step' , 'wizard' => $ this , 'template' => clone $ this -> stepTemplate , 'sequence' => count ( $ this -> steps ) , ] , $ name ) ; // add tabs menu item $ this -> steps [ ] = $ this -> add ( $ step , 'Step' ) ; if ( ! $ this -> stepCallback -> triggered ( ) ) { $ _GET [ $ this -> stepCallback -> urlTrigger ] = 0 ; } if ( $ step -> sequence == $ this -> currentStep ) { $ step -> addClass ( 'active' ) ; $ this -> stepCallback -> set ( $ callback , [ $ this ] ) ; } elseif ( $ step -> sequence < $ this -> currentStep ) { $ step -> addClass ( 'completed' ) ; } if ( $ step -> icon == null ) { $ step -> icon = $ this -> defaultIcon ; } return $ step ; }
Adds step to the wizard.

@param mixed $name     Name of tab or Tab object
@param mixed $callback Optional callback action or URL (or array with url + parameters)

@return View
Adds step to the wizard .