Inheritance diagram for HtmlHelper:

Public Member Functions | |
| __nestedListItem ($items, $attributes, $itemAttributes, $tag) | |
| addCrumb ($name, $link=null, $options=null) | |
| charset ($charset=null) | |
| css ($path, $rel=null, $htmlAttributes=array(), $inline=true) | |
| div ($class=null, $text=null, $attributes=array(), $escape=false) | |
| docType ($type= 'xhtml-strict') | |
| getCrumbs ($separator= '»', $startText=false) | |
| image ($path, $options=array()) | |
| link ($title, $url=null, $htmlAttributes=array(), $confirmMessage=false, $escapeTitle=true) | |
| meta ($type, $url=null, $attributes=array(), $inline=true) | |
| nestedList ($list, $attributes=array(), $itemAttributes=array(), $tag= 'ul') | |
| para ($class, $text, $attributes=array(), $escape=false) | |
| style ($data, $inline=true) | |
| tableCells ($data, $oddTrOptions=null, $evenTrOptions=null, $useCount=false, $continueOddEven=true) | |
| tableHeaders ($names, $trOptions=null, $thOptions=null) | |
| tag ($name, $text=null, $attributes=array(), $escape=false) | |
Public Attributes | |
| $__docTypes | |
| $_crumbs = array() | |
| $action = null | |
| $base = null | |
| $data = null | |
| $here = null | |
| $params = array() | |
| $tags | |
Definition at line 33 of file html.php.
| HtmlHelper::__nestedListItem | ( | $ | items, | |
| $ | attributes, | |||
| $ | itemAttributes, | |||
| $ | tag | |||
| ) |
Internal function to build a nested list (UL/OL) out of an associative array.
| array | $list Set of elements to list | |
| array | $attributes Additional HTML attributes of the list (ol/ul) tag | |
| array | $itemAttributes Additional HTML attributes of the list item (LI) tag | |
| string | $tag Type of list tag to use (ol/ul) |
Definition at line 624 of file html.php.
References $out.
| HtmlHelper::addCrumb | ( | $ | name, | |
| $ | link = null, |
|||
| $ | options = null | |||
| ) |
| HtmlHelper::charset | ( | $ | charset = null |
) |
Returns a charset META-tag.
| string | $charset The character set to be used in the meta tag. Example: "utf-8". |
Definition at line 257 of file html.php.
References Helper::output(), and Configure::read().
| HtmlHelper::css | ( | $ | path, | |
| $ | rel = null, |
|||
| $ | htmlAttributes = array(), |
|||
| $ | inline = true | |||
| ) |
Creates a link element for CSS stylesheets.
| mixed | $path The name of a CSS style sheet or an array containing names of CSS stylesheets. If `$path` is prefixed with '/', the path will be relative to the webroot of your application. Otherwise, the path will be relative to your CSS path, usually webroot/css. | |
| string | $rel Rel attribute. Defaults to "stylesheet". If equal to 'import' the stylesheet will be imported. | |
| array | $htmlAttributes Array of HTML attributes. | |
| boolean | $inline If set to false, the generated tag appears in the head tag of the layout. |
| HtmlHelper::div | ( | $ | class = null, |
|
| $ | text = null, |
|||
| $ | attributes = array(), |
|||
| $ | escape = false | |||
| ) |
Returns a formatted DIV tag for HTML FORMs.
| string | $class CSS class name of the div element. | |
| string | $text String content that will appear inside the div element. If null, only a start tag will be printed | |
| array | $attributes Additional HTML attributes of the DIV tag | |
| boolean | $escape If true, $text will be HTML-escaped |
| HtmlHelper::docType | ( | $ | type = 'xhtml-strict' |
) |
Returns a doctype string.
Possible doctypes: + html4-strict: HTML4 Strict. + html4-trans: HTML4 Transitional. + html4-frame: HTML4 Frameset. + xhtml-strict: XHTML1 Strict. + xhtml-trans: XHTML1 Transitional. + xhtml-frame: XHTML1 Frameset. + xhtml11: XHTML1.1.
| string | $type Doctype to use. |
Definition at line 183 of file html.php.
References Helper::output().
| HtmlHelper::getCrumbs | ( | $ | separator = '»', |
|
| $ | startText = false | |||
| ) |
| HtmlHelper::image | ( | $ | path, | |
| $ | options = array() | |||
| ) |
Creates a formatted IMG element.
| string | $path Path to the image file, relative to the app/webroot/img/ directory. | |
| array | $options Array of HTML attributes. |
Definition at line 434 of file html.php.
References Configure::read().
Referenced by meta().
| HtmlHelper::link | ( | $ | title, | |
| $ | url = null, |
|||
| $ | htmlAttributes = array(), |
|||
| $ | confirmMessage = false, |
|||
| $ | escapeTitle = true | |||
| ) |
Creates an HTML link.
If $url starts with "http://" this is treated as an external link. Else, it is treated as a path to controller/action and parsed with the HtmlHelper::url() method.
If the $url is empty, $title is used instead.
| string | $title The content to be wrapped by tags. | |
| mixed | $url Cake-relative URL or array of URL parameters, or external URL (starts with http://) | |
| array | $htmlAttributes Array of HTML attributes. | |
| string | $confirmMessage JavaScript confirmation message. | |
| boolean | $escapeTitle Whether or not $title should be HTML escaped. |
Definition at line 279 of file html.php.
References $url, Helper::_parseAttributes(), Helper::output(), and Helper::url().
Referenced by meta().
| HtmlHelper::meta | ( | $ | type, | |
| $ | url = null, |
|||
| $ | attributes = array(), |
|||
| $ | inline = true | |||
| ) |
Creates a link to an external resource and handles basic meta tags
| string | $type The title of the external resource | |
| mixed | $url The address of the external resource or string for content attribute | |
| array | $attributes Other attributes for the generated tag. If the type attribute is html, rss, atom, or icon, the mime-type is returned. | |
| boolean | $inline If set to false, the generated tag appears in the head tag of the layout. |
Definition at line 198 of file html.php.
References $out, $url, Helper::_parseAttributes(), ext(), ClassRegistry::getObject(), image(), link(), name(), Helper::output(), Helper::url(), and Helper::webroot().
| HtmlHelper::nestedList | ( | $ | list, | |
| $ | attributes = array(), |
|||
| $ | itemAttributes = array(), |
|||
| $ | tag = 'ul' | |||
| ) |
Build a nested list (UL/OL) out of an associative array.
| array | $list Set of elements to list | |
| array | $attributes Additional HTML attributes of the list (ol/ul) tag or if ul/ol use that as tag | |
| array | $itemAttributes Additional HTML attributes of the list item (LI) tag | |
| string | $tag Type of list tag to use (ol/ul) |
| HtmlHelper::para | ( | $ | class, | |
| $ | text, | |||
| $ | attributes = array(), |
|||
| $ | escape = false | |||
| ) |
Returns a formatted P tag.
| string | $class CSS class name of the p element. | |
| string | $text String content that will appear inside the p element. | |
| array | $attributes Additional HTML attributes of the P tag | |
| boolean | $escape If true, $text will be HTML-escaped |
| HtmlHelper::style | ( | $ | data, | |
| $ | inline = true | |||
| ) |
| HtmlHelper::tableCells | ( | $ | data, | |
| $ | oddTrOptions = null, |
|||
| $ | evenTrOptions = null, |
|||
| $ | useCount = false, |
|||
| $ | continueOddEven = true | |||
| ) |
Returns a formatted string of table rows (TR's with TD's in them).
| array | $data Array of table data | |
| array | $oddTrOptions HTML options for odd TR elements if true useCount is used | |
| array | $evenTrOptions HTML options for even TR elements | |
| bool | $useCount adds class "column-$i" | |
| bool | $continueOddEven If false, will use a non-static $count variable, so that the odd/even count is reset to zero just for that call |
Definition at line 491 of file html.php.
References $out.
| HtmlHelper::tableHeaders | ( | $ | names, | |
| $ | trOptions = null, |
|||
| $ | thOptions = null | |||
| ) |
| HtmlHelper::tag | ( | $ | name, | |
| $ | text = null, |
|||
| $ | attributes = array(), |
|||
| $ | escape = false | |||
| ) |
Returns a formatted block tag, i.e DIV, SPAN, P.
| string | $name Tag name. | |
| string | $text String content that will appear inside the div element. If null, only a start tag will be printed | |
| array | $attributes Additional HTML attributes of the DIV tag | |
| boolean | $escape If true, $text will be HTML-escaped |
| HtmlHelper::$__docTypes |
Initial value:
array(
'html4-strict' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
'html4-trans' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
'html4-frame' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">',
'xhtml-strict' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
'xhtml-trans' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
'xhtml-frame' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',
'xhtml11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">'
)
1.4.7