Skip to content

Commit

Permalink
Feature/wgmv updates dql function documentation (#1084)
Browse files Browse the repository at this point in the history
* Update dql_function.md (#1044)

* indentation

---------

Co-authored-by: Walter Vogel <[email protected]>
  • Loading branch information
npotier and wgmv authored Feb 11, 2023
1 parent 6727d1e commit 33c09f4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Resources/doc/columns_configuration/annotations/dql_function.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,15 @@ class Article {
`sales.name:otherFunction:string` turns into `otherFunction(_sales.name, 'string')` in DQL

`other:count:distinct` turns into `count(DISTINCT _a.other)` in DQL


## Using GridBuilder
```php
<?php
...
/* Example BlogPost has many Comments */
/** @var GridBuilder $builder */
$builder
->setGroupBy('id') //important to setGroupBy otherwise the column will not aggregate
->add('comments.id:count', 'text' ['title' => 'Number of Comments']);
```

0 comments on commit 33c09f4

Please sign in to comment.