CRUDlex\EntityDefinitionFactoryInterface¶
-
interface
EntityDefinitionFactoryInterface
¶ Interface to make the creation of the EntityDefinitions flexible. To be handed into the ServiceProvider registration via the key “crud.entitydefinitionfactory”.
-
createEntityDefinition
($table, $fields, $label, $localeLabels, $standardFieldLabels, Service $serviceProvider)¶ Creates an EntityDefinition instance.
Parameters: - $table (string) – the table of the entity
- $fields (array) – the fieldstructure just like the CRUD YAML
- $label (string) – the label of the entity
- $localeLabels (array) – the labels of the entity in the locales
- $standardFieldLabels (array) – labels for the fields “id”, “created_at” and “updated_at”
- $serviceProvider (Service) – The current service provider
Returns: EntityDefinition the new instance
-