Piwik\Plugins\CorePluginsAdmin\Commands\ActivatePlugin::execute PHP Method

execute() protected method

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
    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 activated.</comment>');
            return;
        }
        if ($dependencies = $pluginManager->loadPlugin($plugin)->getMissingDependenciesAsString()) {
            $output->writeln("<error>{$dependencies}</error>");
            return;
        }
        $pluginManager->activatePlugin($plugin);
        $output->writeln("Activated plugin <info>{$plugin}</info>");
    }
ActivatePlugin