Custom Commands

Articles & References

Getting Started

Generate a starting template with:

drush generate drush:command-file, or shorter: drush gen dcf

Output

  • Write a line:
    $this->output()->writeln(dt('the output string'));