TagHelper defines some base helpers to construct html tags.
Function Details
-
cdata_section ($content)
Browse code
-
(string) comment_as_conditional ($condition, $content)
Browse code
Wraps the content in conditional comments.
-
content_tag ($name, $content = '', $options = array())
Browse code
-
escape_javascript ($javascript = '')
Browse code
Escape carrier returns and single and double quotes for Javascript
segments.
-
(string) escape_once ($html)
Browse code
| $html |
HTML string to escape
|
Escapes an HTML string.
returns escaped string
-
(string) fix_double_escape ($escaped)
Browse code
| $escaped |
HTML string to fix
|
Fixes double escaped strings.
returns fixed escaped string
-
(string) get_id_from_name ($name, $value = null)
Browse code
| $name |
field name
|
| $value |
field value
|
Returns a formatted ID based on the parameter
and optionally the parameter.
This function determines the proper form field ID name based on the parameters. If a form field has an array value as a name we need to convert them to proper and unique IDs like so: name[] => name (if value == null)
name[] => name_value (if value != null)
name[bob] => name_bob
name[item][total] => name_item_total Examples: echo get_id_from_name('status[]', '1');
returns <select> tag populated with all the languages in the world.
-
(string) tag ($name, $options = array(), $open = false)
Browse code
| $name |
tag name
|
| $options |
tag options
|
| $open |
true to leave tag open
|
Constructs an html tag.
-
(array) _convert_options ($options)
Browse code
Converts specific to their correct HTML
format
returns returns properly formatted options
-
_get_option (&$options, $name, $default = null)
Browse code
-
_parse_attributes ($string)
Browse code
-
_tag_options ($options = array())
Browse code
|