Type
staempfli-mage-tool
Staempfli AG - Magento 2 Code Generator Tool
staempfli-mage-tool
GPL-3.0
None
None
None
None
None
Download .phar
file:
wget https://github.com/staempfli/magento2-code-generator/releases/download/<version>/mg2-codegen.phar
Make the .phar
file executable:
chmod +x ./mg2-codegen.phar
If you want to use the command globally on your system:
sudo cp ./mg2-codegen.phar /usr/local/bin/mg2-codegen
Go to your module root folder
List all templates: ./mg2-codegen.phar template:list
Generate template: ./mg2-codegen.phar template:generate <template>
NOTE:
This commands mut be executed on the root module folder where the registration.php
file is.
When creating a new module
, you must create first the module parent folder and execute the command from there.
For that you cannot use the .phar
binary, so you need to install the project:
If you want to contribute with new templates, just do the following:
If current templates do not fill your needs, you can easily create your own templates. Just follow the manual: