Skip to content

Commit

Permalink
NEW: Pull ALL Plugins for Manual Plugins Page
Browse files Browse the repository at this point in the history
  • Loading branch information
aljawaid committed Mar 14, 2023
1 parent 67217d0 commit fa6ef0d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Helper/PluginManagerHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
namespace Kanboard\Plugin\PluginManager\Helper;

use Kanboard\Core\Base;
use Kanboard\Core\Http\Client;
use Kanboard\Core\Plugin\Directory;

class PluginManagerHelper extends Base
{
Expand All @@ -22,6 +24,7 @@ public function checkRootDomain($url)
return false;
}
}

public function countTypes($available_plugins)
{
$types = array();
Expand All @@ -37,4 +40,17 @@ public function countTypes($available_plugins)
$count_types = array_count_values($types);
return $count_types;
}

public function getAllPlugins($url = PLUGIN_API_URL)
{
$manual_plugins = $this->httpClient->getJson($url);
$manual_plugins = array_filter($manual_plugins, array($this, 'isNotInstallable'));
return $manual_plugins;

}

public function isNotInstallable(array $plugin)
{
return $plugin['remote_install'] == false;
}
}

0 comments on commit fa6ef0d

Please sign in to comment.