2017 © Pedro Peláez
 

symfony-bundle generator-bundle

Generates Symfony2 documents, forms and CRUD

image

ismaambrosi/generator-bundle

Generates Symfony2 documents, forms and CRUD

  • Tuesday, May 3, 2016
  • by iambrosi
  • Repository
  • 4 Watchers
  • 28 Stars
  • 50,064 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 14 Forks
  • 4 Open issues
  • 15 Versions
  • 5 % Grown

The README.md

IsmaAmbrosiGeneratorBundle

Build Status Total Downloads Latest Stable Version Latest Unstable Version SensioLabsInsight, (*1)

This bundle extends the commands provided by SensioGeneratorBundle, adding a MongoDB document generator and CRUD generators for those MongoDB documents., (*2)

Installation

Add the bundle to your project.

Add the requirement to composer:, (*3)

$ php composer.phar require ismaambrosi/generator-bundle

You will also need to install the DoctrineMongoDBBundle. The instructions on how to install it are available in the Symfony2 documentation., (*4)

Enable the bundle in your kernel

<?php
// app/AppKernel.php

public function registerBundles()
{
    // ...
    if (in_array($this->getEnvironment(), array('dev', 'test'))) {
        // ...
        $bundles[] = new IsmaAmbrosi\Bundle\GeneratorBundle\IsmaAmbrosiGeneratorBundle();
    }
}

It is recommended to disable this bundle for the production environment., (*5)

Commands

This bundle contains three commands that will allow you to generate code for documents, forms and CRUD controllers. These commands can be executed either on interactive mode or manual mode. I would recommend you to use the interactive mode., (*6)

Generating ODM documents

The first command allows to generate the document classes., (*7)

Examples:, (*8)

$ php app/console doctrine:mongodb:generate:document
$ php app/console doctrine:mongodb:generate:document \
--document=AcmeBlogBundle:Blog/Post \
--with-repository

Generating forms

With the second command we can generate the form type classes, used by the form component., (*9)

Example:, (*10)

$ php app/console doctrine:mongodb:generate:form AcmeBlogBundle:Post

Generating the CRUD

The last command generates the CRUD controllers, with read-only actions to handle the documents that were generated previously. It also allows to include the write actions, for creating, updating and deleting documents., (*11)

Examples:, (*12)

$ php app/console doctrine:mongodb:generate:crud
# Specifying the document and the routing prefix
$ php app/console doctrine:mongodb:generate:crud \
--document=AcmeBlogBundle:Post \
--route-prefix=post_admin
# Specifying the document, routing and write-actions
$ php app/console doctrine:mongodb:generate:crud \
--document=AcmeBlogBundle:Post \
--route-prefix=post_admin --with-write

The Versions

03/05 2016

dev-master

9999999-dev

Generates Symfony2 documents, forms and CRUD

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ismael Ambrosi

mongodb symfony

07/01 2016

dev-symfony-3

dev-symfony-3

Generates Symfony2 documents, forms and CRUD

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ismael Ambrosi

mongodb symfony

02/12 2015

v2.5.0

2.5.0.0

Generates Symfony2 documents, forms and CRUD

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ismael Ambrosi

mongodb symfony

14/09 2015

dev-15-new-form-method

dev-15-new-form-method

Generates Symfony2 documents, forms and CRUD

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ismael Ambrosi

mongodb symfony

23/05 2015

dev-php7

dev-php7

Generates Symfony2 documents, forms and CRUD

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ismael Ambrosi

mongodb symfony

12/12 2014

v2.4.0

2.4.0.0

Generates Symfony2 documents, forms and CRUD

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ismael Ambrosi

mongodb symfony

09/08 2014

v2.3.1

2.3.1.0

Generates Symfony2 documents, forms and CRUD

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ismael Ambrosi

mongodb symfony

04/12 2013

2.3.x-dev

2.3.9999999.9999999-dev

Generates Symfony2 documents, forms and CRUD

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ismael Ambrosi

15/07 2013

v2.3.0

2.3.0.0

Generates Symfony2 documents, forms and CRUD

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ismael Ambrosi

20/06 2013

2.2.x-dev

2.2.9999999.9999999-dev

Generates Symfony2 documents, forms and CRUD

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ismael Ambrosi

20/06 2013

v2.2.0

2.2.0.0

Generates Symfony2 documents, forms and CRUD

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ismael Ambrosi

20/06 2013

2.1.x-dev

2.1.9999999.9999999-dev

Generates Symfony2 documents, forms and CRUD

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ismael Ambrosi

20/06 2013

v2.1.1

2.1.1.0

Generates Symfony2 documents, forms and CRUD

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ismael Ambrosi

22/03 2013

v2.1.0

2.1.0.0

Generates Symfony2 documents, forms and CRUD

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ismael Ambrosi

16/07 2012

2.0.x-dev

2.0.9999999.9999999-dev

Generates Symfony2 documents, forms and CRUD

  Sources   Download

MIT

The Requires

 

by Ismael Ambrosi