We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f1fd4e3 commit 9aba233Copy full SHA for 9aba233
src/FileRepository.php
@@ -308,6 +308,30 @@ public function getOrdered($direction = 'asc') : array
308
return $modules;
309
}
310
311
+ /**
312
+ * Get all available modules.
313
+ *
314
+ * @return array
315
+ */
316
+ public function getAvailable()
317
+ {
318
+ $paths = $this->getScanPaths();
319
+
320
+ $modules = [];
321
322
+ foreach ($paths as $key => $path) {
323
+ $manifests = $this->getFiles()->glob("{$path}/module.json");
324
325
+ is_array($manifests) || $manifests = [];
326
327
+ foreach ($manifests as $manifest) {
328
+ $modules[] = Json::make($manifest)->get('alias');
329
+ }
330
331
332
+ return $modules;
333
334
335
/**
336
* Get a module path.
337
*
0 commit comments