mirror of
https://github.com/friendica/friendica
synced 2025-04-27 02:30:10 +00:00
Create AddonHelper::getEnabledAddonsWithAdminSettings()
This commit is contained in:
parent
a678f41ca7
commit
fda70f3fe3
4 changed files with 27 additions and 9 deletions
|
@ -66,6 +66,8 @@ class Addon
|
|||
* Returns a list of addons that can be configured at the node level.
|
||||
* The list is formatted for display in the admin panel aside.
|
||||
*
|
||||
* @deprecated 2025.02 Use `Friendica\Core\Addon\AddonHelper::getEnabledAddonsWithAdminSettings()` instead
|
||||
*
|
||||
* @return array
|
||||
* @throws \Exception
|
||||
*/
|
||||
|
|
|
@ -30,7 +30,7 @@ interface AddonHelper
|
|||
*
|
||||
* @return bool true on success or false on failure
|
||||
*/
|
||||
public function installAdodn(string $addonId): bool;
|
||||
public function installAddon(string $addonId): bool;
|
||||
|
||||
/**
|
||||
* Uninstalls an addon.
|
||||
|
@ -66,5 +66,12 @@ interface AddonHelper
|
|||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public static function getVisibleEnabledAddons(): array;
|
||||
public function getVisibleEnabledAddons(): array;
|
||||
|
||||
/**
|
||||
* Returns a list with the IDs of the enabled addons that provides admin settings.
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getEnabledAddonsWithAdminSettings(): array;
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ final class AddonProxy implements AddonHelper
|
|||
*
|
||||
* @return bool true on success or false on failure
|
||||
*/
|
||||
public function installAdodn(string $addonId): bool
|
||||
public function installAddon(string $addonId): bool
|
||||
{
|
||||
return Addon::install($addonId);
|
||||
}
|
||||
|
@ -96,8 +96,18 @@ final class AddonProxy implements AddonHelper
|
|||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public static function getVisibleEnabledAddons(): array
|
||||
public function getVisibleEnabledAddons(): array
|
||||
{
|
||||
return Addon::getVisibleList();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list with the IDs of the enabled addons that provides admin settings.
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getEnabledAddonsWithAdminSettings(): array
|
||||
{
|
||||
return array_keys(Addon::getAdminList());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue