Move getVisibleList() into AddonHelper

This commit is contained in:
Art4 2025-02-02 19:32:17 +00:00
parent 5504fdcd06
commit c4469cb624
3 changed files with 22 additions and 3 deletions

View file

@ -300,6 +300,8 @@ class Addon
/**
* Returns the list of non-hidden enabled addon names
*
* @deprecated 2025.02 Use `Friendica\Core\Addon\AddonHelper::getVisibleList()` instead
*
* @return array
* @throws \Exception
*/

View file

@ -20,9 +20,16 @@ interface AddonHelper
public function isEnabled(string $addonId): bool;
/**
* Returns a list of the enabled addon names
* Returns a list with the IDs of the enabled addons
*
* @return array
* @return string[]
*/
public function getEnabledList(): array;
/**
* Returns the list of the IDs of the non-hidden enabled addons
*
* @return string[]
*/
public static function getVisibleList(): array;
}

View file

@ -27,7 +27,7 @@ final class AddonProxy implements AddonHelper
}
/**
* Returns a list of the enabled addon names
* Returns a list with the IDs of the enabled addons
*
* @return string[]
*/
@ -35,4 +35,14 @@ final class AddonProxy implements AddonHelper
{
return Addon::getEnabledList();
}
/**
* Returns the list of the IDs of the non-hidden enabled addons
*
* @return string[]
*/
public static function getVisibleList(): array
{
return Addon::getVisibleList();
}
}