Add CLI support for scaffolding models, views, controller
Add a cli mechanism to quickly generate code scaffolds on the command line.
Some examples on how it could be used:
Generate a model¶
php typo3/cli_dispatch.phpsh extbase:generate model car wheels:int seats:int manufacturer:string
- A model class Car.php with the provided properties and types
- A TCA definition
Generate a Controller¶
php typo3/cli_dispatch.phpsh extbase:generate controller car index list show
- A controller named CarController.php with the actions indexAction, listAction, showAction
- (Maybe) an entry in ext_localconf.php as allowed controller / action combination
- Html files Index.html, List.html, Show.html in Resources/Private/Templates/Car/
Todos and remarks¶
The cli actions may be named after TYPO3 Flow conventions and maybe have the same featureset.
The generated code is really very basic, just dumb files without getting too complex, so good defaults have to be found regarding the models and class inheritance of them (VO, AE, ...)