k3ssen/generator

Generate content for your symfony4 project

Installs: 3 085

Dependents: 1

Suggesters: 0

Security: 0

Stars: 2

Watchers: 3

Forks: 1

Open Issues: 0

Type:symfony-bundle

0.1.0 2019-10-20 13:58 UTC

This package is auto-updated.

Last update: 2024-03-27 21:16:46 UTC


README

Build Status

A Symfony bundle for quickly generating/prototyping a CRUD application. Compatible with Symfony 3.4 and Symfony 4.

This bundle is similar to Symfony's MakerBundle, except that this bundle is built to be more extensible.

Features:

  • Generate entities using interactive commands:
    • Define properties with their types (string, int, array, etc) and attributes (length, nullable, unique, etc)
    • Types also include relationship-types
      • ManyToOne, OneToMany, ManyToMany, OneToOne
      • Adds fields to mapped or inversed targetEntity
      • creates target entity if it does'nt exist yet.
    • Add validations (annotations like @Assert\Length)
    • Add fields to existing entities
    • Add traits
    • Read existing entities and interactively add/edit/remove properties.
  • Generate CRUD based on entities, including:
    • Controller (optionally use subdirectories)
    • AbstractController (generated once to be used by Controllers)
    • Template (twig) files
    • Form
    • Voter (optional)
    • AbstractVoter (generated once to be used by Voters)
    • Datatable (optional)
    • AbstractDatatable (generated once to be used by Datatables)

This bundle is highly customizable:

  • Files are generated through twig files, which you can override by using identical files in /templates/bundles/GeneratorBundle/....
    • To make things simpler, you can use the command generate:templates to have this done automatically for you.
    • By using the meta_entity and generate_options parameters in twig you'll have lots of options to make your files perfectly suited for your application.
  • Enable/disable questions that you do or don't need
  • Specify defaults
  • For complex usage, the bundle is built in a very extensible way, allowing you to override nearly everything independently.

Documenation