Prado\Web\UI\WebControls\THyperLink::setNavigateUrl PHP Method

setNavigateUrl() public method

Sets the URL to link to when the THyperLink component is clicked.
public setNavigateUrl ( $value )
    public function setNavigateUrl($value)
    {
        $this->setViewState('NavigateUrl', $value, '');
    }

Usage Example

コード例 #1
0
ファイル: TActiveHyperLink.php プロジェクト: pradosoft/prado
 /**
  * Sets the URL to link to when the THyperLink component is clicked.
  * @param string the URL
  */
 public function setNavigateUrl($value)
 {
     if (parent::getNavigateUrl() === $value) {
         return;
     }
     parent::setNavigateUrl($value);
     if ($this->getActiveControl()->canUpdateClientSide()) {
         //replace & with & and urldecode the url (setting the href using javascript is literal)
         $url = urldecode(str_replace('&', '&', $value));
         $this->getPage()->getCallbackClient()->setAttribute($this, 'href', $url);
     }
 }