You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Doctrine/Odm/Filter/OrderFilter.php
+8-4
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,8 @@
26
26
*
27
27
* Syntax: `?order[property]=<asc|desc>`.
28
28
*
29
-
* <CodeSelector>
29
+
* <div data-code-selector>
30
+
*
30
31
* ```php
31
32
* <?php
32
33
* // api/src/Entity/Book.php
@@ -100,13 +101,15 @@
100
101
* </resource>
101
102
* </resources>
102
103
* ```
103
-
* </CodeSelector>
104
+
*
105
+
* </div>
104
106
*
105
107
* Given that the collection endpoint is `/books`, you can filter books by title in ascending order and then by ID in descending order with the following query: `/books?order[title]=desc&order[id]=asc`.
106
108
*
107
109
* By default, whenever the query does not specify the direction explicitly (e.g.: `/books?order[title]&order[id]`), filters will not be applied unless you configure a default order direction to use:
108
110
*
109
-
* <CodeSelector>
111
+
* <div data-code-selector>
112
+
*
110
113
* ```php
111
114
* <?php
112
115
* // api/src/Entity/Book.php
@@ -179,7 +182,8 @@
179
182
* </resource>
180
183
* </resources>
181
184
* ```
182
-
* </CodeSelector>
185
+
*
186
+
* </div>
183
187
*
184
188
* When the property used for ordering can contain `null` values, you may want to specify how `null` values are treated in the comparison:
185
189
* - Use the default behavior of the DBMS: use `null` strategy
Copy file name to clipboardExpand all lines: src/Doctrine/Orm/Filter/OrderFilter.php
+4-2
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,8 @@
28
28
*
29
29
* Syntax: `?order[property]=<asc|desc>`.
30
30
*
31
-
* <CodeSelector>
31
+
* <div data-code-selector>
32
+
*
32
33
* ```php
33
34
* <?php
34
35
* // api/src/Entity/Book.php
@@ -102,7 +103,8 @@
102
103
* </resource>
103
104
* </resources>
104
105
* ```
105
-
* </CodeSelector>
106
+
*
107
+
* </div>
106
108
*
107
109
* Given that the collection endpoint is `/books`, you can filter books by title in ascending order and then by ID in descending order with the following query: `/books?order[title]=desc&order[id]=asc`.
Copy file name to clipboardExpand all lines: src/Elasticsearch/Filter/OrderFilter.php
+4-2
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,8 @@
24
24
*
25
25
* Syntax: `?order[property]=<asc|desc>`.
26
26
*
27
-
* <CodeSelector>
27
+
* <div data-code-selector>
28
+
*
28
29
* ```php
29
30
* <?php
30
31
* // api/src/Entity/Book.php
@@ -97,7 +98,8 @@
97
98
* </resource>
98
99
* </resources>
99
100
* ```
100
-
* </CodeSelector>
101
+
*
102
+
* </div>
101
103
*
102
104
* Given that the collection endpoint is `/books`, you can filter books by ID and date in ascending or descending order: `/books?order[id]=asc&order[date]=desc`.
Copy file name to clipboardExpand all lines: src/Metadata/ApiProperty.php
+4-2
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,8 @@ public function __construct(
55
55
/**
56
56
* The `deprecationReason` option deprecates the current operation with a deprecation message.
57
57
*
58
-
* <CodeSelector>
58
+
* <div data-code-selector>
59
+
*
59
60
* ```php
60
61
* <?php
61
62
* // api/src/Entity/Review.php
@@ -90,7 +91,8 @@ public function __construct(
90
91
* <property resource="App\Entity\Review" name="letter" deprecationReason="Create a Book instead" />
91
92
* </properties>
92
93
* ```
93
-
* </CodeSelector>
94
+
*
95
+
* </div>
94
96
*
95
97
* - With JSON-lD / Hydra, [an `owl:deprecated` annotation property](https://www.w3.org/TR/owl2-syntax/#Annotation_Properties) will be added to the appropriate data structure
96
98
* - With Swagger / OpenAPI, [a `deprecated` property](https://swagger.io/docs/specification/2-0/paths-and-operations/) will be added
* The `deprecationReason` option deprecates the current resource with a deprecation message.
273
275
*
274
-
* <CodeSelector>
276
+
* <div data-code-selector>
277
+
*
275
278
* ```php
276
279
* <?php
277
280
* // api/src/Entity/Parchment.php
@@ -303,7 +306,8 @@ public function __construct(
303
306
* <resource class="App\Entity\Parchment" deprecationReason="Create a Book instead" />
304
307
* </resources>
305
308
* ```
306
-
* </CodeSelector>
309
+
*
310
+
* </div>
307
311
*
308
312
* - With JSON-lD / Hydra, [an `owl:deprecated` annotation property](https://www.w3.org/TR/owl2-syntax/#Annotation_Properties) will be added to the appropriate data structure
309
313
* - With Swagger / OpenAPI, [a `deprecated` property](https://swagger.io/docs/specification/2-0/paths-and-operations/) will be added
@@ -331,7 +335,8 @@ public function __construct(
331
335
/**
332
336
* The `filters` option configures the filters (declared as services) available on the collection routes for the current resource.
333
337
*
334
-
* <CodeSelector>
338
+
* <div data-code-selector>
339
+
*
335
340
* ```php
336
341
* <?php
337
342
* // api/src/Entity/Book.php
@@ -366,15 +371,17 @@ public function __construct(
366
371
* </resource>
367
372
* </resources>
368
373
* ```
369
-
* </CodeSelector>
374
+
*
375
+
* </div>
370
376
*/
371
377
protected ?array$filters = null,
372
378
protected ?bool$elasticsearch = null,
373
379
protected$mercure = null,
374
380
/**
375
381
* The `messenger` option dispatches the current resource through the Message Bus.
* For more information, please see the [Pagination](https://www.doctrine-project.org/projects/doctrine-orm/en/current/tutorials/pagination.html) entry in the Doctrine ORM documentation.
724
743
*/
@@ -731,7 +750,8 @@ public function __construct(
731
750
* When set to `true`, the Doctrine ORM Paginator will use output walkers, which are compulsory for some types
732
751
* of queries. You can configure this using the `paginationUseOutputWalkers` option:
733
752
*
734
-
* <CodeSelector>
753
+
* <div data-code-selector>
754
+
*
735
755
* ```php
736
756
* <?php
737
757
* // api/src/Entity/Book.php
@@ -762,15 +782,17 @@ public function __construct(
* For more information, please see the [Pagination](https://www.doctrine-project.org/projects/doctrine-orm/en/current/tutorials/pagination.html) entry in the Doctrine ORM documentation.
* The `paginationPartial` option enables (or disables) the partial pagination for the current collection operation.
242
250
*
243
-
* <CodeSelector>
251
+
* <div data-code-selector>
252
+
*
244
253
* ```php
245
254
* <?php
246
255
* // api/src/Entity/Book.php
@@ -277,13 +286,15 @@ public function __construct(
277
286
* </resource>
278
287
* </resources>
279
288
* ```
280
-
* </CodeSelector>
289
+
*
290
+
* </div>
281
291
*/
282
292
protected ?bool$paginationPartial = null,
283
293
/**
284
294
* The `paginationClientEnabled` option allows (or disallows) the client to enable (or disable) the pagination for the current collection operation.
285
295
*
286
-
* <CodeSelector>
296
+
* <div data-code-selector>
297
+
*
287
298
* ```php
288
299
* <?php
289
300
* // api/src/Entity/Book.php
@@ -320,7 +331,8 @@ public function __construct(
320
331
* </resource>
321
332
* </resources>
322
333
* ```
323
-
* </CodeSelector>
334
+
*
335
+
* </div>
324
336
*
325
337
* The pagination can now be enabled (or disabled) by adding a query parameter named `pagination`:
326
338
* - `GET /books?pagination=false`: disabled
@@ -330,7 +342,8 @@ public function __construct(
330
342
/**
331
343
* The `paginationClientItemsPerPage` option allows (or disallows) the client to set the number of items per page for the current collection operation.
332
344
*
333
-
* <CodeSelector>
345
+
* <div data-code-selector>
346
+
*
334
347
* ```php
335
348
* <?php
336
349
* // api/src/Entity/Book.php
@@ -367,7 +380,8 @@ public function __construct(
367
380
* </resource>
368
381
* </resources>
369
382
* ```
370
-
* </CodeSelector>
383
+
*
384
+
* </div>
371
385
*
372
386
* The number of items can now be set by adding a query parameter named `itemsPerPage`:
373
387
* - `GET /books?itemsPerPage=50`
@@ -376,7 +390,8 @@ public function __construct(
376
390
/**
377
391
* The `paginationClientPartial` option allows (or disallows) the client to enable (or disable) the partial pagination for the current collection operation.
378
392
*
379
-
* <CodeSelector>
393
+
* <div data-code-selector>
394
+
*
380
395
* ```php
381
396
* <?php
382
397
* // api/src/Entity/Book.php
@@ -413,7 +428,8 @@ public function __construct(
413
428
* </resource>
414
429
* </resources>
415
430
* ```
416
-
* </CodeSelector>
431
+
*
432
+
* </div>
417
433
*
418
434
* The partial pagination can now be enabled (or disabled) by adding a query parameter named `partial`:
419
435
* - `GET /books?partial=false`: disabled
@@ -428,7 +444,8 @@ public function __construct(
428
444
* When set to `true`, the Doctrine ORM Paginator will perform an additional query, in order to get the
429
445
* correct number of results. You can configure this using the `paginationFetchJoinCollection` option:
430
446
*
431
-
* <CodeSelector>
447
+
* <div data-code-selector>
448
+
*
432
449
* ```php
433
450
* <?php
434
451
* // api/src/Entity/Book.php
@@ -465,7 +482,8 @@ public function __construct(
465
482
* </resource>
466
483
* </resources>
467
484
* ```
468
-
* </CodeSelector>
485
+
*
486
+
* </div>
469
487
*
470
488
* For more information, please see the [Pagination](https://www.doctrine-project.org/projects/doctrine-orm/en/current/tutorials/pagination.html) entry in the Doctrine ORM documentation.
471
489
*/
@@ -478,7 +496,8 @@ public function __construct(
478
496
* When set to `true`, the Doctrine ORM Paginator will use output walkers, which are compulsory for some types
479
497
* of queries. You can configure this using the `paginationUseOutputWalkers` option:
480
498
*
481
-
* <CodeSelector>
499
+
* <div data-code-selector>
500
+
*
482
501
* ```php
483
502
* <?php
484
503
* // api/src/Entity/Book.php
@@ -515,7 +534,8 @@ public function __construct(
515
534
* </resource>
516
535
* </resources>
517
536
* ```
518
-
* </CodeSelector>
537
+
*
538
+
* </div>
519
539
*
520
540
* For more information, please see the [Pagination](https://www.doctrine-project.org/projects/doctrine-orm/en/current/tutorials/pagination.html) entry in the Doctrine ORM documentation.
521
541
*/
@@ -525,7 +545,8 @@ public function __construct(
525
545
* Select your unique sorted field as well as the direction you'll like the pagination to go via filters.
526
546
* Note that for now you have to declare a `RangeFilter` and an `OrderFilter` on the property used for the cursor-based pagination:.
527
547
*
528
-
* <CodeSelector>
548
+
* <div data-code-selector>
549
+
*
529
550
* ```php
530
551
* <?php
531
552
* // api/src/Entity/Book.php
@@ -579,7 +600,8 @@ public function __construct(
579
600
* </resource>
580
601
* </resources>
581
602
* ```
582
-
* </CodeSelector>
603
+
*
604
+
* </div>
583
605
*
584
606
* To know more about cursor-based pagination take a look at [this blog post on medium (draft)](https://medium.com/@sroze/74fd1d324723).
585
607
*/
@@ -598,7 +620,8 @@ public function __construct(
598
620
/**
599
621
* The `deprecationReason` option deprecates the current operation with a deprecation message.
600
622
*
601
-
* <CodeSelector>
623
+
* <div data-code-selector>
624
+
*
602
625
* ```php
603
626
* <?php
604
627
* // api/src/Entity/Parchment.php
@@ -636,7 +659,8 @@ public function __construct(
636
659
* </resource>
637
660
* </resources>
638
661
* ```
639
-
* </CodeSelector>
662
+
*
663
+
* </div>
640
664
*
641
665
* - With JSON-lD / Hydra, [an `owl:deprecated` annotation property](https://www.w3.org/TR/owl2-syntax/#Annotation_Properties) will be added to the appropriate data structure
642
666
* - With Swagger / OpenAPI, [a `deprecated` property](https://swagger.io/docs/specification/2-0/paths-and-operations/) will be added
@@ -646,7 +670,8 @@ public function __construct(
646
670
/**
647
671
* The `filters` option configures the filters (declared as services) available on the collection routes for the current resource.
648
672
*
649
-
* <CodeSelector>
673
+
* <div data-code-selector>
674
+
*
650
675
* ```php
651
676
* <?php
652
677
* // api/src/Entity/Book.php
@@ -687,7 +712,8 @@ public function __construct(
687
712
* </resource>
688
713
* </resources>
689
714
* ```
690
-
* </CodeSelector>
715
+
*
716
+
* </div>
691
717
*/
692
718
protected ?array$filters = null,
693
719
/**
@@ -708,7 +734,8 @@ public function __construct(
708
734
/**
709
735
* The `messenger` option dispatches the current resource through the Message Bus.
710
736
*
711
-
* <CodeSelector>
737
+
* <div data-code-selector>
738
+
*
712
739
* ```php
713
740
* <?php
714
741
* // api/src/Entity/Book.php
@@ -746,7 +773,8 @@ public function __construct(
746
773
* </resource>
747
774
* </resources>
748
775
* ```
749
-
* </CodeSelector>
776
+
*
777
+
* </div>
750
778
*
751
779
* Note: when using `messenger=true` on a Doctrine entity, the Doctrine Processor is not called. If you want it
752
780
* to be called, you should [decorate a built-in state processor](/docs/guide/hook-a-persistence-layer-with-a-processor)
Copy file name to clipboardExpand all lines: src/Serializer/Filter/GroupFilter.php
+4-2
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,8 @@
28
28
* - `overrideDefaultGroups` allows to override the default serialization groups (default: `false`)
29
29
* - `whitelist` groups whitelist to avoid uncontrolled data exposure (default: `null` to allow all groups)
30
30
*
31
-
* <CodeSelector>
31
+
* <div data-code-selector>
32
+
*
32
33
* ```php
33
34
* <?php
34
35
* // api/src/Entity/Book.php
@@ -102,7 +103,8 @@
102
103
* </resource>
103
104
* </resources>
104
105
* ```
105
-
* </CodeSelector>
106
+
*
107
+
* </div>
106
108
*
107
109
* Given that the collection endpoint is `/books`, you can filter books by serialization groups with the following query: `/books?groups[]=read&groups[]=write`.
Copy file name to clipboardExpand all lines: src/Serializer/Filter/PropertyFilter.php
+4-2
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,8 @@
31
31
* - `overrideDefaultProperties` allows to override the default serialization properties (default: `false`)
32
32
* - `whitelist` properties whitelist to avoid uncontrolled data exposure (default: `null` to allow all properties)
33
33
*
34
-
* <CodeSelector>
34
+
* <div data-code-selector>
35
+
*
35
36
* ```php
36
37
* <?php
37
38
* // api/src/Entity/Book.php
@@ -105,7 +106,8 @@
105
106
* </resource>
106
107
* </resources>
107
108
* ```
108
-
* </CodeSelector>
109
+
*
110
+
* </div>
109
111
*
110
112
* Given that the collection endpoint is `/books`, you can filter the serialization properties with the following query: `/books?properties[]=title&properties[]=author`. If you want to include some properties of the nested "author" document, use: `/books?properties[]=title&properties[author][]=name`.
0 commit comments