referenceIndex = GeneralUtility::makeInstance(ReferenceIndex::class); } /** * @inheritdoc */ public function getTitle(): string { return 'Reference Index Up-to-Date'; } /** * Updates the reference index * * @return bool */ public function ensure(): bool { $this->referenceIndex->enableRuntimeCache(); ob_clean(); ob_start(); $result = $this->referenceIndex->updateIndex(false, true); $output = ob_get_clean(); $this->output->write($output); return $result[2] === 0; } /** * Checks whether there are reference index updates to be done * * @return bool */ public function isFulfilled(): bool { $this->referenceIndex->enableRuntimeCache(); $result = $this->referenceIndex->updateIndex(true, false); return $result[2] === 0; } /** * @param OutputInterface $output */ public function setOutput(OutputInterface $output): void { $this->output = $output; } }