public function getFrontend() { $frontend = \Magento\Framework\Connect\Frontend::getInstance('CLI'); \Magento\Framework\Connect\Command::setFrontendObject($frontend); return $frontend; }
/** * Retrieve object of frontend and set it to \Magento\Framework\Connect\Command * * @return \Magento\Downloader\Connect\Frontend */ public function getFrontend() { if (!$this->_frontend) { $this->_frontend = new \Magento\Downloader\Connect\Frontend(); \Magento\Framework\Connect\Command::setFrontendObject($this->_frontend); } return $this->_frontend; }