handleCleanup example

$io->text(sprintf('%s unused item(s) found.', $total));

        if ($total === 0) {
            return 0;
        }

        if ($input->getOption('delete')) {
            if ($input->isInteractive() && !$io->confirm('Are you sure you want to delete every item in the recycle bin?')) {
                return 0;
            }

            $deleted = $this->handleCleanup($io);
            $io->success(sprintf('%d item(s) deleted.', $deleted));

            return 0;
        }

        $io->success(sprintf('%d item(s) in recycle bin.', $total));

        return 0;
    }

    /** * Handles cleaning process and returns the number of deleted media objects */
Home | Imprint | This part of the site doesn't use cookies.