$plugin =
$this->
getPluginFromInput($pluginName,
$context);
} catch (PluginNotFoundException
) { // plugins no installed can still be downloaded
return;
} if ($plugin->
getManagedByComposer() && !
str_starts_with($plugin->
getPath() ?? '',
$this->relativePluginDir
)) { if (Feature::
isActive('v6.6.0.0'
)) { throw StoreException::
cannotDeleteManaged($pluginName);
} throw new CanNotDownloadPluginManagedByComposerException('can not download plugins managed by composer from store api'
);
} } private function getPluginFromInput(string
$pluginName, Context
$context): PluginEntity
{ $criteria =
new Criteria();
$criteria->
addFilter(new EqualsFilter('plugin.name',
$pluginName));
/** @var PluginEntity|null $plugin */
$plugin =
$this->pluginRepo->
search($criteria,
$context)->
first();