public function getAvailablePluginNames($themesOnly)
{
if ($themesOnly) {
// we do not use getAllThemes() or getAllPlugins() since those methods would apply a whitelist
// github organization filter and here we actually want to get all plugin names.
$plugins = $this->marketplaceClient->searchForThemes('', '', Sort::DEFAULT_SORT, PurchaseType::TYPE_ALL);
} else {
$plugins = $this->marketplaceClient->searchForPlugins('', '', Sort::DEFAULT_SORT, PurchaseType::TYPE_ALL);
}
$names = array();
foreach ($plugins as $plugin) {
$names[] = $plugin['name'];
}
return $names;
}