Skip to content
Christian Münch edited this page Jun 15, 2013 · 10 revisions

Twig Support

n98-magerun offers Twig support for i.e. code generation of new new modules. To render Twig templates we offer a twig console helper. See Helpers for more informations.

All Twig templates which are bundled inside the .phar file can be found in the folder "res/twig". You can define your own Twig templates by providing a Twig base folder in your ~/.n98-magerun.yaml (for other configs options see Config).

Define a baseDir:

twig:
  baseDirs:
    - path/to/my/twig/templates

Variables And Template Structure

Command dev:module:create

vendorNamespace
String -> Vendor name like "N98"
moduleName
String -> Your defined module name
codePool
String -> i.e. "local"
createBlocks
Bool -> should blocks be created?
createModels
Bool -> should models be created?
createHelpers
Bool -> should helpers be created?
createSetup
Bool -> should a setup be created?
authorName
String: Name of author
authorEmail
String: Email of author
description
String: Description of the module
twig
└── dev
└── module
└── create
├── app
│   └── etc
│   └── modules
│   ├── config.twig
│   ├── definition.twig
│   └── readme.twig
├── composer.twig
└── modman.twig
Clone this wiki locally