Commit 34be99fc by Alexander Makarov

Merge pull request #2700 from tof06/url-doc-fixes

Url doc fixes
parents 6f3d27fc b3ef2a93
......@@ -58,7 +58,7 @@ Yii adds the following construct to the standard Twig syntax:
<a href="{{ path('blog/view', {'alias' : post.alias}) }}">{{ post.title }}</a>
```
Internally, the `path()` function calls Yii's `Html::url()` method.
Internally, the `path()` function calls Yii's `Url::to()` method.
### Additional variables
......@@ -120,7 +120,7 @@ Yii adds the following construct to the standard Smarty syntax:
<a href="{path route='blog/view' alias=$post.alias}">{$post.title}</a>
```
Internally, the `path()` function calls Yii's `Html::url()` method.
Internally, the `path()` function calls Yii's `Url::to()` method.
### Additional variables
......
......@@ -61,7 +61,7 @@ class NavBar extends Widget
*/
public $brandLabel;
/**
* @param array|string $url the URL for the brand's hyperlink tag. This parameter will be processed by [[Html::url()]]
* @param array|string $url the URL for the brand's hyperlink tag. This parameter will be processed by [[Url::to()]]
* and will be used for the "href" attribute of the brand link. If not set, [[\yii\web\Application::homeUrl]] will be used.
*/
public $brandUrl;
......
......@@ -195,7 +195,7 @@ Yii Framework 2 Change Log
- Chg #2629: `Module::controllerPath` is now read only, and all controller classes must be namespaced under `Module::controllerNamespace`. (qiangxue)
- Chg #2630: API changes for URLs generation (samdark, qiangxue, cebe)
- Added `yii\helpers\Url`.
- Removed `yii\heplers\Html::url`, use `yii\helpers\Url::to` instead.
- Removed `yii\helpers\Html::url`, use `yii\helpers\Url::to` instead.
- Removed `yii\web\Controller::createUrl` and `yii\web\Controller::createAbsoluteUrl`, use `yii\helpers\Url::toRoute` instead.
- Removed `yii\web\Controller::getCanonicalUrl`, use `yii\helpers\Url::canonical` instead.
- Chg: Renamed `yii\jui\Widget::clientEventsMap` to `clientEventMap` (qiangxue)
......
......@@ -153,7 +153,7 @@ class GridView extends BaseListView
*/
public $filterModel;
/**
* @var string|array the URL for returning the filtering result. [[Html::url()]] will be called to
* @var string|array the URL for returning the filtering result. [[Url::to()]] will be called to
* normalize the URL. If not set, the current controller action will be used.
* When the user makes change to any filter input, the current filtering inputs will be appended
* as GET parameters to this URL.
......
......@@ -134,7 +134,7 @@ class Controller extends \yii\base\Controller
* - a string representing a URL (e.g. "http://example.com")
* - a string representing a URL alias (e.g. "@example.com")
* - an array in the format of `[$route, ...name-value pairs...]` (e.g. `['site/index', 'ref' => 1]`)
* [[Html::url()]] will be used to convert the array into a URL.
* [[Url::to()]] will be used to convert the array into a URL.
*
* Any relative URL will be converted into an absolute one by prepending it with the host info
* of the current request.
......
......@@ -657,7 +657,7 @@ class Response extends \yii\base\Response
* - a string representing a URL alias (e.g. "@example.com")
* - an array in the format of `[$route, ...name-value pairs...]` (e.g. `['site/index', 'ref' => 1]`).
* Note that the route is with respect to the whole application, instead of relative to a controller or module.
* [[Html::url()]] will be used to convert the array into a URL.
* [[Url::to()]] will be used to convert the array into a URL.
*
* Any relative URL will be converted into an absolute one by prepending it with the host info
* of the current request.
......
......@@ -24,7 +24,7 @@ use yii\web\JsExpression;
class ActiveForm extends Widget
{
/**
* @param array|string $action the form action URL. This parameter will be processed by [[\yii\helpers\Html::url()]].
* @param array|string $action the form action URL. This parameter will be processed by [[\yii\helpers\Url::to()]].
*/
public $action = '';
/**
......@@ -74,7 +74,7 @@ class ActiveForm extends Widget
public $enableAjaxValidation = false;
/**
* @var array|string the URL for performing AJAX-based validation. This property will be processed by
* [[Html::url()]]. Please refer to [[Html::url()]] for more details on how to configure this property.
* [[Url::to()]]. Please refer to [[Url::to()]] for more details on how to configure this property.
* If this property is not set, it will take the value of the form's action attribute.
*/
public $validationUrl;
......
......@@ -75,7 +75,7 @@ class Breadcrumbs extends Widget
* ~~~
* [
* 'label' => 'label of the link', // required
* 'url' => 'url of the link', // optional, will be processed by Html::url()
* 'url' => 'url of the link', // optional, will be processed by Url::to()
* ]
* ~~~
*
......
......@@ -53,7 +53,7 @@ class Menu extends Widget
*
* - label: string, optional, specifies the menu item label. When [[encodeLabels]] is true, the label
* will be HTML-encoded. If the label is not specified, an empty string will be used.
* - url: string or array, optional, specifies the URL of the menu item. It will be processed by [[Html::url]].
* - url: string or array, optional, specifies the URL of the menu item. It will be processed by [[Url::to]].
* When this is set, the actual menu item content will be generated using [[linkTemplate]];
* otherwise, [[labelTemplate]] will be used.
* - visible: boolean, optional, whether this menu item is visible. Defaults to true.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment