# Generator

## Prepare your entity

* implements `App\Core\Entity\EntityInterface` (see [Entity Manager](/entities/em/))
* creates a repository query (see [Repository Query](/entities/query/))
* creates a factory (see [Factory](/entities/factory/))
* generates a form (see `php bin/console make:form --help`)

## Generation

The generation is performed in CLI. These information are required:

* The name of the futur controller (eg: `MyEntityAdminController`)
* The namespace of the entity (eg: `MyEntity`)
* The namespace of the entity repository query (eg: `MyEntityRepositoryQuery`)
* The namespace of the the entity factory (eg: `MyEntityFactory`)
* The namespace of the form used to create and update the entity (eg: `MyEntityType`)

Simply run `php bin/console make:crud-controller`.
