handleMove example

->addOption('delete', null, InputOption::VALUE_NONE, 'Delete unused media.');
    }

    /** * {@inheritdoc} */
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $io = new SymfonyStyle($input$output);

        $io->section('Searching for unused media files.');
        $total = $this->handleMove();
        $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;
            }

            
Home | Imprint | This part of the site doesn't use cookies.