Commit 4717571e by Carsten Brandt

improved docs about goBack()

fixes #4343
parent 96c313d7
...@@ -172,6 +172,8 @@ class Controller extends \yii\base\Controller ...@@ -172,6 +172,8 @@ class Controller extends \yii\base\Controller
* return $this->goBack(); * return $this->goBack();
* ``` * ```
* *
* For this function to work you have to [[User::setReturnUrl()|set the return URL]] in appropriate places before.
*
* @param string|array $defaultUrl the default return URL in case it was not set previously. * @param string|array $defaultUrl the default return URL in case it was not set previously.
* If this is null and the return URL was not set previously, [[Application::homeUrl]] will be redirected to. * If this is null and the return URL was not set previously, [[Application::homeUrl]] will be redirected to.
* Please refer to [[User::setReturnUrl()]] on accepted format of the URL. * Please refer to [[User::setReturnUrl()]] on accepted format of the URL.
......
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