11 use Symfony\Component\Console\Command\Command;
12 use Symfony\Component\Console\Output\OutputInterface;
13 use Symfony\Component\Console\Input\InputInterface;
25 private $objectManager;
35 parent::__construct();
45 $this->setName(
'deploy:mode:show')->setDescription(
$description);
52 protected function execute(InputInterface $input, OutputInterface
$output)
56 $mode = $this->objectManager->create(
57 \
Magento\Deploy\Model\Mode::class,
65 "Current application mode: $currentMode. (Note: Environment variables may override this value.)" 67 }
catch (\Exception $e) {
68 $output->writeln(
'<error>' . $e->getMessage() .
'</error>');
69 if (
$output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {
70 $output->writeln($e->getTraceAsString());
__construct(ObjectManagerInterface $objectManager)
if($exist=($block->getProductCollection() && $block->getProductCollection() ->getSize())) $mode