Skip to content
Extraits de code Groupes Projets
Valider 016f0b27 rédigé par Thomas Steur's avatar Thomas Steur Validation de Matthieu Aubry
Parcourir les fichiers

Do not show bundles in premium feature widgets (#12179)

* Do not show bundles in premium feature widgets

* filter bundles in widget itself and not in template
parent ab01344a
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -46,6 +46,10 @@ class GetNewPlugins extends Widget
$plugins = $this->marketplaceApiClient->searchForPlugins('', '', Sort::METHOD_LAST_UPDATED, PurchaseType::TYPE_ALL);
$plugins = array_filter($plugins, function ($plugin) {
return empty($plugin['isBundle']);
});
return $this->renderTemplate($template, array(
'plugins' => array_splice($plugins, 0, 3)
));
......
......@@ -42,6 +42,10 @@ class GetPremiumFeatures extends Widget
$plugins = $this->marketplaceApiClient->searchForPlugins('', '', Sort::METHOD_LAST_UPDATED, PurchaseType::TYPE_PAID);
$plugins = array_filter($plugins, function ($plugin) {
return empty($plugin['isBundle']);
});
if (empty($plugins)) {
$plugins = array();
} else {
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter