Skip to content

CustomFilter documentation example does not work correctly. #1415

@phtmgt

Description

@phtmgt

2 issues:

  1. the $property passed to the filterProperty function is 'regexp_$property' instead of the correct property only. This always bypasses the filter, because, apparently such a property (regex_...) is neither enabled, nor mapped. In addition, even if we skip the bypass, we have issues when using $property in queryBuilder andWhere expressions.
  2. REGEXP expression is not functioning by default in symfony (apparently requires some extra bundle). Maybe use another example that works out of the box.

Finally, one side question:

!$this->isPropertyEnabled($property, $resourceClass) ||
!$this->isPropertyMapped($property, $resourceClass)

Can anyone explain concisely how this logic operates? For some reason, I cannot enable a filter on toMany relationship, as this is always triggered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions