Skip to content

Add ListMetadataVisitor for expressions #7983

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

Merged
merged 1 commit into from
Jul 11, 2025

Conversation

Prokyonn
Copy link
Member

@Prokyonn Prokyonn commented Jun 2, 2025

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Fixed tickets fixes #
Related issues/PRs #
License MIT
Documentation PR sulu/sulu-docs#

What's in this PR?

Adds a ExpressionListMetadataVisitor and allows expressions in filter selects.

Why?

To support expresions for filters, like in the select field.

Example Usage

        <property name="mainSite" visibility="yes" translation="app.main_site" searchability="yes">
            <field-name>mainSite</field-name>
            <entity-name>App\Model\Example</entity-name>

            <filter type="select">
                <params>
                    <param name="options" type="expression"
                           value="service('App\\Content\\Provider\\SiteSelectProvider').getFilterValues()"
                    />
                </params>
            </filter>
        </property>

To Do

  • Create a documentation PR
  • Add breaking changes to UPGRADE.md

@Prokyonn Prokyonn force-pushed the feature/expression-filters branch from 4b7c1c7 to e7fee52 Compare June 3, 2025 11:42
@Prokyonn Prokyonn marked this pull request as ready for review July 11, 2025 08:08
@Prokyonn Prokyonn requested a review from wachterjohannes July 11, 2025 08:08
@wachterjohannes wachterjohannes merged commit 3eb1382 into sulu:2.6 Jul 11, 2025
9 checks passed
@alexander-schranz alexander-schranz added DX Affecting the end developer Feature New functionality not yet included in Sulu and removed DX Affecting the end developer labels Jul 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New functionality not yet included in Sulu
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants