Implemented an easy to use APIFilter for tags

This makes the process of filters more easily and intuitive. This fixes issue #750
This commit is contained in:
Jan Böhmer 2024-11-05 00:07:25 +01:00
parent 01fc6524a4
commit 6225d2c9b3
3 changed files with 108 additions and 1 deletions

View file

@ -85,6 +85,9 @@ class TagsConstraint extends AbstractConstraint
*/
protected function getExpressionForTag(QueryBuilder $queryBuilder, string $tag): Orx
{
//Escape any %, _ or \ in the tag
$tag = addcslashes($tag, '%_\\');
$tag_identifier_prefix = uniqid($this->identifier . '_', false);
$expr = $queryBuilder->expr();