HtmlHelper Class Reference

Public Member Functions | |
| _parseAttributes ($options, $exclude=null, $insertBefore= ' ', $insertAfter=null) | |
| addCrumb ($name, $link) | |
| areaTag ($tagName, $cols=60, $rows=10, $htmlAttributes=array(), $return=false) | |
| charset ($charset=null, $return=false) | |
| charsetTag ($charset, $return=false) | |
| checkbox ($fieldName, $title=null, $htmlAttributes=array(), $return=false) | |
| checkboxTag ($fieldName, $title=null, $htmlAttributes=array(), $return=false) | |
| contentTag ($name, $content, $options=null) | |
| css ($path, $rel= 'stylesheet', $htmlAttributes=array(), $return=false) | |
| cssTag ($path, $rel= 'stylesheet', $htmlAttributes=array(), $return=false) | |
| dateTimeOptionTag ($tagName, $dateFormat= 'DMY', $timeFormat= '12', $selected=null, $selectAttr=null, $optionAttr=null, $showEmpty=true) | |
| dayOptionTag ($tagName, $value=null, $selected=null, $selectAttr=null, $optionAttr=null, $showEmpty=true) | |
| file ($fieldName, $htmlAttributes=array(), $return=false) | |
| fileTag ($fieldName, $htmlAttributes=array(), $return=false) | |
| formTag ($target=null, $type= 'post', $htmlAttributes=array()) | |
| getCrumbs ($separator= '»', $startText=false, $return=false) | |
| guiListTree ($data, $htmlAttributes=array(), $bodyKey= 'body', $childrenKey= 'children', $return=false) | |
| hidden ($fieldName, $htmlAttributes=array(), $return=false) | |
| hiddenTag ($tagName, $value=null, $htmlOptions=null) | |
| hourOptionTag ($tagName, $value=null, $format24Hours=false, $selected=null, $selectAttr=null, $optionAttr=null, $showEmpty=true) | |
| image ($path, $htmlAttributes=array(), $return=false) | |
| imageTag ($path, $alt=null, $htmlAttributes=array(), $return=false) | |
| input ($fieldName, $htmlAttributes=array(), $return=false) | |
| inputTag ($tagName, $size=20, $htmlOptions=null) | |
| javascriptIncludeTag ($url) | |
| javascriptTag ($script) | |
| link ($title, $url=null, $htmlAttributes=array(), $confirmMessage=false, $escapeTitle=true, $return=false) | |
| linkEmail ($title, $email=null, $options=null) | |
| linkOut ($title, $url=null, $htmlAttributes=array(), $escapeTitle=true, $return=false) | |
| linkTo ($title, $url, $htmlAttributes=array(), $confirmMessage=false, $escapeTitle=true, $return=false) | |
| meridianOptionTag ($tagName, $value=null, $selected=null, $selectAttr=null, $optionAttr=null, $showEmpty=true) | |
| minuteOptionTag ($tagName, $value=null, $selected=null, $selectAttr=null, $optionAttr=null, $showEmpty=true) | |
| monthOptionTag ($tagName, $value=null, $selected=null, $selectAttr=null, $optionAttr=null, $showEmpty=true) | |
| parseHtmlOptions ($options, $exclude=null, $insertBefore= ' ', $insertAfter=null) | |
| password ($fieldName, $htmlAttributes=array(), $return=false) | |
| passwordTag ($fieldName, $size=20, $htmlAttributes=array(), $return=false) | |
| radio ($fieldName, $options, $inbetween=null, $htmlAttributes=array(), $return=false) | |
| radioTags ($fieldName, $options, $inbetween=null, $htmlAttributes=array(), $return=false) | |
| selectTag ($fieldName, $optionElements, $selected=null, $selectAttr=array(), $optionAttr=null, $showEmpty=true, $return=false) | |
| setFormTag ($tagValue) | |
| submit ($caption= 'Submit', $htmlAttributes=array(), $return=false) | |
| submitTag () | |
| tableCells ($data, $oddTrOptions=null, $evenTrOptions=null, $return=false) | |
| tableHeaders ($names, $trOptions=null, $thOptions=null, $return=false) | |
| tag ($name, $options=null, $open=false) | |
| tagErrorMsg ($field, $text) | |
| tagIsInvalid ($model, $field) | |
| tagValue ($fieldName, $escape=false) | |
| textarea ($fieldName, $htmlAttributes=array(), $return=false) | |
| trim () | |
| url ($url=null, $return=false) | |
| urlFor ($url) | |
| validate () | |
| validateErrors () | |
| yearOptionTag ($tagName, $value=null, $minYear=null, $maxYear=null, $selected=null, $selectAttr=null, $optionAttr=null, $showEmpty=true) | |
Public Attributes | |
| $_crumbs = array() | |
| $action = null | |
| $base = null | |
| $data = null | |
| $field = null | |
| $here = null | |
| $model = null | |
| $params = array() | |
Detailed Description
Definition at line 35 of file html.php.
Member Function Documentation
| HtmlHelper::_parseAttributes | ( | $ | options, | |
| $ | exclude = null, |
|||
| $ | insertBefore = ' ', |
|||
| $ | insertAfter = null | |||
| ) |
Returns a space-delimited string with items of the $options array. If a key of $options array happens to be one of: + 'compact' + 'checked' + 'declare' + 'readonly' + 'disabled' + 'selected' + 'defer' + 'ismap' + 'nohref' + 'noshade' + 'nowrap' + 'multiple' + 'noresize'
And its value is one of: + 1 + true + 'true'
Then the value will be reset to be identical with key's name. If the value is not one of these 3, the parameter is not output.
- Parameters:
-
array $options Array of options. array $exclude Array of options to be excluded. string $insertBefore String to be inserted before options. string $insertAfter String to be inserted ater options.
- Returns:
- string protected
Definition at line 984 of file html.php.
Referenced by link().
| HtmlHelper::addCrumb | ( | $ | name, | |
| $ | link | |||
| ) |
| HtmlHelper::areaTag | ( | $ | tagName, | |
| $ | cols = 60, |
|||
| $ | rows = 10, |
|||
| $ | htmlAttributes = array(), |
|||
| $ | return = false | |||
| ) |
- Deprecated:
- Name changed to 'textarea'. Version 0.9.2.
- See also:
- HtmlHelper::textarea()
| HtmlHelper::charset | ( | $ | charset = null, |
|
| $ | return = false | |||
| ) |
Returns a charset META-tag.
- Parameters:
-
string $charset boolean $return Wheter this method should return a value or output it. This overrides AUTO_OUTPUT.
- Returns:
- mixed Either string or echos the value, depends on AUTO_OUTPUT and $return. public
Definition at line 110 of file html.php.
References Helper::output().
| HtmlHelper::charsetTag | ( | $ | charset, | |
| $ | return = false | |||
| ) |
- Deprecated:
- Name changed to 'charset'. Version 0.9.2.
- See also:
- HtmlHelper::charset()
| HtmlHelper::checkbox | ( | $ | fieldName, | |
| $ | title = null, |
|||
| $ | htmlAttributes = array(), |
|||
| $ | return = false | |||
| ) |
Creates a checkbox widget.
- Parameters:
-
string $fieldName Name of a field, like this "Modelname/fieldname"
- Deprecated:
- string $title
- Parameters:
-
array $htmlAttributes Array of HTML attributes. boolean $return Wheter this method should return a value or output it. This overrides AUTO_OUTPUT.
- Returns:
- mixed Either string or echos the value, depends on AUTO_OUTPUT and $return. public
Definition at line 265 of file html.php.
References $output, Inflector::camelize(), and ConnectionManager::getDataSource().
| HtmlHelper::checkboxTag | ( | $ | fieldName, | |
| $ | title = null, |
|||
| $ | htmlAttributes = array(), |
|||
| $ | return = false | |||
| ) |
- Deprecated:
- Name changed to 'checkbox'. Version 0.9.2.
- See also:
- HtmlHelper::checkbox()
| HtmlHelper::contentTag | ( | $ | name, | |
| $ | content, | |||
| $ | options = null | |||
| ) |
- Deprecated:
- Version 0.9.2. Will not be available after 1.1.x.x
| HtmlHelper::css | ( | $ | path, | |
| $ | rel = 'stylesheet', |
|||
| $ | htmlAttributes = array(), |
|||
| $ | return = false | |||
| ) |
Creates a link element for CSS stylesheets.
- Parameters:
-
string $path Path to CSS file string $rel Rel attribute. Defaults to "stylesheet". array $htmlAttributes Array of HTML attributes. boolean $return Wheter this method should return a value or output it. This overrides AUTO_OUTPUT.
- Returns:
- mixed Either string or echos the value, depends on AUTO_OUTPUT and $return. public
| HtmlHelper::cssTag | ( | $ | path, | |
| $ | rel = 'stylesheet', |
|||
| $ | htmlAttributes = array(), |
|||
| $ | return = false | |||
| ) |
- Deprecated:
- Name changed to 'css'. Version 0.9.2.
- See also:
- HtmlHelper::css()
| HtmlHelper::dateTimeOptionTag | ( | $ | tagName, | |
| $ | dateFormat = 'DMY', |
|||
| $ | timeFormat = '12', |
|||
| $ | selected = null, |
|||
| $ | selectAttr = null, |
|||
| $ | optionAttr = null, |
|||
| $ | showEmpty = true | |||
| ) |
Returns a set of SELECT elements for a full datetime setup: day, month and year, and then time.
- Parameters:
-
string $tagName Prefix name for the SELECT element string $dateFormat DMY, MDY, YMD or NONE. string $timeFormat 12, 24, NONE string $selected Option which is selected. array $optionAttr Attribute array for the option elements.
- Returns:
- string The HTML formatted OPTION element public
| HtmlHelper::dayOptionTag | ( | $ | tagName, | |
| $ | value = null, |
|||
| $ | selected = null, |
|||
| $ | selectAttr = null, |
|||
| $ | optionAttr = null, |
|||
| $ | showEmpty = true | |||
| ) |
Returns a SELECT element for days.
- Parameters:
-
string $tagName Prefix name for the SELECT element
- Deprecated:
- string $value
- Parameters:
-
string $selected Option which is selected. array $optionAttr Attribute array for the option elements. boolean $showEmpty Show/hide the empty select option
- Returns:
- mixed public
| HtmlHelper::file | ( | $ | fieldName, | |
| $ | htmlAttributes = array(), |
|||
| $ | return = false | |||
| ) |
Creates file input widget.
- Parameters:
-
string $fieldName Name of a field, like this "Modelname/fieldname" array $htmlAttributes Array of HTML attributes. boolean $return Wheter this method should return a valueor output it. This overrides AUTO_OUTPUT.
- Returns:
- mixed Either string or echos the value, depends on AUTO_OUTPUT and $return. public
Definition at line 328 of file html.php.
References Inflector::camelize().
| HtmlHelper::fileTag | ( | $ | fieldName, | |
| $ | htmlAttributes = array(), |
|||
| $ | return = false | |||
| ) |
- Deprecated:
- Name changed to 'file'. Version 0.9.2.
- See also:
- HtmlHelper::file()
| HtmlHelper::formTag | ( | $ | target = null, |
|
| $ | type = 'post', |
|||
| $ | htmlAttributes = array() | |||
| ) |
This is very WYSIWYG unfriendly, use HtmlHelper::url() to get contents of "action" attribute. Version 0.9.2.
- Deprecated:
- Version 0.9.2. Will not be available after 1.1.x.x
- See also:
- FormHelper::create()
Returns the breadcrumb trail as a sequence of -separated links.
- Parameters:
-
string $separator Text to separate crumbs. string $startText This will be the first crumb, if false it defaults to first crumb in array boolean $return Wheter this method should return a value or output it. This overrides AUTO_OUTPUT.
- Returns:
- mixed Either string or echos the value, depends on AUTO_OUTPUT and $return. If $this->_crumbs is empty, return null. public
| HtmlHelper::guiListTree | ( | $ | data, | |
| $ | htmlAttributes = array(), |
|||
| $ | bodyKey = 'body', |
|||
| $ | childrenKey = 'children', |
|||
| $ | return = false | |||
| ) |
Generates a nested unordered list tree from an array.
- Parameters:
-
array $data array $htmlAttributes string $bodyKey string $childrenKey boolean $return Wheter this method should return a value or output it. This overrides AUTO_OUTPUT.
- Returns:
- mixed Either string or echos the value, depends on AUTO_OUTPUT and $return. If $this->_crumbs is empty, return null. public
Definition at line 857 of file html.php.
References $data.
| HtmlHelper::hidden | ( | $ | fieldName, | |
| $ | htmlAttributes = array(), |
|||
| $ | return = false | |||
| ) |
Creates a hidden input field.
- Parameters:
-
string $fieldName Name of a field, like this "Modelname/fieldname" array $htmlAttributes Array of HTML attributes. boolean $return Wheter this method should return a value or output it. This overrides AUTO_OUTPUT.
- Returns:
- mixed Either string or echos the value, depends on AUTO_OUTPUT and $return. public
Definition at line 371 of file html.php.
References Inflector::camelize().
| HtmlHelper::hiddenTag | ( | $ | tagName, | |
| $ | value = null, |
|||
| $ | htmlOptions = null | |||
| ) |
- Deprecated:
- Name changed to 'hidden'. Version 0.9.2.
- See also:
- HtmlHelper::hidden()
| HtmlHelper::hourOptionTag | ( | $ | tagName, | |
| $ | value = null, |
|||
| $ | format24Hours = false, |
|||
| $ | selected = null, |
|||
| $ | selectAttr = null, |
|||
| $ | optionAttr = null, |
|||
| $ | showEmpty = true | |||
| ) |
Returns a SELECT element for hours.
- Parameters:
-
string $tagName Prefix name for the SELECT element
- Deprecated:
- string $value
- Parameters:
-
boolean $format24Hours True for 24 hours format string $selected Option which is selected. array $optionAttr Attribute array for the option elements.
- Returns:
- mixed public
| HtmlHelper::image | ( | $ | path, | |
| $ | htmlAttributes = array(), |
|||
| $ | return = false | |||
| ) |
Creates a formatted IMG element.
- Parameters:
-
string $path Path to the image file, relative to the webroot/img/ directory. array $htmlAttributes Array of HTML attributes. boolean $return Wheter this method should return a value or output it. This overrides AUTO_OUTPUT.
- Returns:
- mixed Either string or echos the value, depends on AUTO_OUTPUT and $return. public
| HtmlHelper::imageTag | ( | $ | path, | |
| $ | alt = null, |
|||
| $ | htmlAttributes = array(), |
|||
| $ | return = false | |||
| ) |
- Deprecated:
- Name changed to 'image'. Version 0.9.2.
- See also:
- HtmlHelper::image()
| HtmlHelper::input | ( | $ | fieldName, | |
| $ | htmlAttributes = array(), |
|||
| $ | return = false | |||
| ) |
Creates a text input widget.
- Parameters:
-
string $fieldNamem Name of a field, like this "Modelname/fieldname" array $htmlAttributes Array of HTML attributes. boolean $return Wheter this method should return a value or output it. This overrides AUTO_OUTPUT.
- Returns:
- mixed Either string or echos the value, depends on AUTO_OUTPUT and $return. public
Definition at line 407 of file html.php.
References Inflector::camelize().
| HtmlHelper::inputTag | ( | $ | tagName, | |
| $ | size = 20, |
|||
| $ | htmlOptions = null | |||
| ) |
- Deprecated:
- Name changed to 'input'. Version 0.9.2.
- See also:
- HtmlHelper::input()
| HtmlHelper::javascriptIncludeTag | ( | $ | url | ) |
| HtmlHelper::javascriptTag | ( | $ | script | ) |
| HtmlHelper::link | ( | $ | title, | |
| $ | url = null, |
|||
| $ | htmlAttributes = array(), |
|||
| $ | confirmMessage = false, |
|||
| $ | escapeTitle = true, |
|||
| $ | return = false | |||
| ) |
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.
- Parameters:
-
string $title The content of the A tag. string $url Cake-relative URL, or external URL (starts with http://) array $htmlAttributes Array of HTML attributes. string $confirmMessage Confirmation message. boolean $escapeTitle Whether or not the text in the $title variable should be HTML escaped. boolean $return Wheter this method should return a value or output it. This overrides AUTO_OUTPUT.
- Returns:
- mixed Either string or echos the value, depends on AUTO_OUTPUT and $return. public
Definition at line 165 of file html.php.
References $output, and _parseAttributes().
| HtmlHelper::linkEmail | ( | $ | title, | |
| $ | email = null, |
|||
| $ | options = null | |||
| ) |
This should be done using a content filter.
- Deprecated:
- Version 0.9.2. Will not be available after 1.1.x.x
| HtmlHelper::linkOut | ( | $ | title, | |
| $ | url = null, |
|||
| $ | htmlAttributes = array(), |
|||
| $ | escapeTitle = true, |
|||
| $ | return = false | |||
| ) |
- Deprecated:
- Unified with 'link'. Version 0.9.2.
- See also:
- HtmlHelper::link()
| HtmlHelper::linkTo | ( | $ | title, | |
| $ | url, | |||
| $ | htmlAttributes = array(), |
|||
| $ | confirmMessage = false, |
|||
| $ | escapeTitle = true, |
|||
| $ | return = false | |||
| ) |
- Deprecated:
- Unified with 'link'. Version 0.9.2.
- See also:
- HtmlHelper::link()
| HtmlHelper::meridianOptionTag | ( | $ | tagName, | |
| $ | value = null, |
|||
| $ | selected = null, |
|||
| $ | selectAttr = null, |
|||
| $ | optionAttr = null, |
|||
| $ | showEmpty = true | |||
| ) |
Returns a SELECT element for AM or PM.
- Parameters:
-
string $tagName Prefix name for the SELECT element
- Deprecated:
- string $value
- Parameters:
-
string $selected Option which is selected. array $optionAttr Attribute array for the option elements.
- Returns:
- mixed public
| HtmlHelper::minuteOptionTag | ( | $ | tagName, | |
| $ | value = null, |
|||
| $ | selected = null, |
|||
| $ | selectAttr = null, |
|||
| $ | optionAttr = null, |
|||
| $ | showEmpty = true | |||
| ) |
Returns a SELECT element for minutes.
- Parameters:
-
string $tagName Prefix name for the SELECT element
- Deprecated:
- string $value
- Parameters:
-
string $selected Option which is selected. array $optionAttr Attribute array for the option elements.
- Returns:
- mixed public
| HtmlHelper::monthOptionTag | ( | $ | tagName, | |
| $ | value = null, |
|||
| $ | selected = null, |
|||
| $ | selectAttr = null, |
|||
| $ | optionAttr = null, |
|||
| $ | showEmpty = true | |||
| ) |
Returns a SELECT element for months.
- Parameters:
-
string $tagName Prefix name for the SELECT element
- Deprecated:
- string $value
- Parameters:
-
string $selected Option which is selected. array $optionAttr Attribute array for the option elements. boolean $showEmpty Show/hide the empty select option
- Returns:
- mixed public
| HtmlHelper::parseHtmlOptions | ( | $ | options, | |
| $ | exclude = null, |
|||
| $ | insertBefore = ' ', |
|||
| $ | insertAfter = null | |||
| ) |
- Deprecated:
- Name changed to '_parseAttributes'. Version 0.9.2.
- See also:
- HtmlHelper::_parseAttributes()
Definition at line 1109 of file html.php.
References $v.
| HtmlHelper::password | ( | $ | fieldName, | |
| $ | htmlAttributes = array(), |
|||
| $ | return = false | |||
| ) |
Creates a password input widget.
- Parameters:
-
string $fieldName Name of a field, like this "Modelname/fieldname" array $htmlAttributes Array of HTML attributes. boolean $return Wheter this method should return a value or output it. This overrides AUTO_OUTPUT.
- Returns:
- mixed Either string or echos the value, depends on AUTO_OUTPUT and $return. public
Definition at line 208 of file html.php.
References Inflector::camelize().
| HtmlHelper::passwordTag | ( | $ | fieldName, | |
| $ | size = 20, |
|||
| $ | htmlAttributes = array(), |
|||
| $ | return = false | |||
| ) |
- Deprecated:
- Name changed to 'password'. Version 0.9.2.
- See also:
- HtmlHelper::password()
Definition at line 1131 of file html.php.
References $args.
| HtmlHelper::radio | ( | $ | fieldName, | |
| $ | options, | |||
| $ | inbetween = null, |
|||
| $ | htmlAttributes = array(), |
|||
| $ | return = false | |||
| ) |
Creates a set of radio widgets.
- Parameters:
-
string $fieldName Name of a field, like this "Modelname/fieldname" array $options Radio button options array array $inbetween String that separates the radio buttons. array $htmlAttributes Array of HTML attributes. boolean $return Wheter this method should return a value or output it. This overrides AUTO_OUTPUT.
- Returns:
- mixed Either string or echos the value, depends on AUTO_OUTPUT and $return. public
| HtmlHelper::radioTags | ( | $ | fieldName, | |
| $ | options, | |||
| $ | inbetween = null, |
|||
| $ | htmlAttributes = array(), |
|||
| $ | return = false | |||
| ) |
- Deprecated:
- Name changed to 'radio'. Version 0.9.2.
- See also:
- HtmlHelper::radio()
| HtmlHelper::selectTag | ( | $ | fieldName, | |
| $ | optionElements, | |||
| $ | selected = null, |
|||
| $ | selectAttr = array(), |
|||
| $ | optionAttr = null, |
|||
| $ | showEmpty = true, |
|||
| $ | return = false | |||
| ) |
Returns a formatted SELECT element.
- Parameters:
-
string $fieldName Name attribute of the SELECT array $optionElements Array of the OPTION elements (as 'value'=>'Text' pairs) to be used in the SELECT element mixed $selected Selected option array $selectAttr Array of HTML options for the opening SELECT element array $optionAttr Array of HTML options for the enclosed OPTION elements boolean $show_empty If true, the empty select option is shown boolean $return Whether this method should return a value
- Returns:
- string Formatted SELECT element public
Definition at line 443 of file html.php.
References Inflector::camelize().
| HtmlHelper::setFormTag | ( | $ | tagValue | ) |
| HtmlHelper::submit | ( | $ | caption = 'Submit', |
|
| $ | htmlAttributes = array(), |
|||
| $ | return = false | |||
| ) |
Creates a submit widget.
- Parameters:
-
string $caption Text on submit button array $htmlAttributes Array of HTML attributes. boolean $return Wheter this method should return a value or output it. This overrides AUTO_OUTPUT.
- Returns:
- mixed Either string or echos the value, depends on AUTO_OUTPUT and $return. public
| HtmlHelper::submitTag | ( | ) |
- Deprecated:
- Name changed to 'submit'. Version 0.9.2.
- See also:
- HtmlHelper::submit()
Definition at line 1154 of file html.php.
References $args.
| HtmlHelper::tableCells | ( | $ | data, | |
| $ | oddTrOptions = null, |
|||
| $ | evenTrOptions = null, |
|||
| $ | return = false | |||
| ) |
Returns a formatted string of table rows (TR's with TD's in them).
- Parameters:
-
array $data Array of table data array $oddTrOptionsHTML options for odd TR elements array $evenTrOptionsHTML options for even TR elements boolean $return Wheter this method should return a value
- Returns:
- string Formatted HTML public
Definition at line 828 of file html.php.
References $data.
| HtmlHelper::tableHeaders | ( | $ | names, | |
| $ | trOptions = null, |
|||
| $ | thOptions = null, |
|||
| $ | return = false | |||
| ) |
Returns a row of formatted and named TABLE headers.
- Parameters:
-
array $names Array of tablenames. array $trOptions HTML options for TR elements. array $thOptions HTML options for TH elements. boolean $return Wheter this method should return a value
- Returns:
- string public
Definition at line 809 of file html.php.
References $data.
| HtmlHelper::tag | ( | $ | name, | |
| $ | options = null, |
|||
| $ | open = false | |||
| ) |
- Deprecated:
- Version 0.9.2. Will not be available after 1.1.x.x
| HtmlHelper::tagErrorMsg | ( | $ | field, | |
| $ | text | |||
| ) |
Returns a formatted error message for given FORM field, NULL if no errors.
- Parameters:
-
string $field A field name, like "Modelname/fieldname" string $text Error message
- Returns:
- string If there are errors this method returns an error message, else NULL. public
| HtmlHelper::tagIsInvalid | ( | $ | model, | |
| $ | field | |||
| ) |
| HtmlHelper::tagValue | ( | $ | fieldName, | |
| $ | escape = false | |||
| ) |
| HtmlHelper::textarea | ( | $ | fieldName, | |
| $ | htmlAttributes = array(), |
|||
| $ | return = false | |||
| ) |
Creates a textarea widget.
- Parameters:
-
string $fieldName Name of a field, like this "Modelname/fieldname" array $htmlAttributes Array of HTML attributes. boolean $return Wheter this method should return a value or output it. This overrides AUTO_OUTPUT.
- Returns:
- mixed Either string or echos the value, depends on AUTO_OUTPUT and $return. public
Definition at line 235 of file html.php.
References Inflector::camelize().
| HtmlHelper::trim | ( | ) |
| HtmlHelper::url | ( | $ | url = null, |
|
| $ | return = false | |||
| ) |
Finds URL for specified action.
Returns an URL pointing to a combination of controller and action. Param $url can be: + Empty - the method will find adress to actuall controller/action. + '/' - the method will find base URL of application. + A combination of controller/action - the method will find url for it.
- Parameters:
-
string $url Cake-relative URL, like "/products/edit/92" or "/presidents/elect/4" boolean $return Wheter this method should return a value or output it. This overrides AUTO_OUTPUT.
- Returns:
- mixed Either string or echos the value, depends on AUTO_OUTPUT and $return. public
Definition at line 130 of file html.php.
References $base, $output, Helper::output(), and Inflector::underscore().
| HtmlHelper::urlFor | ( | $ | url | ) |
- Deprecated:
- Name changed to 'url'. Version 0.9.2.
- See also:
- HtmlHelper::url()
| HtmlHelper::validate | ( | ) |
| HtmlHelper::validateErrors | ( | ) |
| HtmlHelper::yearOptionTag | ( | $ | tagName, | |
| $ | value = null, |
|||
| $ | minYear = null, |
|||
| $ | maxYear = null, |
|||
| $ | selected = null, |
|||
| $ | selectAttr = null, |
|||
| $ | optionAttr = null, |
|||
| $ | showEmpty = true | |||
| ) |
Returns a SELECT element for years
- Parameters:
-
string $tagName Prefix name for the SELECT element
- Deprecated:
- string $value
- Parameters:
-
integer $minYear First year in sequence integer $maxYear Last year in sequence string $selected Option which is selected. array $optionAttr Attribute array for the option elements. boolean $showEmpty Show/hide the empty select option
- Returns:
- mixed public
Member Data Documentation
The documentation for this class was generated from the following file:
- 1.1.x.x/cake/libs/view/helpers/html.php