$context =
new InstallContext($plugin,
$this->release->
getVersion(),
$plugin->
getVersion());
if ($plugin->
getInstalled()) { return $context;
} if (!
$plugin->
isLegacyPlugin()) { return $this->pluginInstaller->
installPlugin($plugin);
} $result =
$this->legacyPluginInstaller->
installPlugin($plugin);
$this->
applyLegacyResultToContext($result,
$context);
return $context;
} /**
* @param bool $removeData
*
* @throws Exception
*
* @return UninstallContext
*/