helpers\BaseHtml tag()

tag() public static method Generates a complete HTML tag. See also: beginTag() endTag() public static string tag ( $name, $content = '', $options = [] )$name string|boolean|null The tag name. If $name is null or false, the corresponding content will be rendered without any tag. $content string The content to be enclosed between the start and end tags. It will not be HTML-encoded. If this is coming from end users, you should consider encode() it to prevent XSS attacks. $options array

helpers\BaseHtml submitInput()

submitInput() public static method Generates a submit input button. Be careful when naming form elements such as submit buttons. According to the jQuery documentation there are some reserved names that can cause conflicts, e.g. submit, length, or method. public static string submitInput ( $label = 'Submit', $options = [] )$label string The value attribute. If it is null, the value attribute will not be generated. $options array The tag options in terms of name-value pairs. These will b

helpers\BaseHtml submitButton()

submitButton() public static method Generates a submit button tag. Be careful when naming form elements such as submit buttons. According to the jQuery documentation there are some reserved names that can cause conflicts, e.g. submit, length, or method. public static string submitButton ( $content = 'Submit', $options = [] )$content string The content enclosed within the button tag. It will NOT be HTML-encoded. Therefore you can pass in HTML code such as an image tag. If this is is comin

helpers\BaseHtml style()

style() public static method Generates a style tag. public static string style ( $content, $options = [] )$content string The style content $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 st

helpers\BaseHtml script()

script() public static method Generates a script tag. public static string script ( $content, $options = [] )$content string The script content $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 generate

helpers\BaseHtml resetInput()

resetInput() public static method Generates a reset input button. public static string resetInput ( $label = 'Reset', $options = [] )$label string The value attribute. If it is null, the value attribute will not be generated. $options array The attributes of the button tag. The values will be HTML-encoded using encode(). Attributes whose value is null will be ignored and not put in the tag returned. See renderTagAttributes() for details on how attributes are being rendered. return str

helpers\BaseHtml resetButton()

resetButton() public static method Generates a reset button tag. public static string resetButton ( $content = 'Reset', $options = [] )$content string The content enclosed within the button tag. It will NOT be HTML-encoded. Therefore you can pass in HTML code such as an image tag. If this is is coming from end users, you should consider encode() it to prevent XSS attacks. $options array The tag options in terms of name-value pairs. These will be rendered as the attributes of the result

helpers\BaseHtml renderTagAttributes()

renderTagAttributes() public static method Renders the HTML tag attributes. Attributes whose values are of boolean type will be treated as boolean attributes. Attributes whose values are null will not be rendered. The values of attributes will be HTML-encoded using encode(). The "data" attribute is specially handled when it is receiving an array value. In this case, the array will be "expanded" and a list data attributes will be rendered. For example, if 'data' => ['id' => 1, 'name' =

helpers\BaseHtml renderSelectOptions()

renderSelectOptions() public static method Renders the option tags that can be used by dropDownList() and listBox(). public static string renderSelectOptions ( $selection, $items, &$tagOptions = [] )$selection string|array|null The selected value(s). String for single or array for multiple selection(s). $items array The option data items. The array keys are option values, and the array values are the corresponding option labels. The array can also be nested (i.e. some array value

helpers\BaseHtml removeCssStyle()

removeCssStyle() public static method Removes the specified CSS style from the HTML options. For example, Html::removeCssStyle($options, ['width', 'height']); See also addCssStyle(). public static void removeCssStyle ( &$options, $properties )$options array The HTML options to be modified. $properties string|array The CSS properties to be removed. You may use a string if you are removing a single property.