Code Generator

Edit on GitHub

The CodeGenerator module can generate your project code.

Out of the box it provides generators for Yves, Zed, Client, Service and Shared application layers.

Check out our new code generation tool Spryk.

Installation

Install it as

composer require --dev spryker/code-generator

You need to run vendor/bin/console transfer:generate now.

Then make sure you enable the console commands in your getConsoleCommands() method in ConsoleDependencyProvider:

<?php
    if (Environment::isDevelopment()) {
        ....
        $commands[] = new BundleCodeGeneratorConsole();
        $commands[] = new BundleYvesCodeGeneratorConsole();
        $commands[] = new BundleZedCodeGeneratorConsole();
        $commands[] = new BundleClientCodeGeneratorConsole();
        $commands[] = new BundleSharedCodeGeneratorConsole();
    }

How to use it

You can now use the commands, to e.g. generate the application layers for FooBar module as follows:

console code:generate:module:all FooBar
console code:generate:module:yves FooBar
console code:generate:module:zed FooBar
console code:generate:module:client FooBar
console code:generate:module:shared FooBar