Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Member Functions
UninstallCommand Class Reference
Inheritance diagram for UninstallCommand:
AbstractSetupCommand

Public Member Functions

 __construct (InstallerFactory $installerFactory)
 

Protected Member Functions

 configure ()
 
 execute (InputInterface $input, OutputInterface $output)
 
- Protected Member Functions inherited from AbstractSetupCommand
 configure ()
 

Detailed Description

Definition at line 15 of file UninstallCommand.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( InstallerFactory  $installerFactory)
Parameters
InstallerFactory$installerFactory

Definition at line 25 of file UninstallCommand.php.

26  {
27  $this->installerFactory = $installerFactory;
28  parent::__construct();
29  }

Member Function Documentation

◆ configure()

configure ( )
protected

{}

Definition at line 34 of file UninstallCommand.php.

35  {
36  $this->setName('setup:uninstall')
37  ->setDescription('Uninstalls the Magento application');
38  parent::configure();
39  }

◆ execute()

execute ( InputInterface  $input,
OutputInterface  $output 
)
protected

{}

Definition at line 44 of file UninstallCommand.php.

45  {
46  $helper = $this->getHelper('question');
47  $question = new ConfirmationQuestion('Are you sure you want to uninstall Magento?[y/N]', false);
48 
49  if ($helper->ask($input, $output, $question) || !$input->isInteractive()) {
50  $installer = $this->installerFactory->create(new ConsoleLogger($output));
51  $installer->uninstall();
52  }
53  return \Magento\Framework\Console\Cli::RETURN_SUCCESS;
54  }
$helper
Definition: iframe.phtml:13

The documentation for this class was generated from the following file: