From acbdccb45d779c0d9fd795e63a2ceb6c3ce89ab0 Mon Sep 17 00:00:00 2001 From: Dmitriy Makarov Date: Wed, 24 Aug 2016 06:15:22 +0300 Subject: [PATCH] Various documentation fixes [skip ci] --- docs/guide-ru/rest-resources.md | 2 +- docs/guide/output-data-widgets.md | 2 +- docs/guide/output-pagination.md | 3 +-- docs/guide/rest-controllers.md | 2 +- docs/guide/rest-error-handling.md | 2 +- docs/guide/rest-resources.md | 2 +- docs/guide/runtime-requests.md | 2 +- 7 files changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/guide-ru/rest-resources.md b/docs/guide-ru/rest-resources.md index 8af6326..99a1c20 100644 --- a/docs/guide-ru/rest-resources.md +++ b/docs/guide-ru/rest-resources.md @@ -130,7 +130,7 @@ public function extraFields() Согласно [HATEOAS](http://en.wikipedia.org/wiki/HATEOAS), расшифровывающемуся как Hypermedia as the Engine of Application State, RESTful API должны возвращать достаточно информации для того, чтобы клиенты могли определить возможные действия над ресурсами. -Ключевой момент HATEOAS заключается том, чтобы возвращать вместе с данными набора гиперссылок, указывающих на связанную +Ключевой момент HATEOAS заключается в том, чтобы возвращать вместе с данными набора гиперссылок, указывающих на связанную с ресурсом информацию. Поддержку HATEOAS в ваши классы ресурсов можно добавить реализовав интерфейс [[yii\web\Linkable]]. Этот интерфейс diff --git a/docs/guide/output-data-widgets.md b/docs/guide/output-data-widgets.md index 74a09e4..24fbfff 100644 --- a/docs/guide/output-data-widgets.md +++ b/docs/guide/output-data-widgets.md @@ -700,7 +700,7 @@ echo GridView::widget([ ### Using GridView with Pjax The [[yii\widgets\Pjax|Pjax]] widget allows you to update a certain section of a -page instead of reloading the entire page. You can use it to to update only the +page instead of reloading the entire page. You can use it to update only the [[yii\grid\GridView|GridView]] content when using filters. ```php diff --git a/docs/guide/output-pagination.md b/docs/guide/output-pagination.md index d718ac1..9b3ac30 100644 --- a/docs/guide/output-pagination.md +++ b/docs/guide/output-pagination.md @@ -10,8 +10,7 @@ Yii uses a [[yii\data\Pagination]] object to represent the information about a p is usually much more than the number of data items needed to display on a single page. * [[yii\data\Pagination::$pageSize|page size]] specifies how many data items each page contains. The default value is 20. -* [[yii\data\Pagination::$page|current page]] gives the current page number (zero-based). The default value - value is 0, meaning the first page. +* [[yii\data\Pagination::$page|current page]] gives the current page number (zero-based). The default value is 0, meaning the first page. With a fully specified [[yii\data\Pagination]] object, you can retrieve and display data partially. For example, if you are fetching data from a database, you can specify the `OFFSET` and `LIMIT` clause of the DB query with diff --git a/docs/guide/rest-controllers.md b/docs/guide/rest-controllers.md index 5c082b0..975fb99 100644 --- a/docs/guide/rest-controllers.md +++ b/docs/guide/rest-controllers.md @@ -77,7 +77,7 @@ public function behaviors() ### CORS -Adding the [Cross Origin Resource Sharing](structure-filters.md#cors) filter to a controller is a bit more complicated +Adding the [Cross-Origin Resource Sharing](structure-filters.md#cors) filter to a controller is a bit more complicated than adding other filters described above, because the CORS filter has to be applied before authentication methods and thus needs a slightly different approach compared to other filters. Also authentication has to be disabled for the [CORS Preflight requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS#Preflighted_requests) diff --git a/docs/guide/rest-error-handling.md b/docs/guide/rest-error-handling.md index fbab590..61ddc70 100644 --- a/docs/guide/rest-error-handling.md +++ b/docs/guide/rest-error-handling.md @@ -24,7 +24,7 @@ Content-Type: application/json; charset=UTF-8 } ``` -The following list summarizes the HTTP status code that are used by the Yii REST framework: +The following list summarizes the HTTP status codes that are used by the Yii REST framework: * `200`: OK. Everything worked as expected. * `201`: A resource was successfully created in response to a `POST` request. The `Location` header diff --git a/docs/guide/rest-resources.md b/docs/guide/rest-resources.md index cbfcbdc..c6d2fd3 100644 --- a/docs/guide/rest-resources.md +++ b/docs/guide/rest-resources.md @@ -137,7 +137,7 @@ the request with `http://localhost/users?fields=id,email&expand=profile` may ret ## Links [HATEOAS](http://en.wikipedia.org/wiki/HATEOAS), an abbreviation for Hypermedia as the Engine of Application State, -promotes that RESTful APIs should return information that allow clients to discover actions supported for the returned +promotes that RESTful APIs should return information that allows clients to discover actions supported for the returned resources. The key of HATEOAS is to return a set of hyperlinks with relation information when resource data are served by the APIs. diff --git a/docs/guide/runtime-requests.md b/docs/guide/runtime-requests.md index 77723a4..180c10c 100644 --- a/docs/guide/runtime-requests.md +++ b/docs/guide/runtime-requests.md @@ -60,7 +60,7 @@ $param = $request->getBodyParam('id'); ## Request Methods You can get the HTTP method used by the current request via the expression `Yii::$app->request->method`. -A whole set of boolean properties are also provided for you to check if the current method is of certain type. +A whole set of boolean properties is also provided for you to check if the current method is of certain type. For example, ```php