{"id":21002692,"url":"https://github.com/iambrosi/ismaambrosigeneratorbundle","last_synced_at":"2025-05-15T00:31:24.378Z","repository":{"id":2269200,"uuid":"3225619","full_name":"iambrosi/IsmaAmbrosiGeneratorBundle","owner":"iambrosi","description":"Generates Symfony2 documents, forms and CRUD for MongoDB documents","archived":false,"fork":false,"pushed_at":"2017-05-04T16:56:02.000Z","size":212,"stargazers_count":26,"open_issues_count":4,"forks_count":12,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-18T14:16:41.949Z","etag":null,"topics":["bundle","crud","php","symfony","symfony-bundle"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iambrosi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-01-20T10:48:31.000Z","updated_at":"2024-02-27T06:27:37.000Z","dependencies_parsed_at":"2022-09-02T03:51:12.210Z","dependency_job_id":null,"html_url":"https://github.com/iambrosi/IsmaAmbrosiGeneratorBundle","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iambrosi%2FIsmaAmbrosiGeneratorBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iambrosi%2FIsmaAmbrosiGeneratorBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iambrosi%2FIsmaAmbrosiGeneratorBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iambrosi%2FIsmaAmbrosiGeneratorBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iambrosi","download_url":"https://codeload.github.com/iambrosi/IsmaAmbrosiGeneratorBundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225317015,"owners_count":17455355,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bundle","crud","php","symfony","symfony-bundle"],"created_at":"2024-11-19T08:19:38.557Z","updated_at":"2024-11-19T08:19:39.146Z","avatar_url":"https://github.com/iambrosi.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IsmaAmbrosiGeneratorBundle \n\n[![Build Status](https://secure.travis-ci.org/iambrosi/IsmaAmbrosiGeneratorBundle.png?branch=master)](http://travis-ci.org/iambrosi/IsmaAmbrosiGeneratorBundle)\n[![Total Downloads](https://poser.pugx.org/ismaambrosi/generator-bundle/downloads.png)](https://packagist.org/packages/ismaambrosi/generator-bundle)\n[![Latest Stable Version](https://poser.pugx.org/ismaambrosi/generator-bundle/v/stable.png)](https://packagist.org/packages/ismaambrosi/generator-bundle)\n[![Latest Unstable Version](https://poser.pugx.org/ismaambrosi/generator-bundle/v/unstable.png)](https://packagist.org/packages/ismaambrosi/generator-bundle)\n[![SensioLabsInsight](https://insight.sensiolabs.com/projects/54e00601-0232-471a-ae8e-b5d534a3a819/mini.png)](https://insight.sensiolabs.com/projects/54e00601-0232-471a-ae8e-b5d534a3a819)\n\nThis bundle extends the commands provided by [SensioGeneratorBundle](https://github.com/sensio/SensioGeneratorBundle), adding a MongoDB document generator and CRUD generators for those MongoDB documents.\n\n\nInstallation\n------------\n\n### Add the bundle to your project.\n\nAdd the requirement to composer:\n\n```bash\n$ php composer.phar require ismaambrosi/generator-bundle\n```\n\nYou will also need to install the DoctrineMongoDBBundle. The instructions on how to install it are available in the Symfony2 [documentation](http://symfony.com/doc/master/bundles/DoctrineMongoDBBundle/index.html).\n\n### Enable the bundle in your kernel\n\n```php\n\u003c?php\n// app/AppKernel.php\n\npublic function registerBundles()\n{\n    // ...\n    if (in_array($this-\u003egetEnvironment(), array('dev', 'test'))) {\n        // ...\n        $bundles[] = new IsmaAmbrosi\\Bundle\\GeneratorBundle\\IsmaAmbrosiGeneratorBundle();\n    }\n}\n```\nIt is recommended to disable this bundle for the production environment.\n\n\n### Commands\n\nThis 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.\n\n#### Generating ODM documents\n\nThe first command allows to generate the document classes.\n\nExamples:\n\n```bash\n$ php app/console doctrine:mongodb:generate:document\n```\n\n```bash\n$ php app/console doctrine:mongodb:generate:document \\\n--document=AcmeBlogBundle:Blog/Post \\\n--with-repository\n```\n\n\n#### Generating forms\n\nWith the second command we can generate the form type classes, used by the form component.\n\nExample:\n\n```bash\n$ php app/console doctrine:mongodb:generate:form AcmeBlogBundle:Post\n```\n\n#### Generating the CRUD\n\nThe 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.\n\nExamples:\n\n```bash\n$ php app/console doctrine:mongodb:generate:crud\n```\n\n```bash\n# Specifying the document and the routing prefix\n$ php app/console doctrine:mongodb:generate:crud \\\n--document=AcmeBlogBundle:Post \\\n--route-prefix=post_admin\n```\n\n```bash\n# Specifying the document, routing and write-actions\n$ php app/console doctrine:mongodb:generate:crud \\\n--document=AcmeBlogBundle:Post \\\n--route-prefix=post_admin --with-write\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiambrosi%2Fismaambrosigeneratorbundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiambrosi%2Fismaambrosigeneratorbundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiambrosi%2Fismaambrosigeneratorbundle/lists"}