Check if the step is in the future

@param                        $step
@param CheckoutStepController $controller

@return bool
177854
private static function inFuture($step, CheckoutStepController $controller)
    {
        $currentStep = $controller->getURLParams()['Action'];
        return self::getStepIndex($step) > self::getStepIndex($currentStep);
    }
789728
public function hasCustomController()
    {
        $controllerName = ucfirst(str_replace('post_', '', $this->slug));
        if(File::exists(Theme::getPath().'/controllers/'.$controllerName.'Controller.php')) {
            return true;
        }
        return false;
    }
676260
public function step($step = null)
    {
        if (isset($step)) {
            $this->step = $step;
            return $this;
        } else {
            return $this->step;
        }
    }
934551
public function previous($step = 1)
    {
        return $this->siblings(
            array_search($this, $this->parent->filters(), true) - $step
        );
    }
653797
private function isStepMatch(StepNode $step, $filterString)
    {
        if ('/' === $filterString[0]) {
            return 1 === preg_match($filterString, $step->getText());
        }

        return false !== mb_strpos($step->getText(), $filterString, 0, 'utf8');
    }
391901
protected function redirectToStep( $step )
    {
        $routeMatch = $this->getEvent()
                           ->getRouteMatch();

        return $this->redirect()
                    ->toRoute( $routeMatch->getMatchedRouteName(),
                               ArrayUtils::merge(
                                   $routeMatch->getParams(),
                                   array( 'step' => $step )
                               ) );
    }
903303
public function isAllowedParams(?string $controller = null, ?string $action = null, ?string $role = null): bool
    {
        return $this->isAllowed($role, $this->buildResource($controller, $action));
    }
823686
protected function _isAllowed(Controller $controller)
    {
        $action = strtolower($controller->getRequest()->getParam('action'));

        return in_array($action, array_map('strtolower', $this->allowedActions));
    }
911182
function nextStep()
    {
        if ( $this->metaData( 'current_stage' ) == eZWizardBase::STAGE_PRE )
        {
            $this->setMetaData( 'current_stage', eZWizardBase::STAGE_POST );
        }
        else
        {
            $this->setMetaData( 'current_stage', eZWizardBase::STAGE_PRE );
            $this->setMetaData( 'current_step', $this->metaData( 'current_step' ) + 1 );

            return $this->Module->redirectTo( $this->WizardURL );
        }

        $this->savePersistentData();
    }
891418
private boolean validSecondStep(LegStep secondStep, RouteProgress routeProgress) {
    return routeProgress.currentLegProgress().upComingStep() != null
      && routeProgress.currentLegProgress().upComingStep().equals(secondStep);
  }
692938
public function removeStep(Step $step)
    {
        if ($this->steps->contains($step)) {
            $this->steps->removeElement($step);
        }

        return $this;
    }
133211
protected void maybeBuildAndSetRetryManager(AbstractDraweeController controller) {
    if (!mTapToRetryEnabled) {
      return;
    }
    controller.getRetryManager().setTapToRetryEnabled(mTapToRetryEnabled);
    maybeBuildAndSetGestureDetector(controller);
  }
916303
public function need_confirm_regrading($controller) {
        $data = $this->get_data();
        if (isset($data->rubric['regrade'])) {
            // we have already displayed the confirmation on the previous step
            return false;
        }
        if (!isset($data->saverubric) || !$data->saverubric) {
            // we only need confirmation when button 'Save rubric' is pressed
            return false;
        }
        if (!$controller->has_active_instances()) {
            // nothing to re-grade, confirmation not needed
            return false;
        }
        $changelevel = $controller->update_or_check_rubric($data);
        if ($changelevel == 0) {
            // no changes in the rubric, no confirmation needed
            return false;
        }

        // freeze form elements and pass the values in hidden fields
        // TODO MDL-29421 description_editor does not freeze the normal way, uncomment below when fixed
        $form = $this->_form;
        foreach (array('rubric', 'name'/*, 'description_editor'*/) as $fieldname) {
            $el =& $form->getElement($fieldname);
            $el->freeze();
            $el->setPersistantFreeze(true);
            if ($fieldname == 'rubric') {
                $el->add_regrade_confirmation($changelevel);
            }
        }

        // replace button text 'saverubric' and unfreeze 'Back to edit' button
        $this->findButton('saverubric')->setValue(get_string('continue'));
        $el =& $this->findButton('editrubric');
        $el->setValue(get_string('backtoediting', 'gradingform_rubric'));
        $el->unfreeze();

        return true;
    }
68589
public function onControllerInit(BaseController $controller)
    {
        // 除去 admin/login 页面
        if (substr($this->app->getController(), 0, 6) === 'admin/') {
            $controller->middleware(CheckAppStatus::class);
        }

        $this->checkCli();
    }
428202
public function addStep(Step $step)
    {
        if (!$this->steps->contains($step)) {
            $this->steps->add($step);
        }

        return $this;
    }
1100477
protected void maybeBuildAndSetGestureDetector(AbstractDraweeController controller) {
    GestureDetector gestureDetector = controller.getGestureDetector();
    if (gestureDetector == null) {
      gestureDetector = GestureDetector.newInstance(mContext);
      controller.setGestureDetector(gestureDetector);
    }
  }
49717
protected function runStep($step, $pretend = false)
    {
        try
        {
            $step = $this->createStep($step);

            if ($this->confirm($step->prompt(), true))
            {
                return $step->run($pretend);
            }
        }
        catch (\Exception $e)
        {
            $this->error($e->getMessage());
        }

        return false;
    }