update Piwik to version 2.16 (fixes #91)
This commit is contained in:
parent
296343bf3b
commit
d885a4baa9
5833 changed files with 418860 additions and 226988 deletions
|
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
/**
|
||||
* Piwik - free/libre analytics platform
|
||||
*
|
||||
* @link http://piwik.org
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
|
||||
*/
|
||||
|
||||
namespace Piwik\Plugins\CorePluginsAdmin\Commands;
|
||||
|
||||
use Piwik\Plugin\ConsoleCommand;
|
||||
use Piwik\Plugin\Manager;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
/**
|
||||
* plugin:deactivate console command.
|
||||
*/
|
||||
class DeactivatePlugin extends ConsoleCommand
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
$this->setName('plugin:deactivate');
|
||||
$this->setDescription('Deactivate a plugin.');
|
||||
$this->addArgument('plugin', InputArgument::REQUIRED, 'The plugin name.');
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
$pluginManager = Manager::getInstance();
|
||||
|
||||
$plugin = $input->getArgument('plugin');
|
||||
|
||||
if (!$pluginManager->isPluginActivated($plugin)) {
|
||||
$output->writeln('<comment>The plugin is already deactivated.</comment>');
|
||||
return;
|
||||
}
|
||||
|
||||
$pluginManager->deactivatePlugin($plugin);
|
||||
|
||||
$output->writeln("Deactivated plugin <info>$plugin</info>");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue