mirror of
https://github.com/friendica/friendica
synced 2025-04-27 02:30:10 +00:00
Add AddonHelper::getAvailableAddons() method
This commit is contained in:
parent
4ea648475f
commit
b84eb33ae2
4 changed files with 38 additions and 12 deletions
|
@ -34,6 +34,8 @@ class Addon
|
|||
* This list is made from scanning the addon/ folder.
|
||||
* Unsupported addons are excluded unless they already are enabled or system.show_unsupported_addon is set.
|
||||
*
|
||||
* @deprecated 2025.02 Use `Friendica\Core\Addon\AddonHelper::getAvailableAddons()` instead
|
||||
*
|
||||
* @return array
|
||||
* @throws \Exception
|
||||
*/
|
||||
|
|
|
@ -14,6 +14,15 @@ namespace Friendica\Core\Addon;
|
|||
*/
|
||||
interface AddonHelper
|
||||
{
|
||||
/**
|
||||
* Returns the list of available addons with their current status and info.
|
||||
* This list is made from scanning the addon/ folder.
|
||||
* Unsupported addons are excluded unless they already are enabled or system.show_unsupported_addon is set.
|
||||
*
|
||||
* @return array<array<string|bool|array>>
|
||||
*/
|
||||
public function getAvailableAddons(): array;
|
||||
|
||||
/**
|
||||
* Checks if the provided addon is enabled
|
||||
*/
|
||||
|
|
|
@ -18,6 +18,18 @@ use Friendica\Core\Addon;
|
|||
*/
|
||||
final class AddonProxy implements AddonHelper
|
||||
{
|
||||
/**
|
||||
* Returns the list of available addons with their current status and info.
|
||||
* This list is made from scanning the addon/ folder.
|
||||
* Unsupported addons are excluded unless they already are enabled or system.show_unsupported_addon is set.
|
||||
*
|
||||
* @return array<array<string|bool|array>>
|
||||
*/
|
||||
public function getAvailableAddons(): array
|
||||
{
|
||||
return Addon::getAvailableList();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the provided addon is enabled
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue