From 13e833b7b30038e3ef8f6f97d9f33af9e70e566d Mon Sep 17 00:00:00 2001 From: Mark Date: Thu, 2 Jan 2014 10:38:24 +0400 Subject: [PATCH 1/3] docs added --- docs/guide/url.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/guide/url.md b/docs/guide/url.md index 235e05e..990d103 100644 --- a/docs/guide/url.md +++ b/docs/guide/url.md @@ -28,6 +28,8 @@ Some examples: ```php echo \Yii::$app->urlManager->createUrl('site/page', ['id' => 'about']); // /index.php/site/page/id/about/ +echo \Yii::$app->urlManager->createUrl('date-time/fast-forward',['id' => 105]) +// /index.php?r=date-time/fast-forward&id=105 echo \Yii::$app->urlManager->createAbsoluteUrl('blog/post/index'); // http://www.example.com/index.php/blog/post/index/ ``` @@ -35,7 +37,9 @@ echo \Yii::$app->urlManager->createAbsoluteUrl('blog/post/index'); The exact format of the outputted URL will depend upon how the URL manager is configured (which is the point). The above examples may also output: * `/site/page/id/about/` +* `/index.php/hi-tech` * `/index.php?r=site/page&id=about` +* `/index.php/date-time/fast-forward?id=105` * `http://www.example.com/blog/post/index/` * `http://www.example.com/index.php?r=blog/post/index` @@ -46,6 +50,8 @@ echo $this->createUrl(''); // currently active route echo $this->createUrl('view', ['id' => 'contact']); // same controller, different action echo $this->createUrl('post/index'); // same module, different controller and action echo $this->createUrl('/site/index'); // absolute route no matter what controller is making this call +echo $this->createurl('hi-tech'); // url for the case sensitive action `actionHiTech` of the current controller +echo $this->createurl('date-time/fast-forward',['id' => 105]); // url for action the case sensitive controller, `DateTimeController::actionFastForward` ``` > **Tip**: In order to generate URL with a hashtag, for example `/index.php?r=site/page&id=100#title`, you need to From ee5c14facb8b4d935b214ee5df6795fd254b86f3 Mon Sep 17 00:00:00 2001 From: Mark Date: Thu, 2 Jan 2014 10:42:07 +0400 Subject: [PATCH 2/3] docs fixed --- docs/guide/url.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guide/url.md b/docs/guide/url.md index 990d103..5364c89 100644 --- a/docs/guide/url.md +++ b/docs/guide/url.md @@ -37,8 +37,8 @@ echo \Yii::$app->urlManager->createAbsoluteUrl('blog/post/index'); The exact format of the outputted URL will depend upon how the URL manager is configured (which is the point). The above examples may also output: * `/site/page/id/about/` -* `/index.php/hi-tech` * `/index.php?r=site/page&id=about` +* `/index.php?r=date-time/fast-forward&id=105` * `/index.php/date-time/fast-forward?id=105` * `http://www.example.com/blog/post/index/` * `http://www.example.com/index.php?r=blog/post/index` @@ -51,7 +51,7 @@ echo $this->createUrl('view', ['id' => 'contact']); // same controller, differen echo $this->createUrl('post/index'); // same module, different controller and action echo $this->createUrl('/site/index'); // absolute route no matter what controller is making this call echo $this->createurl('hi-tech'); // url for the case sensitive action `actionHiTech` of the current controller -echo $this->createurl('date-time/fast-forward',['id' => 105]); // url for action the case sensitive controller, `DateTimeController::actionFastForward` +echo $this->createurl('/date-time/fast-forward',['id' => 105]); // url for action the case sensitive controller, `DateTimeController::actionFastForward` ``` > **Tip**: In order to generate URL with a hashtag, for example `/index.php?r=site/page&id=100#title`, you need to From c3a44463af352e11785a3ca8edbf261d94c9d3a9 Mon Sep 17 00:00:00 2001 From: Mark Date: Thu, 2 Jan 2014 22:30:36 +0400 Subject: [PATCH 3/3] cs fix --- docs/guide/url.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guide/url.md b/docs/guide/url.md index 5364c89..0a722c1 100644 --- a/docs/guide/url.md +++ b/docs/guide/url.md @@ -28,7 +28,7 @@ Some examples: ```php echo \Yii::$app->urlManager->createUrl('site/page', ['id' => 'about']); // /index.php/site/page/id/about/ -echo \Yii::$app->urlManager->createUrl('date-time/fast-forward',['id' => 105]) +echo \Yii::$app->urlManager->createUrl('date-time/fast-forward', ['id' => 105]) // /index.php?r=date-time/fast-forward&id=105 echo \Yii::$app->urlManager->createAbsoluteUrl('blog/post/index'); // http://www.example.com/index.php/blog/post/index/ @@ -51,7 +51,7 @@ echo $this->createUrl('view', ['id' => 'contact']); // same controller, differen echo $this->createUrl('post/index'); // same module, different controller and action echo $this->createUrl('/site/index'); // absolute route no matter what controller is making this call echo $this->createurl('hi-tech'); // url for the case sensitive action `actionHiTech` of the current controller -echo $this->createurl('/date-time/fast-forward',['id' => 105]); // url for action the case sensitive controller, `DateTimeController::actionFastForward` +echo $this->createurl('/date-time/fast-forward', ['id' => 105]); // url for action the case sensitive controller, `DateTimeController::actionFastForward` ``` > **Tip**: In order to generate URL with a hashtag, for example `/index.php?r=site/page&id=100#title`, you need to