only show commands in help that have a description
This commit is contained in:
parent
d5b6e16ccd
commit
c2e1ca0938
@ -48,7 +48,7 @@ class CommandManager implements CallbackListener {
|
||||
* @param string $description
|
||||
* @return bool
|
||||
*/
|
||||
public function registerCommandListener($commandName, CommandListener $listener, $method, $adminCommand = false, $description = '') {
|
||||
public function registerCommandListener($commandName, CommandListener $listener, $method, $adminCommand = false, $description = null) {
|
||||
if (is_array($commandName)) {
|
||||
$success = true;
|
||||
foreach ($commandName as $command) {
|
||||
@ -74,8 +74,10 @@ class CommandManager implements CallbackListener {
|
||||
$this->addListenerCallback($this->commandListeners, $listenerCallback, $command);
|
||||
}
|
||||
|
||||
//TODO description
|
||||
// TODO: description(?)
|
||||
if ($description) {
|
||||
$this->helpManager->registerCommand($command, $adminCommand, $description, get_class($listener) . '\\' . $method);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user