Shopware\Plugin\Services\Install::install PHP Method

install() public method

public install ( Shopware\Plugin\Struct\Plugin $plugin, string $shopwarePath, boolean $inputActivate = false, string $branch = 'master', boolean $useHttp = false )
$plugin Shopware\Plugin\Struct\Plugin
$shopwarePath string
$inputActivate boolean
$branch string
$useHttp boolean
    public function install(Plugin $plugin, $shopwarePath, $inputActivate = false, $branch = 'master', $useHttp = false)
    {
        $pluginName = $plugin->name;
        $this->checkout->checkout($plugin, $shopwarePath . '/engine/Shopware/Plugins/Local/', $branch, $useHttp);
        $this->checkForNewStructure($plugin, $shopwarePath);
        if ($inputActivate) {
            $this->ioService->writeln(exec($shopwarePath . '/bin/console sw:plugin:refresh'));
            $this->ioService->writeln(exec($shopwarePath . '/bin/console sw:plugin:install --activate ' . $pluginName));
        }
        $this->addPluginVcsMapping($plugin, $shopwarePath);
        return;
    }