Get the text to display for the current step.
@param $step The step number
195821
protected function getDisplayText($step) {
    $numPackages = sizeof($this->workPackages);
    return ($step>=0 && $step<$numPackages) ? $this->workPackages[$step]['name']." ..." :
      ($step>=$numPackages ? "Done" : "");
  }
818872
def increase_step(self) -> str:
        
        if self._steps_index < len(self._steps) - 1:
            self._steps_index = self._steps_index + 1
        return 'step: {}'.format(self.current_step())
276303
protected function col_actions(step $step) {
        $actions = [];

        if ($step->is_first_step()) {
            $actions[] = helper::get_filler_icon();
        } else {
            $actions[] = helper::format_icon_link($step->get_moveup_link(), 't/up', get_string('movestepup', 'tool_usertours'));
        }

        if ($step->is_last_step()) {
            $actions[] = helper::get_filler_icon();
        } else {
            $actions[] = helper::format_icon_link($step->get_movedown_link(), 't/down',
                    get_string('movestepdown', 'tool_usertours'));
        }

        $actions[] = helper::format_icon_link($step->get_edit_link(), 't/edit', get_string('edit'));

        $actions[] = helper::format_icon_link($step->get_delete_link(), 't/delete', get_string('delete'), 'moodle', [
            'data-action'   => 'delete',
            'data-id'       => $step->get_id(),
        ]);

        return implode('&nbsp;', $actions);
    }
934551
public function previous($step = 1)
    {
        return $this->siblings(
            array_search($this, $this->parent->filters(), true) - $step
        );
    }
650121
public function advanceTo(int $step): void
    {
        if ($this->maxSteps && $step > $this->maxSteps) {
            $this->maxSteps = $step;
        } elseif ($step < 0) {
            $step = 0;
        }

        $prevPeriod = (int)($this->step / $this->redrawFreq);
        $currPeriod = (int)($step / $this->redrawFreq);
        $this->step = $step;
        $this->percent = $this->maxSteps ? (float)$this->step / $this->maxSteps : 0;

        if ($prevPeriod !== $currPeriod || $this->maxSteps === $step) {
            $this->display();
        }
    }
989124
public function increment(string $column, int $step = 1)
    {
        $column = $this->dialect()->quoteName($column);

        $this->addSet($column . ' = ' . $column . ' + ?', [$step]);

        return $this;
    }
402504
def for_display(self):
        
        skip = ""
        if self.skip:
            skip = " [SKIP]"
        result = "{step_num}: {path}{skip}".format(
            step_num=self.step_num, path=self.path, skip=skip
        )
        description = self.task_config.get("description")
        if description:
            result += ": {}".format(description)
        return result
1139684
private function captureStepEvent(StepTested $event)
    {
        if ($event instanceof AfterStepSetup) {
            $this->stepBeforeTestedEvents[$event->getStep()->getLine()] = $event;
        } else {
            $this->stepAfterTestedEvents[$event->getStep()->getLine()] = $event;
        }
    }
164956
protected function pushStepStack( $step )
    {
        $store = $this->getStore();
        $stack = $store['stack'];
        array_push( $stack, (string) $step );
        $store['stack'] = $stack;
        return $this;
    }
653219
public function setStep($step)
    {
        if (is_int($step)) {
            $this->step = $step;
        } else {
            $msg = "'Step' must be an integer, '" . gettype($step) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
1163011
function nextStep( $step )
    {
        foreach ( $this->StepTable as $key => $tableStep )
        {
            if ( $step['class'] == $tableStep['class'] )
            {
                return $this->StepTable[++$key];
            }
        }
        $retValue = null;
        return $retValue;
    }
929618
public function getStep($stepId)
    {
        foreach ($this->steps as $step) {
            if ($step->getId() === $stepId) {
                return $step;
            }
        }

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

        return $this;
    }
1145911
protected function setCurrentStep($step)
    {
        $this->session->CurrentStepID = $step->ID;
        $step->setForm($this);

        return $this->session->write();
    }
699102
public function show(string $step, array $params = [])
    {
        $path = $this->buildStepsPath($step);

        return $this->get($path, $params);
    }
391901
protected function redirectToStep( $step )
    {
        $routeMatch = $this->getEvent()
                           ->getRouteMatch();

        return $this->redirect()
                    ->toRoute( $routeMatch->getMatchedRouteName(),
                               ArrayUtils::merge(
                                   $routeMatch->getParams(),
                                   array( 'step' => $step )
                               ) );
    }
676260
public function step($step = null)
    {
        if (isset($step)) {
            $this->step = $step;
            return $this;
        } else {
            return $this->step;
        }
    }