|
|
@ -86,7 +86,7 @@ class BaseHtml |
|
|
|
* @param boolean $doubleEncode whether to encode HTML entities in `$content`. If false, |
|
|
|
* @param boolean $doubleEncode whether to encode HTML entities in `$content`. If false, |
|
|
|
* HTML entities in `$content` will not be further encoded. |
|
|
|
* HTML entities in `$content` will not be further encoded. |
|
|
|
* @return string the encoded content |
|
|
|
* @return string the encoded content |
|
|
|
* @see decode |
|
|
|
* @see decode() |
|
|
|
* @see http://www.php.net/manual/en/function.htmlspecialchars.php |
|
|
|
* @see http://www.php.net/manual/en/function.htmlspecialchars.php |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static function encode($content, $doubleEncode = true) |
|
|
|
public static function encode($content, $doubleEncode = true) |
|
|
@ -99,7 +99,7 @@ class BaseHtml |
|
|
|
* This is the opposite of [[encode()]]. |
|
|
|
* This is the opposite of [[encode()]]. |
|
|
|
* @param string $content the content to be decoded |
|
|
|
* @param string $content the content to be decoded |
|
|
|
* @return string the decoded content |
|
|
|
* @return string the decoded content |
|
|
|
* @see encode |
|
|
|
* @see encode() |
|
|
|
* @see http://www.php.net/manual/en/function.htmlspecialchars-decode.php |
|
|
|
* @see http://www.php.net/manual/en/function.htmlspecialchars-decode.php |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static function decode($content) |
|
|
|
public static function decode($content) |
|
|
@ -116,8 +116,8 @@ class BaseHtml |
|
|
|
* the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]]. |
|
|
|
* 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. |
|
|
|
* If a value is null, the corresponding attribute will not be rendered. |
|
|
|
* @return string the generated HTML tag |
|
|
|
* @return string the generated HTML tag |
|
|
|
* @see beginTag |
|
|
|
* @see beginTag() |
|
|
|
* @see endTag |
|
|
|
* @see endTag() |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static function tag($name, $content = '', $options = []) |
|
|
|
public static function tag($name, $content = '', $options = []) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -132,8 +132,8 @@ class BaseHtml |
|
|
|
* the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]]. |
|
|
|
* 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. |
|
|
|
* If a value is null, the corresponding attribute will not be rendered. |
|
|
|
* @return string the generated start tag |
|
|
|
* @return string the generated start tag |
|
|
|
* @see endTag |
|
|
|
* @see endTag() |
|
|
|
* @see tag |
|
|
|
* @see tag() |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static function beginTag($name, $options = []) |
|
|
|
public static function beginTag($name, $options = []) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -144,8 +144,8 @@ class BaseHtml |
|
|
|
* Generates an end tag. |
|
|
|
* Generates an end tag. |
|
|
|
* @param string $name the tag name |
|
|
|
* @param string $name the tag name |
|
|
|
* @return string the generated end tag |
|
|
|
* @return string the generated end tag |
|
|
|
* @see beginTag |
|
|
|
* @see beginTag() |
|
|
|
* @see tag |
|
|
|
* @see tag() |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static function endTag($name) |
|
|
|
public static function endTag($name) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -187,7 +187,7 @@ class BaseHtml |
|
|
|
* the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]]. |
|
|
|
* 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. |
|
|
|
* If a value is null, the corresponding attribute will not be rendered. |
|
|
|
* @return string the generated link tag |
|
|
|
* @return string the generated link tag |
|
|
|
* @see url |
|
|
|
* @see url() |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static function cssFile($url, $options = []) |
|
|
|
public static function cssFile($url, $options = []) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -203,7 +203,7 @@ class BaseHtml |
|
|
|
* the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]]. |
|
|
|
* 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. |
|
|
|
* If a value is null, the corresponding attribute will not be rendered. |
|
|
|
* @return string the generated script tag |
|
|
|
* @return string the generated script tag |
|
|
|
* @see url |
|
|
|
* @see url() |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static function jsFile($url, $options = []) |
|
|
|
public static function jsFile($url, $options = []) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -222,7 +222,7 @@ class BaseHtml |
|
|
|
* the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]]. |
|
|
|
* 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. |
|
|
|
* If a value is null, the corresponding attribute will not be rendered. |
|
|
|
* @return string the generated form start tag. |
|
|
|
* @return string the generated form start tag. |
|
|
|
* @see endForm |
|
|
|
* @see endForm() |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static function beginForm($action = '', $method = 'post', $options = []) |
|
|
|
public static function beginForm($action = '', $method = 'post', $options = []) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -271,7 +271,7 @@ class BaseHtml |
|
|
|
/** |
|
|
|
/** |
|
|
|
* Generates a form end tag. |
|
|
|
* Generates a form end tag. |
|
|
|
* @return string the generated tag |
|
|
|
* @return string the generated tag |
|
|
|
* @see beginForm |
|
|
|
* @see beginForm() |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static function endForm() |
|
|
|
public static function endForm() |
|
|
|
{ |
|
|
|
{ |
|
|
@ -290,7 +290,7 @@ class BaseHtml |
|
|
|
* the attributes of the resulting tag. The values will be HTML-encoded using [[encode()]]. |
|
|
|
* 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. |
|
|
|
* If a value is null, the corresponding attribute will not be rendered. |
|
|
|
* @return string the generated hyperlink |
|
|
|
* @return string the generated hyperlink |
|
|
|
* @see url |
|
|
|
* @see url() |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static function a($text, $url = null, $options = []) |
|
|
|
public static function a($text, $url = null, $options = []) |
|
|
|
{ |
|
|
|
{ |
|
|
|