Skip to content

Commit bd65d5e

Browse files
committed
docs: html code selector
1 parent f340fcc commit bd65d5e

23 files changed

+153
-53
lines changed

src/Doctrine/Odm/Filter/BooleanFilter.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
*
2424
* Syntax: `?property=<true|false|1|0>`.
2525
*
26-
* <CodeSelector>
26+
* <div data-code-selector>
27+
*
2728
* ```php
2829
* <?php
2930
* // api/src/Entity/Book.php
@@ -94,6 +95,7 @@
9495
* </resource>
9596
* </resources>
9697
* ```
98+
*
9799
* </CodeSelector>
98100
*
99101
* Given that the collection endpoint is `/books`, you can filter books with the following query: `/books?published=true`.

src/Doctrine/Odm/Filter/DateFilter.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
* - Consider items as youngest: use `ApiPlatform\Doctrine\Odm\Filter\DateFilter::INCLUDE_NULL_AFTER` (`include_null_after`) strategy
3737
* - Always include items: use `ApiPlatform\Doctrine\Odm\Filter\DateFilter::INCLUDE_NULL_BEFORE_AND_AFTER` (`include_null_before_and_after`) strategy
3838
*
39-
* <CodeSelector>
39+
* <div data-code-selector>
40+
*
4041
* ```php
4142
* <?php
4243
* // api/src/Entity/Book.php
@@ -107,6 +108,7 @@
107108
* </resource>
108109
* </resources>
109110
* ```
111+
*
110112
* </CodeSelector>
111113
*
112114
* Given that the collection endpoint is `/books`, you can filter books by date with the following query: `/books?createdAt[after]=2018-03-19`.

src/Doctrine/Odm/Filter/ExistsFilter.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
*
2828
* Syntax: `?exists[property]=<true|false|1|0>`.
2929
*
30-
* <CodeSelector>
30+
* <div data-code-selector>
31+
*
3132
* ```php
3233
* <?php
3334
* // api/src/Entity/Book.php
@@ -98,6 +99,7 @@
9899
* </resource>
99100
* </resources>
100101
* ```
102+
*
101103
* </CodeSelector>
102104
*
103105
* Given that the collection endpoint is `/books`, you can filter books with the following query: `/books?exists[comment]=true`.

src/Doctrine/Odm/Filter/NumericFilter.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
*
2424
* Syntax: `?property=<int|bigint|decimal...>`.
2525
*
26-
* <CodeSelector>
26+
* <div data-code-selector>
27+
*
2728
* ```php
2829
* <?php
2930
* // api/src/Entity/Book.php
@@ -94,6 +95,7 @@
9495
* </resource>
9596
* </resources>
9697
* ```
98+
*
9799
* </CodeSelector>
98100
*
99101
* Given that the collection endpoint is `/books`, you can filter books with the following query: `/books?price=10`.

src/Doctrine/Odm/Filter/OrderFilter.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
*
2727
* Syntax: `?order[property]=<asc|desc>`.
2828
*
29-
* <CodeSelector>
29+
* <div data-code-selector>
30+
*
3031
* ```php
3132
* <?php
3233
* // api/src/Entity/Book.php
@@ -100,13 +101,15 @@
100101
* </resource>
101102
* </resources>
102103
* ```
104+
*
103105
* </CodeSelector>
104106
*
105107
* 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`.
106108
*
107109
* 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:
108110
*
109-
* <CodeSelector>
111+
* <div data-code-selector>
112+
*
110113
* ```php
111114
* <?php
112115
* // api/src/Entity/Book.php
@@ -179,6 +182,7 @@
179182
* </resource>
180183
* </resources>
181184
* ```
185+
*
182186
* </CodeSelector>
183187
*
184188
* When the property used for ordering can contain `null` values, you may want to specify how `null` values are treated in the comparison:

src/Doctrine/Odm/Filter/RangeFilter.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
*
2424
* Syntax: `?property[<lt|gt|lte|gte|between>]=value`.
2525
*
26-
* <CodeSelector>
26+
* <div data-code-selector>
27+
*
2728
* ```php
2829
* <?php
2930
* // api/src/Entity/Book.php
@@ -95,6 +96,7 @@
9596
* </resource>
9697
* </resources>
9798
* ```
99+
*
98100
* </CodeSelector>
99101
*
100102
* Given that the collection endpoint is `/books`, you can filter books with the following query: `/books?price[between]=12.99..15.99`.

src/Doctrine/Odm/Filter/SearchFilter.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@
5454
*
5555
* Syntax: `?property[]=foo&property[]=bar`.
5656
*
57-
* <CodeSelector>
57+
* <div data-code-selector>
58+
*
5859
* ```php
5960
* <?php
6061
* // api/src/Entity/Book.php
@@ -127,6 +128,7 @@
127128
* </resource>
128129
* </resources>
129130
* ```
131+
*
130132
* </CodeSelector>
131133
*
132134
* @author Kévin Dunglas <[email protected]>

src/Doctrine/Orm/Filter/BooleanFilter.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
*
2626
* Syntax: `?property=<true|false|1|0>`.
2727
*
28-
* <CodeSelector>
28+
* <div data-code-selector>
29+
*
2930
* ```php
3031
* <?php
3132
* // api/src/Entity/Book.php
@@ -97,6 +98,7 @@
9798
* </resource>
9899
* </resources>
99100
* ```
101+
*
100102
* </CodeSelector>
101103
*
102104
* Given that the collection endpoint is `/books`, you can filter books with the following query: `/books?published=true`.

src/Doctrine/Orm/Filter/DateFilter.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
* - Consider items as youngest: use `ApiPlatform\Doctrine\Orm\Filter\DateFilter::INCLUDE_NULL_AFTER` (`include_null_after`) strategy
4040
* - Always include items: use `ApiPlatform\Doctrine\Orm\Filter\DateFilter::INCLUDE_NULL_BEFORE_AND_AFTER` (`include_null_before_and_after`) strategy
4141
*
42-
* <CodeSelector>
42+
* <div data-code-selector>
43+
*
4344
* ```php
4445
* <?php
4546
* // api/src/Entity/Book.php
@@ -111,6 +112,7 @@
111112
* </resource>
112113
* </resources>
113114
* ```
115+
*
114116
* </CodeSelector>
115117
*
116118
* Given that the collection endpoint is `/books`, you can filter books by date with the following query: `/books?createdAt[after]=2018-03-19`.

src/Doctrine/Orm/Filter/ExistsFilter.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
*
3131
* Syntax: `?exists[property]=<true|false|1|0>`.
3232
*
33-
* <CodeSelector>
33+
* <div data-code-selector>
34+
*
3435
* ```php
3536
* <?php
3637
* // api/src/Entity/Book.php
@@ -102,6 +103,7 @@
102103
* </resource>
103104
* </resources>
104105
* ```
106+
*
105107
* </CodeSelector>
106108
*
107109
* Given that the collection endpoint is `/books`, you can filter books with the following query: `/books?exists[comment]=true`.

0 commit comments

Comments
 (0)