Problem/Motivation
Setting default values for additional types can't be done using field defaults.
Proposed resolution
- Create service SchemaDotOrgAdditonalTypeDefaultValues
- Add ::entityCreate. method
- Only set the default value if the field empty
- For simple values (string, int, or bool) detect the default property.
- Can you cache by entity type bundle and additional type
- Alter Schema.org mapping form to include default values under 'Additional type' details
- Support multiple default values
Examples
entity_type_id—SchemaType—additional_type:
field_name: value
schemaProperty: value
entity_type_id—SchemaType—bundle--additional_type:
field_name: value
schemaProperty: value
entity_type_id—bundle—additional_type:
field_name: value
schemaProperty: value
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork schemadotorg-3554079
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
jrockowitz commented