[getStep description]
@param  string $stepName The name of the step.
@return array           The step.
349420
public function getStep($stepName)
    {
        if (!$this->getSteps()->offsetExists($stepName)) {
            throw new WorkflowException('Step with name "'.$stepName.'" is not in "'.$this->workflowName.'" workflow');
        }

        return $this->getSteps()->offsetGet($stepName);
    }
1011753
public function getStep($uuid)
    {
        foreach ($this->steps as $step) {
            if ($step->getUuid() === $uuid) {
                return $step;
            }
        }

        return null;
    }
1067664
private function serializeUserProgression(Step $step)
    {
        $user = $this->tokenStorage->getToken()->getUser();
        $userProgression = 'anon.' !== $user ?
            $this->userProgressionRepo->findOneBy(['step' => $step, 'user' => $user]) :
            null;
        $data = [
            'status' => empty($userProgression) ? 'unseen' : $userProgression->getStatus(),
        ];

        return $data;
    }
962167
public function getMigrations($steps)
    {
        $query = $this->table()->where('batch', '>=', '1');

        return $query->orderBy('migration', 'desc')->take($steps)->get()->all();
    }
583831
protected function findNextStep() {
		// otherwise get next step in chain
		$currentStep = $this->CurrentStep();
		return $this
			->Steps()
			->filter("Status", "Queued")
			->filter("Order:GreaterThanOrEqual", $currentStep->Order)
			->exclude("ID", $currentStep->ID)
			->sort("Order ASC")
			->first();
	}
671585
protected function GetStepAsAjax($sStepName = null)
    {
        $sHTML = '';
        if (is_null($sStepName)) {
            $sStepName = $this->global->GetUserData('sStepName');
        }
        $oStep = TdbShopOrderStep::GetStep($sStepName);
        if ($oStep) {
            $sModuleSpotName = $this->sModuleSpotName;
            $sHTML = $oStep->Render($sModuleSpotName);
        }

        return $sHTML;
    }
797595
public function exportStep(Step $step)
    {
        $parent = $step->getParent();
        $activity = $step->getActivity();

        $data = [
            'uid' => $step->getId(),
            'parent' => !empty($parent) ? $parent->getId() : null,
            'activityId' => !empty($activity) ? $activity->getId() : null,
            'activityNodeId' => !empty($activity) ? $activity->getResourceNode()->getId() : null,
            'order' => $step->getOrder(),
        ];

        return $data;
    }
1282818
public function canReachStep($stepName)
    {
        if (!array_key_exists($stepName, $this->canReachStep)) {

            $this->canReachStep[$stepName] = false;
            $this->validationErrors[$stepName] = array();

            if ($stepName != $this->getCurrentStepName()) {
                $stepToReach = $this->getStep($stepName);
                $currentStep = $this->getCurrentStep();

                if ($currentStep->hasPossibleNextStep($stepToReach->getName())) {

                    $preValidationResult = $this->preValidation($stepToReach->getName());

                    if ($preValidationResult) {
                        if (!$stepToReach->hasValidations()) {
                            $this->canReachStep[$stepToReach->getName()] = true;
                        } else {
                            foreach ($stepToReach->getValidations() as $validation) {
                                $validation = $this->getValidation($validation);

                                try {
                                    $validation->validate($this->getModel());
                                    $this->canReachStep[$stepToReach->getName()] = true;
                                } catch (ValidationException $e) {
                                    $this->validationErrors[$stepToReach->getName()][] = $e->getMessage();
                                    $this->canReachStep[$stepToReach->getName()] = false;
                                }
                            }
                        }
                    }
                }
            }
        }

        return $this->canReachStep[$stepName];
    }
934551
public function previous($step = 1)
    {
        return $this->siblings(
            array_search($this, $this->parent->filters(), true) - $step
        );
    }
659960
protected function getStep( $step )
    {
        $store      = $this->getStore();
        $formSrv    = $this->getServiceLocator()
                           ->get( 'Form' );

        if ( $step == $this->startStep )
        {
            $form  = $formSrv->get( 'Grid\Paragraph\CreateWizard\Start' );
            $model = new StartStep( array(
                'textDomain' => 'paragraph',
            ) );
        }
        else
        {
            $store['type'] = $step;
            $form   = new Form;
            $create = $formSrv->get( 'Grid\Paragraph\Meta\Create' );
            $model  = new WizardStep( array(
                'textDomain'    => 'paragraph',
            ), array(
                'finish'        => true,
                'next'          => 'finish',
            ) );

            if ( $create->has( $step ) )
            {
                foreach ( $create->get( $step ) as $element )
                {
                    $form->add( $element );
                }
            }
            else
            {
                $edit = $formSrv->get( 'Grid\Paragraph\Meta\Edit' );

                if ( $edit->has( $step ) )
                {
                    foreach ( $edit->get( $step ) as $element )
                    {
                        $form->add( $element );
                    }
                }
                else
                {
                    $model->setOption( 'skip', true );
                }
            }
        }

        return $model->setStepForm( $form );
    }
988829
protected function getSteps() {
        if (!$this->_steps) {
            $this->_steps = new StepList($this->version, $this->solution['flowSid'], $this->solution['sid']);
        }

        return $this->_steps;
    }
869252
public function findCurrentModelState(ModelInterface $model, $processName, $stepName = null)
    {
        return $this->repository->findLatestModelState(
            $model->getWorkflowIdentifier(),
            $processName,
            $stepName
        );
    }
113636
public function afterStep(StepEvent $event) {
        $color = $this->getResultColorCode($event->getResult());
        $capture = $this->captureAll || $color == 'failed';
        if ($capture) {
            try {
                $screenshot = $this->driver->getScreenshot();
                if ($screenshot) {
                    $date = new \DateTime('now');
                    $fileName = $this->screenShotPrefix . $date->format('Y-m-d H.i.s') . '.png';
                    $file = $this->screenShotDirectory . DIRECTORY_SEPARATOR . $fileName;
                    file_put_contents($file, $screenshot);
                    $this->screenShotMarkup .= '<div class="screenshot">';
                    $this->screenShotMarkup .= sprintf('<a href="#" class="screenshot-toggler">Toggle screenshot for ' . $event->getStep()->getText() . '</a>');
                    $this->screenShotMarkup .= sprintf('<img src="%s" />', $fileName);
                    $this->screenShotMarkup .= '</div>';
                }
            } catch (\Exception $e) {
                $this->screenShotMarkup .= '<div class="screenshot">';
                $this->screenShotMarkup .= sprintf('<em>Error while taking screenshot for ' . $event->getStep()->getText() . ' : %s</em>', htmlspecialchars($e->getMessage()));
                $this->screenShotMarkup .= '</div>';
            }
        }
        if ($this->inBackground && $this->isBackgroundPrinted) {
            return;
        }

        if (!$this->inBackground && $this->inOutlineExample) {
            $this->delayedStepEvents[] = $event;

            return;
        }

        $this->printStep(
            $event->getStep(),
            $event->getResult(),
            $event->getDefinition(),
            $event->getSnippet(),
            $event->getException()
        );
        $this->writeln($this->screenShotMarkup);
        $this->screenShotMarkup = '';

    }
135753
protected function processSteps()
    {
        return [
            Steps\CheckTables::class,
            Steps\LoadRawData::class,
            Steps\DutchModeInteractive::class,
            Steps\ResolveModuleNames::class,
            Steps\AnalyzeModels::class,
            Steps\UnsetRawData::class,
            Steps\AnalyzeSluggableInteractive::class,
        ];
    }
288787
private function getNextStep(): callable
    {
        return function (string $nextStep = null): ?BowlInterface {
            /**
             * @var Chef $this
             */

            if (!empty($nextStep) && isset($this->stepsNames[$nextStep])) {
                $this->position = $this->stepsNames[$nextStep];
            }

            if (count($this->steps) > $this->position) {
                $position = $this->position;

                $step = $this->steps[$position];
                $this->position++;

                return $step;
            }

            return null;
        };
    }
228654
protected function scanStep()
    {
        if (!$this->allowSteps) {
            return null;
        }

        $keywords = $this->getKeywords('Step');
        if (!preg_match('/^\s*(' . $keywords . ')([^\s].+)/u', $this->line, $matches)) {
            return null;
        }

        $keyword = trim($matches[1]);
        $token = $this->takeToken('Step', $keyword);
        $token['keyword_type'] = $this->getStepKeywordType($keyword);
        $token['text'] = $matches[2];

        $this->consumeLine();
        $this->allowMultilineArguments = true;

        return $token;
    }
1291211
protected function getFormFor($step)
    {
        $model    = $this->getModel();
        $baseform = $this->createForm();

        if ((\MUtil_Bootstrap::enabled() !== true) && ($baseform instanceof \MUtil_Form)) {
            $table = new \MUtil_Html_TableElement();
            $table->setAsFormLayout($baseform, true, true);

            // There is only one row with formLayout, so all in output fields get class.
            $table['tbody'][0][0]->appendAttrib('class', $this->labelClass);
        }
        $baseform->setAttrib('class', $this->class);

        $bridge = $model->getBridgeFor('form', $baseform);

        $this->_items = null;
        $this->initItems();

        $this->addFormElementsFor($bridge, $model, $step);

        return $baseform;
    }