mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
Merge branch '1.8' of github.com:getgrav/grav into 1.8
This commit is contained in:
commit
42c0682dd8
|
|
@ -57,6 +57,14 @@ class PluginCommandLoader implements CommandLoaderInterface
|
|||
$command = new $command_class();
|
||||
if ($command instanceof Command) {
|
||||
$this->commands[$command->getName()] = $command;
|
||||
|
||||
// If the command has an alias, add that as a possible command name.
|
||||
$aliases = $this->commands[$command->getName()]->getAliases();
|
||||
if (isset($aliases)) {
|
||||
foreach ($aliases as $alias) {
|
||||
$this->commands[$alias] = $command;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user