Customize Field Type metadata¶
When creating a content type definition, you add Fields and configure their metadata, such as whether they are required, translatable, and so on.
If needed, you can customize that some of those options are disabled in the Back Office for specific Field Types.
To do this, add custom service definition for ModifyFieldDefinitionsCollectionTypeExtension
For example, this configuration means that no Image Field can be set as required in the definition of a content type:
1 2 3 4 5 6 7 8 9 |
|
fieldTypeIdentifier
refers to the identifier of the Field Type, in this case ezimage
.
modifiedOptions
lists the changes you want to make. The following options are available:
disable_identifier_field
- disables changing the Field identifierdisable_required_field
- disables setting the Field as requireddisable_translatable_field
- disables setting the Field as translatabledisable_remove
- disables removing the Field from content type definition (after it has been saved)