‪TYPO3CMS  10.4
TYPO3\CMS\Backend\View\ProgressListenerInterface Interface Reference
Inheritance diagram for TYPO3\CMS\Backend\View\ProgressListenerInterface:
TYPO3\CMS\Backend\Command\ProgressListener\ReferenceIndexProgressListener

Public Member Functions

 start (int $maxSteps=0, string $additionalMessage=null)
 
 advance (int $step=1, string $additionalMessage=null)
 
 finish (string $additionalMessage=null)
 
 log (string $message, string $logLevel=LogLevel::INFO)
 

Detailed Description

An interface that tracks the progress of a longer-running progress. This acts as a wrapper for Symfony ProgressBar on CLI, so see the info here.

The listener can be used multiple times when calling start() again a new progressbar starts.

this interface is still experimental, and not considered part of TYPO3 Public API.

Definition at line 30 of file ProgressListenerInterface.php.

Member Function Documentation

◆ advance()

TYPO3\CMS\Backend\View\ProgressListenerInterface::advance ( int  $step = 1,
string  $additionalMessage = null 
)

Move the progress one step further

Parameters
int$step‪by default, this is "1" but can be used to skip further.
string | null$additionalMessage‪a separate text message

Implemented in TYPO3\CMS\Backend\Command\ProgressListener\ReferenceIndexProgressListener.

◆ finish()

TYPO3\CMS\Backend\View\ProgressListenerInterface::finish ( string  $additionalMessage = null)

Stop the progress, automatically setting it to 100%.

Parameters
string | null$additionalMessage‪a separate text message

Implemented in TYPO3\CMS\Backend\Command\ProgressListener\ReferenceIndexProgressListener.

◆ log()

TYPO3\CMS\Backend\View\ProgressListenerInterface::log ( string  $message,
string  $logLevel = LogLevel::INFO 
)

Can be used to render custom messages during the progress.

Parameters
string$message‪the message to render
string$logLevel‪used as severity

Implemented in TYPO3\CMS\Backend\Command\ProgressListener\ReferenceIndexProgressListener.

◆ start()

TYPO3\CMS\Backend\View\ProgressListenerInterface::start ( int  $maxSteps = 0,
string  $additionalMessage = null 
)

Start a progress by using the maximum items, and an additional header message.

Parameters
int$maxSteps‪set the maximum amount of items to be processed
string | null$additionalMessage‪a separate text message

Implemented in TYPO3\CMS\Backend\Command\ProgressListener\ReferenceIndexProgressListener.