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
|
* @param string $description
|
||||||
* @return bool
|
* @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)) {
|
if (is_array($commandName)) {
|
||||||
$success = true;
|
$success = true;
|
||||||
foreach ($commandName as $command) {
|
foreach ($commandName as $command) {
|
||||||
@ -74,8 +74,10 @@ class CommandManager implements CallbackListener {
|
|||||||
$this->addListenerCallback($this->commandListeners, $listenerCallback, $command);
|
$this->addListenerCallback($this->commandListeners, $listenerCallback, $command);
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO description
|
// TODO: description(?)
|
||||||
|
if ($description) {
|
||||||
$this->helpManager->registerCommand($command, $adminCommand, $description, get_class($listener) . '\\' . $method);
|
$this->helpManager->registerCommand($command, $adminCommand, $description, get_class($listener) . '\\' . $method);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user