Projet SunshineAdminBundle

DataTypes detection and configuration

logo

Configuring 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.

Prority Description
1 (most important) Yaml configuration for Form or List
2 Yaml configuration for attributes section
3 Assert annotations
4 (last) Doctrine annotations

Yaml Priorities

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.

Note: 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.

About the author

Eric Wallet

Add Comment

Click here to post a comment

Votre adresse de messagerie ne sera pas publiée.