Skip to content

Latest commit

 

History

History
19 lines (12 loc) · 644 Bytes

extend-generate-command.md

File metadata and controls

19 lines (12 loc) · 644 Bytes

Extend Template Generate Command

  1. On your console entry point just add the following before running the application:

    • $application->addGeneratorCommand('template:generate', 'VendorName\ProjectName\Command\TemplateGenerateCommand');
  2. Create your own custom class that inherits from Staempfli\UniversalGenerator\Command\TemplateGenerateCommand

  3. You can implement the following methods to add your customisations:

    protected function beforeExecute()
    {}
    
    protected function beforeAskInputProperties()
    {}
    
  4. If these methods do not fit all your needs, then you can also extend existing ones.