• Stars
    star
    250
  • Rank 162,397 (Top 4 %)
  • Language
    PHP
  • Created over 8 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Code generator for Magento 2

Magento 2 Code Generator Tool

Project Status: Abandoned โ€“ Initial development has started, but there has not yet been a stable, usable release; the project has been abandoned and the author(s) do not intend on continuing development. License Version Code Climate Total Downloads

Installation

Option1: Downloading .phar

wget https://github.com/staempfli/magento2-code-generator/releases/download/<version>/mg2-codegen.phar
chmod +x ./mg2-codegen.phar
# use the command globally on your system
sudo mv ./mg2-codegen.phar /usr/local/bin/mg2-codegen

Option2: Using Composer

Install globally on your system with the following command:

composer global require "staempfli/magento2-code-generator"

Just make sure you have the composer bin dir in your $PATH. The default value is ~/.composer/vendor/bin/

Note: if you have dependency problems with other projects installed globally, we recommend you to use consolidation/cgr

Usage

  1. List all templates: mg2-codegen template:list

  2. Generate template: mg2-codegen template:generate <template>

NOTE:

  • template:generate command must be executed on the module root folder where the registration.php file is. You can also use option --root-dir to specify this path, if you execute it from a different location.

  • When creating a new module, you must create first the module parent folder and execute the command from there.

Demo

Video Demo

You can also watch a more detailed video demos on Youtube:

Available Templates

Featured
  ajaxHtml
  consoleCommand
  crudEAV
  crudEAVWithFile
  frontController
  requireJs
  logger
  widget

More Templates
  ajaxJson
  ajaxRestApi
  blockHtml
  crud
  crudEAVWithMultipleFiles
  customConfigXml
  customDBConnection
  email
  emailFormRequest
  fileEAVAttribute
  fileEAVMultiple
  fileModel
  fileProcessor
  fotoramaSlider
  language
  model
  module

Create new Templates

Clone and Install Project

For that you cannot use the .phar binary, so you need to install the project:

Contribute with new Templates

Private Templates

If current templates do not fill your needs, you can easily create your own templates. Just follow the manual:

Prerequisites

  • PHP >= 5.6.*

Developers

Licence

Copyright

(c) 2016 Staempfli AG

More Repositories

1

magento2-phpstorm-templates

PHPStorm Live template preferences for Magento 2 Projects
PHP
227
star
2

magento2-module-seo

Magento 2 Module for Search Engine Optimization
PHP
101
star
3

magento2-module-image-resizer

Magento 2 Module to add simple image resizing capabilities in all blocks and .phtml templates
PHP
93
star
4

magento2-module-pdf

Magento 2 Module for creating PDF's based on wkhtmltopdf
PHP
58
star
5

magento2-builder-tool

Magento2 command tool to build and sync projects
PHP
41
star
6

magento2-module-widget-extra-fields

Magento 2 Module that adds extra field types for Widgets. For example Image and WYSIWYG fields
PHP
20
star
7

magento2-module-checkout-newsletter-subscription

Increase your newsletter subscriptions by adding a newsletter subscription checkbox to the checkout.
PHP
18
star
8

magento-product-attachment

The Extension is no longer being maintained!
PHP
16
star
9

magento2-module-mailcatcher

Magento 2 Module to catch, log and redirect emails on Local and Dev Servers
PHP
14
star
10

magento2-module-slack

Magento 2 Module to send Notifications to a Slack Channel via Webhook.
PHP
14
star
11

magento2-module-cookie-consent

Magento 2 wrapper for Cookie Consent by Insites
PHP
14
star
12

magento2-module-rebuild-url-rewrite

Module allows to rebuild the following URL Rewrites: categories, products and cms-pages.
PHP
13
star
13

magento2-module-spreadsheet

Magento 2 Module for parsing xlsx, xlsm and csv files from Excel
PHP
9
star
14

symlinker-pro

Small tool that creates relative symlinks from given paths. It can also create multiple symlinks from a file containing a list of paths
PHP
8
star
15

magento2-module-gdpr

Work in Progress - Magento 2 General Data Protection Regulation Module
PHP
8
star
16

magento2-language-de-ch

Swiss-German language pack for Magento 2
PHP
7
star
17

magento-pdf

This Module let's you easily create PDF's based on HTML Templates or by using the default Templates and adding the content you want.
PHP
6
star
18

universal-code-generator

Universal code generator used as base to create framework specific code generators
PHP
5
star
19

magento-symfony-console

Symfony console for Magento 1
PHP
3
star
20

magento-locale-en-gb

British (en_GB) Magento language pack.
3
star
21

crowd-login

An atlassian crowd loginprovider for wordpress.
PHP
1
star
22

typo3-conventions-checker

PHP
1
star
23

magento2-module-hipchat

PHP
1
star
24

magento2-module-chat-connector

PHP
1
star
25

cachetool

Binary tool to perform some actions over apc and opcache
1
star