Commands
Global commands list
The commands page allows you to view all the commands in your project:
- Module
- Command name
- Command class
Module commands list
In the module detail view, you can see the commands declared by this module.
Module command creation
You can create a new command by clicking Generate
> Command
button from the module detail view.
The module command creation wizard includes the following features:
- Auto-generate the command name
- Allow you to select which services should be injected into the command constructor (
LoggerInterface
andScopeConfigInterface
for now)
The following files are created/updated in app/code/Vendor/Module
when you create a new command:
etc/di.xml
: created if it does not exist, or updated with the new command declarationCommand/CommandName.php
: created with the new command class
NOTE
The command class name is inferred from the command name you provide.