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

feat: add fieldsBefore and fieldsAfter ApiResource extenders #4106

Merged
merged 4 commits into from
Nov 9, 2024

Conversation

SychO9
Copy link
Member

@SychO9 SychO9 commented Nov 9, 2024

There are scenarios where an extension adds a new custom attribute to save, but needs the setting/saving logic for it to be before another field.

This PR adds two new methods, fieldsBefore and fieldsAfter to be able to achieve this use case.

See the test cases for an example: https://github.com/flarum/framework/pull/4106/files#diff-744230a6616eac78ebe3308e50332c75105efa7de231ba9e81a4ccafbe0fd82eR760-R820

@SychO9 SychO9 requested a review from a team as a code owner November 9, 2024 13:17
@SychO9 SychO9 self-assigned this Nov 9, 2024
@SychO9 SychO9 merged commit 3b69af2 into 2.x Nov 9, 2024
28 checks passed
@SychO9 SychO9 deleted the sm/fields-before-after branch November 9, 2024 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants