HtmlHelper Class Reference

Inheritance diagram for HtmlHelper:

Inheritance graph
[legend]
Collaboration diagram for HtmlHelper:

Collaboration graph
[legend]

Public Member Functions

 link ($title, $url, $htmlAttributes=array(), $confirmMessage=false, $escapeTitle=true)
 image ($url, $htmlAttributes=array())
 selectTag ($fieldName, $optionElements, $selected=null, $selectAttr=array(), $optionAttr=array(), $showEmpty=false)
 escape ($s, $singleQuotes=true)
 javascriptTag ($files, $cacheAndMinify=false)
 cssTag ($files, $cacheAndMinify=false)
 tokenUrl ($url)

Detailed Description

Definition at line 15 of file html.php.


Member Function Documentation

cssTag ( files,
cacheAndMinify = false 
)

return css-tags for all given files. if DEBUG<=0 all files are joined into a single one and are sent compressed to the browser

Parameters:
array $files filename of css to include, relative to webroot/css/
Returns:
string css-tag(s)
Parameters:
bool $cacheAndMinify if we should join+compress+cache given target

Definition at line 195 of file html.php.

escape ( s,
singleQuotes = true 
)

escape string stuitable for javascript or php output

Parameters:
string $s string to escape
bool $singleQuotes if single quotes should be escaped (true) or double-quotes (false)

Definition at line 97 of file html.php.

Referenced by link().

Here is the caller graph for this function:

image ( url,
htmlAttributes = array () 
)

builds a complete link to an image. if relative it is assumed the image can be found in "webroot/img/"

Parameters:
string $url filename of the image (is automatically expanded if relative link)
array $htmlAttributes array of attributes of the link, for example "class"=>"dontunderline"

Definition at line 47 of file html.php.

References Helper::parseAttributes(), and Helper::url().

Here is the call graph for this function:

javascriptTag ( files,
cacheAndMinify = false 
)

return javascript-tags for all given files. if DEBUG<=0 all files are joined into a single one and are sent compressed to the browser

Parameters:
array $files filename of script to include, relative to webroot/js/
Returns:
string javascript-tag(s)
Parameters:
bool $cacheAndMinify if we should join+compress+cache given target

Definition at line 183 of file html.php.

link ( title,
url,
htmlAttributes = array (),
confirmMessage = false,
escapeTitle = true 
)

build a href link

Parameters:
string $title what the link should say
string url where the link should point (is automatically expanded if relative link)
array $htmlAttributes array of attributes of the link, for example "class"=>"dontunderline"
string an optional message that asks if you are really shure if you click on the link and aborts navigation if user clicks cancel, ignored if false
boolean $escapeTitle if we should run htmlspecialchars over the links title

Definition at line 25 of file html.php.

References escape(), Helper::parseAttributes(), and Helper::url().

Here is the call graph for this function:

selectTag ( fieldName,
optionElements,
selected = null,
selectAttr = array (),
optionAttr = array (),
showEmpty = false 
)

build select/option tags

Parameters:
string $fieldName
array $optionElements
string $selected
array $selectAttr array of attributes of the select-tag, for example "class"=>"dontunderline"
array $optionAttr array of attributes for each option-tag, for example "class"=>"dontunderline"
boolean $showEmpty if we should display an empty option as the default selection so the user knows (s)he has to select something

Definition at line 60 of file html.php.

References h(), and Helper::parseAttributes().

Here is the call graph for this function:

tokenUrl ( url  ) 

Definition at line 200 of file html.php.

References is(), and Helper::url().

Here is the call graph for this function:


The documentation for this class was generated from the following file:

Generated on Mon Apr 27 16:29:07 2009 for kata by  doxygen 1.5.8