diff --git a/docs/guide/db-active-record.md b/docs/guide/db-active-record.md index 02e49d9790..27f8db997b 100644 --- a/docs/guide/db-active-record.md +++ b/docs/guide/db-active-record.md @@ -212,7 +212,7 @@ $customer = Customer::findAll([ to improve the performance, e.g., `Customer::find()->limit(1)->one()`. Besides using query building methods, you can also write raw SQLs to query data and populate the results into -Active Record objects. You can do so by calling the [[yii\db\ActiveRecord::queryBySql()]] method: +Active Record objects. You can do so by calling the [[yii\db\ActiveRecord::findBySql()]] method: ```php // returns all inactive customers @@ -220,7 +220,7 @@ $sql = 'SELECT * FROM customer WHERE status=:status'; $customers = Customer::findBySql($sql, [':status' => Customer::STATUS_INACTIVE])->all(); ``` -Do not call extra query building methods after calling [[yii\db\ActiveRecord::queryBySql()|queryBySql()]] as they +Do not call extra query building methods after calling [[yii\db\ActiveRecord::findBySql()|findBySql()]] as they will be ignored. @@ -1010,7 +1010,7 @@ $customers = Customer::find() > Note: It is important to disambiguate column names when building relational queries involving JOIN SQL statements. A common practice is to prefix column names with their corresponding table names. -However, a better approaches is to exploit the existing relation declarations by calling [[yii\db\ActiveQuery::joinWith()]]: +However, a better approach is to exploit the existing relation declarations by calling [[yii\db\ActiveQuery::joinWith()]]: ```php $customers = Customer::find() diff --git a/docs/guide/helper-array.md b/docs/guide/helper-array.md index 2176238768..bb4c54a967 100644 --- a/docs/guide/helper-array.md +++ b/docs/guide/helper-array.md @@ -1,7 +1,7 @@ ArrayHelper =========== -Additionally to [rich set of PHP array functions](http://php.net/manual/en/book.array.php) Yii array helper provides +Additionally to the [rich set of PHP array functions](http://php.net/manual/en/book.array.php), the Yii array helper provides extra static methods allowing you to deal with arrays more efficiently. diff --git a/docs/guide/helper-url.md b/docs/guide/helper-url.md index 40a1cc6b2c..d10f5d963a 100644 --- a/docs/guide/helper-url.md +++ b/docs/guide/helper-url.md @@ -7,7 +7,7 @@ Url helper provides a set of static methods for managing URLs. ## Getting Common URLs There are two methods you can use to get common URLs: home URL and base URL of the current request. In order to get -home URL use the following: +home URL, use the following: ```php $relativeHomeUrl = Url::home(); @@ -15,10 +15,10 @@ $absoluteHomeUrl = Url::home(true); $httpsAbsoluteHomeUrl = Url::home('https'); ``` -If no parameter is passed, URL generated is relative. You can either pass `true` to get absolute URL for the current -schema or specify schema explicitly (`https`, `http`). +If no parameter is passed, the generated URL is relative. You can either pass `true` to get an absolute URL for the current +schema or specify a schema explicitly (`https`, `http`). -To get base URL of the current request use the following: +To get the base URL of the current request use the following: ```php $relativeBaseUrl = Url::base(); @@ -31,7 +31,7 @@ The only parameter of the method works exactly the same as for `Url::home()`. ## Creating URLs -In order to create URL to a given route use `Url::toRoute()` method. The method uses [[\yii\web\UrlManager]] to create +In order to create a URL to a given route use the `Url::toRoute()` method. The method uses [[\yii\web\UrlManager]] to create a URL: ```php @@ -53,7 +53,7 @@ If you want to create a URL with an anchor, you can use the array format with a ['site/index', 'param1' => 'value1', '#' => 'name'] ``` -A route may be either absolute or relative. An absolute route has a leading slash (e.g. `/site/index`), while a relative +A route may be either absolute or relative. An absolute route has a leading slash (e.g. `/site/index`) while a relative route has none (e.g. `site/index` or `index`). A relative route will be converted into an absolute one by the following rules: - If the route is an empty string, the current [[\yii\web\Controller::route|route]] will be used; diff --git a/docs/guide/input-forms.md b/docs/guide/input-forms.md index d01afc6975..a07b5a40b5 100644 --- a/docs/guide/input-forms.md +++ b/docs/guide/input-forms.md @@ -74,7 +74,7 @@ To customize the output, you can chain additional methods of [[yii\widgets\Activ ``` This will create all the `