Important
You are browsing the documentation for version 3.1 of OroCommerce, OroCRM and OroPlatform, which is no longer maintained. Read version 5.1 (the latest LTS version) of the Oro documentation to get up-to-date information.
See our Release Process documentation for more information on the currently supported and upcoming releases.
@ConfigField¶
This annotation is used to configure default values for properties of configurable entity classes.
Options¶
defaultValues
¶
Configures default values for particular config options on a per property basis:
1// ...
2use Oro\Bundle\EntityConfigBundle\Metadata\Annotation\ConfigField;
3
4class User
5{
6 /**
7 * @ConfigField(
8 * defaultValues={
9 * "dataaudit"={
10 * "auditable"=true
11 * }
12 * }
13 * )
14 */
15 private $username;
16}
This example sets the auditable
option from the dataaudit
scope to true
for the
username
property in the User
class.