Skip to content

Support custom callbacks in AssetReferenceUpdater for handling custom fieldtypes #698

@jacksleight

Description

@jacksleight

The AssetReferenceUpdater handles all the built-in fieldtypes, but doesn't have a way to update custom fieldtypes. This means that asset values either stored directly in a custom field, or in an asset/bard/markdown field that's nested inside a custom field, aren't updated when an asset changes.

It would be useful if people extending or addons could add some kind of custom callbacks to the updater, so they can update their values at the same time the core fieldtype values are updated.

I think it might be possible to update assets in custom fields already, by basically duplicating what the asset listener and AssetReferenceUpdater do, but it feels like a built in solution within AssetReferenceUpdater would be tidier, and probably more performant as well (otherwise you'd be scanning through the entries multiple times).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions