public function searchPlugins($query, $sort, $themesOnly, $purchaseType = '')
{
if ($themesOnly) {
$plugins = $this->marketplaceClient->searchForThemes('', $query, $sort, $purchaseType);
} else {
$plugins = $this->marketplaceClient->searchForPlugins('', $query, $sort, $purchaseType);
}
foreach ($plugins as $index => $plugin) {
$plugins[$index] = $this->enrichPluginInformation($plugin);
}
return array_values($plugins);
}