Prado\Web\UI\WebControls\TWizard::getStepType PHP Méthode

getStepType() protected méthode

Determines the type of the specified wizard step.
protected getStepType ( $wizardStep ) : TWizardStepType
Résultat TWizardStepType type of the step
    protected function getStepType($wizardStep)
    {
        if (($type = $wizardStep->getStepType()) === TWizardStepType::Auto) {
            $steps = $this->getWizardSteps();
            if (($index = $steps->indexOf($wizardStep)) >= 0) {
                $stepCount = $steps->getCount();
                if ($stepCount === 1 || $index < $stepCount - 1 && $steps->itemAt($index + 1)->getStepType() === TWizardStepType::Complete) {
                    return TWizardStepType::Finish;
                } else {
                    if ($index === 0) {
                        return TWizardStepType::Start;
                    } else {
                        if ($index === $stepCount - 1) {
                            return TWizardStepType::Finish;
                        } else {
                            return TWizardStepType::Step;
                        }
                    }
                }
            } else {
                return $type;
            }
        } else {
            return $type;
        }
    }
TWizard