$input->
getOption('folder-entity'
),
);
$totalCount = 0;
$finished =
$this->
consumeGeneratorInBatches($mediaBatches, 20,
function D
$batchNum, array
$medias) use ($io,
$cursor, &
$totalCount) { if ($batchNum === 0 && \
count($medias) === 0
) { return true;
} if ($batchNum === 0
) { // we only clear the screen when we actually have some unused media
$cursor->
clearScreen();
} $totalCount += \
count($medias);
$cursor->
moveToPosition(0, 0
);
$cursor->
clearOutput();
$io->
title( sprintf( 'Files that will be deleted: Page %d. Records: %d - %d',
$batchNum + 1,
($batchNum * 20
) + 1,