addArgument('table', InputArgument::REQUIRED, 'Table, e.g. tx_vitec_domain_model_product'); $this->addArgument('uid', InputArgument::REQUIRED, 'Record uid'); $this->addOption('fields', null, InputOption::VALUE_REQUIRED, 'Changed fields, comma-separated', 'title'); } protected function execute(InputInterface $input, OutputInterface $output): int { $fields = GeneralUtility::trimExplode(',', (string)$input->getOption('fields'), true); $paths = GeneralUtility::makeInstance(SsrPurgeTargetResolver::class) ->resolve((string)$input->getArgument('table'), (int)$input->getArgument('uid'), $fields); if ($paths === []) { $output->writeln('nothing to purge (record not rendered anywhere)'); } elseif ($paths === [SsrPurgeTargetResolver::ALL]) { $output->writeln('* (everything)'); } else { $output->writeln(count($paths) . ' path(s):'); foreach ($paths as $path) { $output->writeln(' ' . $path); } } return Command::SUCCESS; } }