The D7 version had storage plugin support which was used to add access to PostGIS, and presumably could be used for other backends that had different storage requirements other than bytea. This is already indicated as a need in the D8 code base:
class GeofieldItem extends FieldItemBase {
...
// @TODO: Backend plugins need to define requirement/settings methods,
// allow them to inject data here.
From whatr I can tell, this may have been due to a mis-named function (maybe a hold over from early D8 Field API?). Anyhow, the patch attached will at least allow the backend selection field to show up on the Storage configuration page -- however, the property "backend" is not being stored. Anyhow, this patch, if it is the right approach inches forward on this. This patch actually does two things:
- Rename "GeofieldItem::instanceSettingsForm()" to "GeofieldItem::storageSettingsForm()"
- Replace calls to "$field->settings" which is private to the public function "$field->getSettings"
Woulkd be interested in feedback on both.
Comments
Comment #2
robertwb CreditAttribution: robertwb commentedComment #3
robertwb CreditAttribution: robertwb commentedComment #4
robertwb CreditAttribution: robertwb commentedComment #5
heddnI think we need fieldSettingsForm and storageSettingsForm. The both of them. Or we should cleanup the default configuration in defaultFieldSettings and defaultStorageSettings.
Comment #6
Toilal CreditAttribution: Toilal commentedIt seems on current Drupal 8 version (actually, i'm running 8.0.0-beta1), we only have to implement storageSettingsForm instead of fieldSettingsForm for custom backend to work properly. I have attached a patch.
Comment #7
itamair CreditAttribution: itamair as a volunteer commented