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

#3 Declare missing abstract methods for Craft 3.2 compatibility #4

Merged
merged 4 commits into from
Jul 14, 2019

Conversation

ajoliveau
Copy link

Two new abstract methods in FieldInterface are missing from StaticFieldDecorator :

  • afterElementPropagate which allows the plugin to run some code after an element propagates. I don't think this plugin wants do to that so the method is empty
  • valueType that returns the specific type of the Field and is used for syntaxic autocompletion in code editors. This plugin's users wouldn't need to touch the StaticFieldDecorator class so I think it makes sense to keep the default mixed

@ajoliveau ajoliveau changed the title Declare missing abstract methods for Craft 3.2 compatibility #3 Declare missing abstract methods for Craft 3.2 compatibility Jul 10, 2019
@moacode
Copy link
Owner

moacode commented Jul 14, 2019

Thanks for identifying the issue! I've tweaked it slightly to add those methods on to the FieldDecorator class, as it directly extends the FieldInterface. It'll also call the decorated class's methods (so in essence the default behavior), rather than hard coding a return value.

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.

4 participants