Skip to content

Commit c0f56b3

Browse files
committed
Fix comments
1 parent b856b71 commit c0f56b3

File tree

2 files changed

+7
-31
lines changed

2 files changed

+7
-31
lines changed

core/default-order.md

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Override Default Order
22

3-
API Platform Core provides an easy way to override default order in your collection.
3+
API Platform Core provides an easy way to override the default order of items in your collection.
44

5-
By default, it will order by resource identifier(s) using ASC direction. If you want to customize this order, you must add an `order` attribute on your ApiResource annotation:
5+
By default, items in the collection are ordered in ascending (ASC) order by their resource identifier(s). If you want to
6+
customize this order, you must add an `order` attribute on your ApiResource annotation:
67

78
```php
89
<?php
@@ -58,31 +59,6 @@ class Book
5859
}
5960
```
6061

61-
It's also possible to configure the default filter on an association property:
62+
Previous chapter: [Operations](operations.md)
6263

63-
```php
64-
<?php
65-
66-
// src/AppBundle/Entity/Book.php
67-
68-
namespace AppBundle\Entity;
69-
70-
use ApiPlatform\Core\Annotation\ApiResource;
71-
72-
/**
73-
* @ApiResource(attributes={"order"={"author.username"}})
74-
*/
75-
class Book
76-
{
77-
// ...
78-
79-
/**
80-
* @var User
81-
*/
82-
public $author;
83-
}
84-
```
85-
86-
Previous chapter: [Configuration](configuration.md)
87-
88-
Next chapter: [Operations](operations.md)
64+
Next chapter: [Filters](filters.md)

index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
2. [Configuring Operations](core/operations.md#configuring-operations)
1919
3. [Subresources](core/operations.md#subresources)
2020
4. [Creating Custom Operations and Controllers](core/operations.md#creating-custom-operations-and-controllers)
21-
5. [Filters](core/filters.md)
21+
5. [Override Default Order](core/default-order.md)
22+
6. [Filters](core/filters.md)
2223
1. [Doctrine ORM Filters](core/filters.md#doctrine-orm-filters)
2324
1. [Search Filter](core/filters.md#search-filter)
2425
2. [Date Filter](core/filters.md#date-filter)
@@ -35,7 +36,6 @@
3536
3. [Creating Custom Filters](core/filters.md#creating-custom-filters)
3637
1. [Creating Custom Doctrine ORM Filters](core/filters.md#creating-custom-doctrine-orm-filters)
3738
2. [Overriding Extraction of Properties from the Request](core/filters.md#overriding-extraction-of-properties-from-the-request)
38-
6. [Override Default Order](core/default-order.md)
3939
7. [Serialization Groups and Relations](core/serialization-groups-and-relations.md)
4040
1. [Configuration](core/serialization-groups-and-relations.md#configuration)
4141
2. [Using Different Serialization Groups per Operation](core/serialization-groups-and-relations.md#embedding-relations)

0 commit comments

Comments
 (0)