scopeConfig = $scopeConfig; $this->reinitableConfig = $reinitableConfig; } /** * @inheritdoc */ public function configure() { $this->setName(self::COMMAND_NAME) ->setDescription('Show frontend template hints status.'); parent::configure(); } /** * @inheritdoc * @throws \InvalidArgumentException */ public function execute(InputInterface $input, OutputInterface $output) { $this->reinitableConfig->reinit(); $templateHintsStatus = ($this->isTemplateHintsEnabled()) ? 'enabled' : 'disabled'; $templateHintsMessage = __("Template hints are %status", ['status' => $templateHintsStatus]); $output->writeln("$templateHintsMessage"); return Cli::RETURN_SUCCESS; } /** * Check if template hints enabled * * @return bool */ private function isTemplateHintsEnabled(): bool { return $this->scopeConfig->isSetFlag(self::TEMPLATE_HINTS_STOREFRONT_PATH, 'default'); } }