public function CleanState::progress in Feeds 8.3
Reports the progress of a batch.
When $total === $progress, the state of the task tracked by this state is regarded to be complete.
Should handle the following cases gracefully:
- $total is 0.
- $progress is larger than $total.
- $progress approximates $total so that $finished rounds to 1.0.
Parameters
int $total: A number that is the total to be worked off.
int $progress: A number that is the progress made on $total.
Overrides State::progress
1 call to CleanState::progress()
- CleanState::removeItem in src/
Feeds/ State/ CleanState.php - Removes a specific item from the list.
File
- src/
Feeds/ State/ CleanState.php, line 75
Class
- CleanState
- State for the clean stage.
Namespace
Drupal\feeds\Feeds\StateCode
public function progress($total, $progress) {
if (!$this
->count()) {
$this
->setCompleted();
}
return parent::progress($total, $progress);
}