Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ProgressBar.php

function ProgressBar::start

Starts the progress output.

Parameters

int|null $max Number of steps to complete the bar (0 if indeterminate), null to leave unchanged:

int $startAt The starting point of the bar (useful e.g. when resuming a previously started bar):

1 call to ProgressBar::start()
ProgressBar::iterate in vendor/symfony/console/Helper/ProgressBar.php
Returns an iterator that will automatically update the progress bar when iterated.

File

vendor/symfony/console/Helper/ProgressBar.php, line 349

Class

ProgressBar
The ProgressBar provides helpers to display progress output.

Namespace

Symfony\Component\Console\Helper

Code

public function start(?int $max = null, int $startAt = 0) : void {
    $this->startTime = time();
    $this->step = $startAt;
    $this->startingStep = $startAt;
    $startAt > 0 ? $this->setProgress($startAt) : ($this->percent = 0.0);
    if (null !== $max) {
        $this->setMaxSteps($max);
    }
    $this->display();
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal