1

I'm using the following Event hook :

Event::on(Entry::class, Entry::EVENT_REGISTER_PREVIEW_TARGETS, function ($event) { }

The $event variable contains an array with the current $previewTargets as well as the entry that fired the event

I would like to modify the $previewTargets and then save them to the entry they belong to.

If I simply modify the $previewTargets the changes are lost at the end of the request

How can I save those changes ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.