mirror of
https://github.com/friendica/friendica
synced 2025-04-27 02:30:10 +00:00
Simplify AddonHelper::getAvailableAddons(), move style logic into Module class
This commit is contained in:
parent
af1894504d
commit
a80bf0ddf1
4 changed files with 30 additions and 8 deletions
|
@ -22,11 +22,12 @@ interface AddonHelper
|
|||
public function getAddonPath(): string;
|
||||
|
||||
/**
|
||||
* Returns the list of available addons with their current status and info.
|
||||
* Returns the list of available addons.
|
||||
*
|
||||
* 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|string|array>>
|
||||
* @return string[]
|
||||
*/
|
||||
public function getAvailableAddons(): array;
|
||||
|
||||
|
|
|
@ -36,15 +36,21 @@ final class AddonProxy implements AddonHelper
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the list of available addons with their current status and info.
|
||||
* Returns the list of available addons.
|
||||
*
|
||||
* 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|string|array>>
|
||||
* @return string[]
|
||||
*/
|
||||
public function getAvailableAddons(): array
|
||||
{
|
||||
return Addon::getAvailableList();
|
||||
return array_map(
|
||||
function(array $item) {
|
||||
return $item[0];
|
||||
},
|
||||
Addon::getAvailableList()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue