Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring getcmsfields #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Refactoring getcmsfields #10

wants to merge 2 commits into from

Conversation

spekulatius
Copy link
Contributor

No description provided.

@purplespider
Copy link
Owner

There was a reason I was using beforeUpdateCMSFields, but I'll need to remind myself what this was and get back to you!

@spekulatius
Copy link
Contributor Author

Sure, no problem. I couldn't really figure out why, especially as it was the only place where I found this.

@spekulatius
Copy link
Contributor Author

Have you had a chance to look into this @purplespider ?

@purplespider
Copy link
Owner

Hmm, just had a look at this. I use this module on many different websites, and on some of them I create a custom extension that modifies CalendarEntry, for example to add more fields or remove fields that aren't required for that particular site (such as Time).

So I'm pretty sure that it was added to allow me to do that. However, I've just had a play with some of my extensions and I've struggled to find one that was actually depending on beforeUpdateCMSFields. It seems it just does the same job as the $this->extend('updateCMSFields', $fields); hook, and that as long as at least one of those exists the extensions work as expected.

But looking at the module's history the updateCMSFields hook was added way before I added beforeUpdateCMSFields. So I'm still wondering why I felt the need to add it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants