framework/i18n/Formatter.php
public function asUrl($value, $options = [])
    {
        if ($value === null) {
            return $this->nullDisplay;
        }
        $url = $value;
        if (strpos($url, '://') === false) {
            $url = 'http://' . $url;
        }

        return Html::a(Html::encode($value), $url, $options);
    }
public function asUrl($value, $options = [])
    {
        if ($value === null) {
            return $this->nullDisplay;
        }
        $url = $value;
        if (strpos($url, '://') === false) {
            $url = 'http://' . $url;
        }

        return Html::a(Html::encode($value), $url, $options);
    }
public function asUrl ( $ value , $ options = [ ] ) { if ( $ value === null ) { return $ this -> nullDisplay ; } $ url = $ value ; if ( strpos ( $ url , '://' ) === false ) { $ url = 'http://' . $ url ; } return Html :: a ( Html :: encode ( $ value ) , $ url , $ options ) ; }
Formats the value as a hyperlink.
@param mixed $value the value to be formatted.
@param array $options the tag options in terms of name-value pairs. See [[Html::a()]].
@return string the formatted result.
Formats the value as a hyperlink .