helpers\BaseHtml mailto()

mailto() public static method

Generates a mailto hyperlink.

public static string mailto ( $text, $email = null, $options = [] )
$text string

Link body. It will NOT be HTML-encoded. Therefore you can pass in HTML code such as an image tag. If this is coming from end users, you should consider encode() it to prevent XSS attacks.

$email string

Email address. If this is null, the first parameter (link body) will be treated as the email address and used.

$options array

The tag options in terms of name-value pairs. These will be rendered as the attributes of the resulting tag. The values will be HTML-encoded using encode(). If a value is null, the corresponding attribute will not be rendered. See renderTagAttributes() for details on how attributes are being rendered.

return string

The generated mailto link

doc_Yii
2016-10-30 17:05:11
Comments
Leave a Comment

Please login to continue.