Field type and overrides
Configuration of data types
There is no configuration required for type of your entities attributes. Anyway, the application is going to try to find type description in your assert or doctrine annotations.
Inheritance of types
The application is looking for the following order to extract field type informations.
Priority
Description
1 (most important)
Yaml configuration for Form Section or List Section
2
Yaml configuration for Attributes section
3
Assert annotations
4 (last)
Doctrine annotations
Using this configuration, Sunshine will decide that the field 'name' is a String by reading the 'attributes' section of YAML
If a value was configured in the sections 'form' or 'list', sunshine would use them istead of the attributes value in the correct context.
If you used a custom formType, it is your responsability to handle the configuration override.
Doctrine Annotation
Using this doctrine annotation, Sunshine will consider this field as a datetime field.
Assert Annotation
Using this configuration, Sunshine will use the Asset\Type configuration instead of Doctrine due to priority.
Last updated