]> git.mxchange.org Git - friendica.git/commitdiff
Move getVisibleList() into AddonHelper
authorArt4 <art4@wlabs.de>
Sun, 2 Feb 2025 19:32:17 +0000 (19:32 +0000)
committerArt4 <art4@wlabs.de>
Sun, 2 Feb 2025 19:32:17 +0000 (19:32 +0000)
src/Core/Addon.php
src/Core/Addon/AddonHelper.php
src/Core/Addon/AddonProxy.php

index 8df395baa0ec5394502dcf93e021a7b6bda123d5..1109bafd2de5395e5084324eb39dc3d2ca580f04 100644 (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
         */
index 3d3824de700132da2bcf3cab133defaf32868b58..7d71dd0e33eceaf5b4aa09bb1f83cb2fe1559a4c 100644 (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;
 }
index 97f90584b623bb9053fce968164c29c319d23ba5..2e260a40b41be82667d9086d760a2230a15502a3 100644 (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();
+       }
 }