All Questions
3 questions
2
votes
1
answer
80
views
Registering an element source with EVENT_REGISTER_SOURCES for a specific site ID
Is it possible to register an element source for a specific site ID, while it not appearing in another?
I have a module which is currently registering element sources, however we are now looking to ...
14
votes
3
answers
2k
views
How do we distinguish between a 'New' and 'Updated' Live Entry using the craft\elements\Entry::EVENT_AFTER_SAVE event?
I can't decide if I'm missing something or this should be a bug. With the recent changes to Drafts/Revisions in Craft 3.7 it's not clear to me how to distinguish between New and Updated Entries using ...
1
vote
1
answer
1k
views
Hook into Entry::EVENT_AFTER_SAVE when user saves it
I want to send a Mail to an admin, whenever a User of group ‚Cook‘ creates an Entry of Type ‚Recipe‘.
For that I created an Event reacting on Entry::EVENT_AFTER_SAVE :
Event::on(
Entry::class,
...