Compare commits

...

3 Commits

Author SHA1 Message Date
James
6ca13b13c9 tidy 2020-12-26 15:43:04 +00:00
James
813b30d210 tidy 2020-12-26 15:41:15 +00:00
James
c1ce7c9d6f working 2020-12-26 15:38:01 +00:00

View File

@ -15,13 +15,11 @@ class TestCommand extends Command{
public function __construct( public function __construct(
\Magento\Catalog\Model\ProductRepository $productRepository, \Magento\Catalog\Model\ProductRepository $productRepository,
\Magento\Framework\ObjectManagerInterface $objectManager, \Magento\Framework\ObjectManagerInterface $objectManager,
\Magento\Framework\App\State $state, \Magento\Framework\App\State $state
\Magento\Catalog\Model\ResourceModel\Product\Action $productAction
) { ) {
$this->_state=$state; $this->_state=$state;
$this->_objectManager=$objectManager; $this->_objectManager=$objectManager;
$this->_productRepository=$productRepository; $this->_productRepository=$productRepository;
$this->_productAction=$productAction;
parent::__construct(); parent::__construct();
} }
@ -33,10 +31,8 @@ class TestCommand extends Command{
parent::configure(); parent::configure();
} }
/**
* {@inheritdoc}
*/
protected function execute(InputInterface $input, OutputInterface $output){ protected function execute(InputInterface $input, OutputInterface $output){
$this->_productAction=$this->_objectManager->get('\Magento\Catalog\Model\ResourceModel\Product\Action');
$output->writeln(get_class($this->_productAction)); $output->writeln(get_class($this->_productAction));
} }
} }