mirror of
https://github.com/friendica/friendica
synced 2025-02-19 07:26:48 +00:00
Move getEnabledList into AddonHelper
This commit is contained in:
parent
91bd6089b5
commit
5504fdcd06
4 changed files with 22 additions and 1 deletions
|
@ -275,6 +275,8 @@ class Addon
|
|||
/**
|
||||
* Checks if the provided addon is enabled
|
||||
*
|
||||
* @deprecated 2025.02 Use `Friendica\Core\Addon\AddonHelper::isEnabled()` instead
|
||||
*
|
||||
* @param string $addon
|
||||
* @return boolean
|
||||
*/
|
||||
|
@ -286,6 +288,8 @@ class Addon
|
|||
/**
|
||||
* Returns a list of the enabled addon names
|
||||
*
|
||||
* @deprecated 2025.02 Use `Friendica\Core\Addon\AddonHelper::getEnabledList()` instead
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getEnabledList(): array
|
||||
|
|
|
@ -18,4 +18,11 @@ interface AddonHelper
|
|||
* Checks if the provided addon is enabled
|
||||
*/
|
||||
public function isEnabled(string $addonId): bool;
|
||||
|
||||
/**
|
||||
* Returns a list of the enabled addon names
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getEnabledList(): array;
|
||||
}
|
||||
|
|
|
@ -25,4 +25,14 @@ final class AddonProxy implements AddonHelper
|
|||
{
|
||||
return Addon::isEnabled($addonId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of the enabled addon names
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getEnabledList(): array
|
||||
{
|
||||
return Addon::getEnabledList();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -177,7 +177,7 @@ class Summary extends BaseAdmin
|
|||
'$platform' => App::PLATFORM,
|
||||
'$codename' => App::CODENAME,
|
||||
'$build' => DI::config()->get('system', 'build'),
|
||||
'$addons' => [DI::l10n()->t('Active addons'), Addon::getEnabledList()],
|
||||
'$addons' => [DI::l10n()->t('Active addons'), DI::addonHelper()->getEnabledList()],
|
||||
'$serversettings' => $server_settings,
|
||||
'$warningtext' => $warningtext,
|
||||
]);
|
||||
|
|
Loading…
Add table
Reference in a new issue