Skip to content

Latest commit

 

History

History
63 lines (52 loc) · 2.64 KB

2_getting_started.md

File metadata and controls

63 lines (52 loc) · 2.64 KB

WameGeneratorBundle

1. Introduction | 2. Getting started | 3. Configuration options | 4. Entity Generation | 5. CRUD Generation | 6. Enum Generation | 7. Form Generation | 8. Voter Generation | 9. Datatable Generation | 10. Overriding twig files | 11. Extending this bundle

Getting started

Install the bundle for the dev-environment using composer.

composer require wame/generator-bundle:dev-master --dev

In your app/AppKernel.php file, add the bundle for the development environment:

 public function registerBundles()
    {
        ...
        
        if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
            ...
            $bundles[] = new \Wame\GeneratorBundle\WameGeneratorBundle();
            if ('dev' === $this->getEnvironment()) {
                //Add the bundle here instead if you do not need any to change any configuration options.
            }
        }
        ...
    }

If you are certain that you're not going to set any configurations for this generator, then you could add the bundle to the development environment only.

Required / Recommended bundles

The following bundles are assumed to be installed and configured:

  • DatatablesBundle for datatables.
    If you do not wish to use datatables, you can disable this in your config_dev.yml, so that you won't be bothered with the question of using datatables.
    Note that the DatatablesBundle requires that the FOSJsRoutingBundle is installed.
  • StofDoctrineExtensionsBundle for Gedmo trait-options. If you do not wish to use these traits, you can disable this in your config_dev.yml, so that you won't be bothered with questions about using traits.
  • DoctrineEnumBundle for enumerables.
    If you do not intent to use enum, simply do not use it when asked for a property type.

For disabling the bundles in the config files, see
Configuration options.