return-url/components/EReturnUrl.php
public function getUrl($altUrl = false)
    {
        $url = $this->getUrlFromSubmitFields();
        // alt url or current page
        if (!$url && $altUrl)
            $url = $altUrl;
        return $url ? $url : Yii::app()->homeUrl;
    }
public function getUrl($altUrl = false)
    {
        $url = $this->getUrlFromSubmitFields();
        // alt url or current page
        if (!$url && $altUrl)
            $url = $altUrl;
        return $url ? $url : Yii::app()->homeUrl;
    }
public function getUrl ( $ altUrl = false ) { $ url = $ this -> getUrlFromSubmitFields ( ) ; // alt url or current page if ( ! $ url && $ altUrl ) $ url = $ altUrl ; return $ url ? $ url : Yii :: app ( ) -> homeUrl ; }
Get url from submitted data or session

@usage
in YourController::actionYourAction()
<pre>
$this->redirect(Yii::app()->returnUrl->getUrl());
</pre>

@param bool|mixed $altUrl
@return mixed|null
Get url from submitted data or session