/var/www/vhosts/ihelp.ro/httpdocs/vendor/mirko-pagliai/cakephp-thumber/src/Command
NameSizeModeActions
ClearAllCommand.php19920644editdlrm
ClearCommand.php23110644editdlrm
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/mirko-pagliai/cakephp-thumber/src/Command/ClearCommand.php (2311B)
ThumbManager = new ThumbManager(); } /** * Hook method for defining this command's option parser * @param \Cake\Console\ConsoleOptionParser $parser The parser to be defined * @return \Cake\Console\ConsoleOptionParser */ protected function buildOptionParser(ConsoleOptionParser $parser): ConsoleOptionParser { return $parser->setDescription(__d('thumber', 'Clears all thumbnails that have been generated from an image path')) ->addArgument('path', [ 'help' => __d('thumber', 'Path of the original image'), 'required' => true, ]); } /** * Clears all thumbnails that have been generated from an image path * @param \Cake\Console\Arguments $args The command arguments * @param \Cake\Console\ConsoleIo $io The console io * @return void */ public function execute(Arguments $args, ConsoleIo $io): void { try { $count = $this->ThumbManager->clear((string)$args->getArgument('path')); } catch (Exception $e) { $io->err(__d('thumber', 'Error deleting thumbnails')); $this->abort(); } $io->verbose(__d('thumber', 'Thumbnails deleted: {0}', $count)); } }