]> git.mxchange.org Git - friendica.git/commitdiff
Move getEnabledList into AddonHelper
authorArt4 <art4@wlabs.de>
Sun, 2 Feb 2025 06:55:38 +0000 (06:55 +0000)
committerArt4 <art4@wlabs.de>
Sun, 2 Feb 2025 06:55:38 +0000 (06:55 +0000)
src/Core/Addon.php
src/Core/Addon/AddonHelper.php
src/Core/Addon/AddonProxy.php
src/Module/Admin/Summary.php

index 5b162fd986dfca755529bab5dcc87d7d1ab6a774..8df395baa0ec5394502dcf93e021a7b6bda123d5 100644 (file)
@@ -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
index 7b65da64fe6ef31db2d365da1abd5b87a0f90ee8..3d3824de700132da2bcf3cab133defaf32868b58 100644 (file)
@@ -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;
 }
index 9d1b1b0ea0368e2b0df2fbf3b69159222186c3fb..97f90584b623bb9053fce968164c29c319d23ba5 100644 (file)
@@ -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();
+       }
 }
index f07e9720cbf9e4d64fb9ab6ae208a6916097a38b..9907694ac58c9621d4f1ae67dae553c2843be9a4 100644 (file)
@@ -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,
                ]);