docs icon indicating copy to clipboard operation
docs copied to clipboard

CustomFilter documentation example does not work correctly.

Open phtmgt opened this issue 4 years ago • 0 comments

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.

phtmgt avatar Aug 26 '21 16:08 phtmgt