| @@ 176-199 (lines=24) @@ | ||
| 173 | * |
|
| 174 | * @return array |
|
| 175 | */ |
|
| 176 | protected function getEnabledAddonNamespaces() |
|
| 177 | { |
|
| 178 | if (!env('INSTALLED')) { |
|
| 179 | return []; |
|
| 180 | } |
|
| 181 | ||
| 182 | $modules = $this->modules->cache( |
|
| 183 | 'streams::modules.enabled', |
|
| 184 | 9999, |
|
| 185 | function () { |
|
| 186 | return $this->modules->getEnabledNamespaces()->all(); |
|
| 187 | } |
|
| 188 | ); |
|
| 189 | ||
| 190 | $extensions = $this->extensions->cache( |
|
| 191 | 'streams::extensions.enabled', |
|
| 192 | 9999, |
|
| 193 | function () { |
|
| 194 | return $this->extensions->getEnabledNamespaces()->all(); |
|
| 195 | } |
|
| 196 | ); |
|
| 197 | ||
| 198 | return array_merge($modules, $extensions); |
|
| 199 | } |
|
| 200 | ||
| 201 | /** |
|
| 202 | * Get namespaces for installed addons. |
|
| @@ 206-229 (lines=24) @@ | ||
| 203 | * |
|
| 204 | * @return array |
|
| 205 | */ |
|
| 206 | protected function getInstalledAddonNamespaces() |
|
| 207 | { |
|
| 208 | if (!env('INSTALLED')) { |
|
| 209 | return []; |
|
| 210 | } |
|
| 211 | ||
| 212 | $modules = $this->modules->cache( |
|
| 213 | 'streams::modules.installed', |
|
| 214 | 9999, |
|
| 215 | function () { |
|
| 216 | return $this->modules->getInstalledNamespaces()->all(); |
|
| 217 | } |
|
| 218 | ); |
|
| 219 | ||
| 220 | $extensions = $this->extensions->cache( |
|
| 221 | 'streams::extensions.installed', |
|
| 222 | 9999, |
|
| 223 | function () { |
|
| 224 | return $this->extensions->getInstalledNamespaces()->all(); |
|
| 225 | } |
|
| 226 | ); |
|
| 227 | ||
| 228 | return array_merge($modules, $extensions); |
|
| 229 | } |
|
| 230 | ||
| 231 | /** |
|
| 232 | * Get the addon namespace. |
|