return-url/components/EReturnUrl.php
public function getLinkValue($currentPage = false)
    {
        return $this->encodeLinkValue($currentPage ? Yii::app()->request->getUrl() : $this->getUrlFromSubmitFields());
    }
public function getLinkValue($currentPage = false)
    {
        return $this->encodeLinkValue($currentPage ? Yii::app()->request->getUrl() : $this->getUrlFromSubmitFields());
    }
public function getLinkValue ( $ currentPage = false ) { return $ this -> encodeLinkValue ( $ currentPage ? Yii :: app ( ) -> request -> getUrl ( ) : $ this -> getUrlFromSubmitFields ( ) ) ; }
Get url from submitted data or the current page url
for usage in a link

@usage
in views/your_page.php
<pre>
CHtml::link('my link', array('test/form', 'returnUrl' => Yii::app()->returnUrl->getLinkValue(true)));
</pre>

@param bool $currentPage
@return string
Get url from submitted data or the current page url for usage in a link