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

Breadcrumb

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

function ProgressBar::setMaxSteps

2 calls to ProgressBar::setMaxSteps()
ProgressBar::start in vendor/symfony/console/Helper/ProgressBar.php
Starts the progress output.
ProgressBar::__construct in vendor/symfony/console/Helper/ProgressBar.php

File

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

Class

ProgressBar
The ProgressBar provides helpers to display progress output.

Namespace

Symfony\Component\Console\Helper

Code

public function setMaxSteps(?int $max) : void {
    if (0 === $max) {
        $max = null;
    }
    $this->format = null;
    if (null === $max) {
        $this->max = null;
        $this->stepWidth = 4;
    }
    else {
        $this->max = max(0, $max);
        $this->stepWidth = Helper::width((string) $this->max);
    }
}

API Navigation

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