File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
src/Ubiquity/devtools/cmd Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -580,6 +580,22 @@ public static function preloadCustomCommands(array $config = []) {
580580 }
581581 }
582582
583+ public static function getCommandNames (array $ excludedCategories = [
584+ 'installation ' => false ,
585+ 'servers ' => false
586+ ], $ excludedCommands = []) {
587+ $ result = [];
588+ $ commands = self ::getCommands ();
589+ foreach ($ commands as $ command ) {
590+ $ cat = $ command ->getCategory ();
591+ $ commandName = $ command ->getName ();
592+ if (! isset ($ excludedCommands [$ commandName ]) && ! isset ($ excludedCategories [$ cat ])) {
593+ $ result [] = $ commandName ;
594+ }
595+ }
596+ return $ result ;
597+ }
598+
583599 public static function getCommands () {
584600 return [
585601 self ::initCache (),
You can’t perform that action at this time.
0 commit comments