EntityGenerator
Generates a Doctrine entity from the `--fields` DSL following the framework's conventions (strict types, id + uuid via {@see \Milpa\Support\UuidGenerator}, typed accessors, enum-as-string columns, ManyToOne relations). Emits one file under the plugin's `Entities/`.
EntityGenerator::__construct()
public function __construct(Milpa\DevTools\Make\FieldParser $parser = new FieldParser(), Milpa\DevTools\Make\StubRenderer $renderer = new StubRenderer()):Parameters
| Name | Type | Description |
|---|---|---|
| $parser | Milpa\DevTools\Make\FieldParser | |
| $renderer | Milpa\DevTools\Make\StubRenderer |
EntityGenerator::name()
public function name(): stringThe `<what>` token this generator answers to: `'entity'`.
EntityGenerator::generate()
public function generate(Milpa\DevTools\Make\GenerationContext $context): Milpa\DevTools\Make\GenerationResultParses `--fields`, renders the entity class, and returns it paired with its `entity` verify target.
Parameters
| Name | Type | Description |
|---|---|---|
| $context | Milpa\DevTools\Make\GenerationContext |