@@ 152-175 (lines=24) @@ | ||
149 | * |
|
150 | * @return array |
|
151 | */ |
|
152 | protected function getEnabledAddonNamespaces() |
|
153 | { |
|
154 | if (!env('INSTALLED')) { |
|
155 | return []; |
|
156 | } |
|
157 | ||
158 | $modules = $this->modules->cache( |
|
159 | 'streams::modules.enabled', |
|
160 | 9999, |
|
161 | function () { |
|
162 | return $this->modules->getEnabledNamespaces()->all(); |
|
163 | } |
|
164 | ); |
|
165 | ||
166 | $extensions = $this->extensions->cache( |
|
167 | 'streams::extensions.enabled', |
|
168 | 9999, |
|
169 | function () { |
|
170 | return $this->extensions->getEnabledNamespaces()->all(); |
|
171 | } |
|
172 | ); |
|
173 | ||
174 | return array_merge($modules, $extensions); |
|
175 | } |
|
176 | ||
177 | /** |
|
178 | * Get namespaces for installed addons. |
|
@@ 182-205 (lines=24) @@ | ||
179 | * |
|
180 | * @return array |
|
181 | */ |
|
182 | protected function getInstalledAddonNamespaces() |
|
183 | { |
|
184 | if (!env('INSTALLED')) { |
|
185 | return []; |
|
186 | } |
|
187 | ||
188 | $modules = $this->modules->cache( |
|
189 | 'streams::modules.installed', |
|
190 | 9999, |
|
191 | function () { |
|
192 | return $this->modules->getInstalledNamespaces()->all(); |
|
193 | } |
|
194 | ); |
|
195 | ||
196 | $extensions = $this->extensions->cache( |
|
197 | 'streams::extensions.installed', |
|
198 | 9999, |
|
199 | function () { |
|
200 | return $this->extensions->getInstalledNamespaces()->all(); |
|
201 | } |
|
202 | ); |
|
203 | ||
204 | return array_merge($modules, $extensions); |
|
205 | } |
|
206 | ||
207 | /** |
|
208 | * Get the addon namespace. |