Skip to content

Element condition refactoring - #19563

Draft
brandonkelly wants to merge 1 commit into
feature/modifyQuery-cleanupfrom
feature/element-condition-refactor
Draft

Element condition refactoring#19563
brandonkelly wants to merge 1 commit into
feature/modifyQuery-cleanupfrom
feature/element-condition-refactor

Conversation

@brandonkelly

Copy link
Copy Markdown
Member

Laying the groundwork for nested condition groups, which could be combined with OR operators.

  • Move element query param application logic into static methods, so it’s accessible for arbitrary Builders.
  • Split modifyQuery() out of ElementConditionRuleInterface, into ElementQueryConditionRuleInterface(), and modify signature to accept a Builder arg instead of the main element query, which it should modify directly (e.g. via new query param static methods).
  • Update ElementCondition to call condition rules’ modifyQuery() methods from within $query->beforeQuery(), passing the Builder object to them.

@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

📚 Storybook previews

@craftcms/uiopen Storybook

No changed components detected in this Storybook.

resources/jsopen Storybook

No changed components detected in this Storybook.

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.

1 participant