Add some Events which fire BEFORE a Project Config change is applied. #15872
-
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 4 replies
-
You could use the |
Beta Was this translation helpful? Give feedback.
-
Interesting. Would that also kick in when Project Config is applying the changes in a Production environment? |
Beta Was this translation helpful? Give feedback.
-
I just ran a quick test, and it doesn't look like |
Beta Was this translation helpful? Give feedback.
-
Yeah it looks like Project Config essentially maps YAML files to database tables, and isn't calling the Craft services that you might expect it would be when dealing with various data structures. |
Beta Was this translation helpful? Give feedback.
-
Just added a new |
Beta Was this translation helpful? Give feedback.
Just added a new
EVENT_BEFORE_APPLY_FIELD_SAVE
event tocraft\services\Fields
for Craft 4.13 and 5.5, which will fire before any incoming project config changes have been applied. The incoming Project Config change will be accessible via$event->config
.