Inheritance diagram for Helper:

Public Member Functions | |
| __clean () | |
| __formatAttribute ($key, $value, $escape=true) | |
| __name ($options=array(), $field=null, $key= 'name') | |
| __reset () | |
| __selectedArray ($data, $key= 'id') | |
| _initInputField ($field, $options=array()) | |
| _parseAttributes ($options, $exclude=null, $insertBefore= ' ', $insertAfter=null) | |
| addClass ($options=array(), $class=null, $key= 'class') | |
| afterLayout () | |
| afterRender () | |
| beforeLayout () | |
| beforeRender () | |
| call__ ($method, $params) | |
| clean ($output) | |
| domId ($options=null, $id= 'id') | |
| field () | |
| get__ ($name) | |
| loadConfig ($name= 'tags') | |
| model () | |
| modelID () | |
| output ($str) | |
| set__ ($name, $value) | |
| setEntity ($entity, $setScope=false) | |
| tagIsInvalid ($model=null, $field=null, $modelID=null) | |
| url ($url=null, $full=false) | |
| value ($options=array(), $field=null, $key= 'value') | |
| webroot ($file) | |
Public Attributes | |
| $__cleaned = null | |
| $__tainted = null | |
| $action = null | |
| $argSeparator = null | |
| $base = null | |
| $data = null | |
| $helpers = null | |
| $here = null | |
| $namedArgs = null | |
| $params = array() | |
| $plugin = null | |
| $tags = array() | |
| $themeWeb = null | |
| $validationErrors = null | |
| $webroot = null | |
Definition at line 40 of file helper.php.
| Helper::__clean | ( | ) |
Removes harmful content from output
private
Definition at line 726 of file helper.php.
Referenced by clean().
| Helper::__formatAttribute | ( | $ | key, | |
| $ | value, | |||
| $ | escape = true | |||
| ) |
| string | $key | |
| string | $value |
Definition at line 287 of file helper.php.
Referenced by _parseAttributes().
| Helper::__name | ( | $ | options = array(), |
|
| $ | field = null, |
|||
| $ | key = 'name' | |||
| ) |
Gets the input field name for the current tag
| array | $options | |
| string | $key |
Reimplemented in FormHelper.
Definition at line 510 of file helper.php.
References ClassRegistry::getObject(), and setEntity().
Referenced by _initInputField().
| Helper::__reset | ( | ) |
Resets the vars used by Helper::clean() to null
private
Definition at line 717 of file helper.php.
Referenced by clean().
| Helper::__selectedArray | ( | $ | data, | |
| $ | key = 'id' | |||
| ) |
Transforms a recordset from a hasAndBelongsToMany association to a list of selected options for a multiple select element
| mixed | $data | |
| string | $key |
Definition at line 694 of file helper.php.
References $data.
Referenced by value().
| Helper::_initInputField | ( | $ | field, | |
| $ | options = array() | |||
| ) |
Sets the defaults for an input tag
| array | $options | |
| string | $key |
Reimplemented in FormHelper.
Definition at line 621 of file helper.php.
References __name(), addClass(), domId(), error(), setEntity(), tagIsInvalid(), and value().
| Helper::_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.
| 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. |
Definition at line 260 of file helper.php.
References $out, and __formatAttribute().
Referenced by FormHelper::create(), AjaxHelper::div(), FormHelper::file(), HtmlHelper::link(), HtmlHelper::meta(), FormHelper::radio(), and FormHelper::select().
| Helper::addClass | ( | $ | options = array(), |
|
| $ | class = null, |
|||
| $ | key = 'class' | |||
| ) |
Adds the given class to the element options
| array | $options | |
| string | $class | |
| string | $key |
Definition at line 642 of file helper.php.
Referenced by _initInputField(), and FormHelper::input().
| Helper::afterLayout | ( | ) |
After layout callback. Overridden in subclasses.
Definition at line 683 of file helper.php.
| Helper::afterRender | ( | ) |
After render callback. Overridden in subclasses.
Reimplemented in AjaxHelper, and JavascriptHelper.
Definition at line 671 of file helper.php.
| Helper::beforeLayout | ( | ) |
Before layout callback. Overridden in subclasses.
Definition at line 677 of file helper.php.
| Helper::beforeRender | ( | ) |
Before render callback. Overridden in subclasses.
Definition at line 665 of file helper.php.
| Helper::call__ | ( | $ | method, | |
| $ | params | |||
| ) |
| Helper::clean | ( | $ | output | ) |
Used to remove harmful tags from content
| mixed | $output |
Definition at line 214 of file helper.php.
| Helper::domId | ( | $ | options = null, |
|
| $ | id = 'id' | |||
| ) |
Generates a DOM ID for the selected element, if one is not set.
| mixed | $options | |
| string | $id |
Definition at line 483 of file helper.php.
References $id, camelize(), field(), ClassRegistry::getObject(), model(), modelID(), and setEntity().
Referenced by _initInputField(), FormHelper::input(), and FormHelper::label().
| Helper::field | ( | ) |
Gets the currently-used model field of the rendering context.
Definition at line 445 of file helper.php.
References ClassRegistry::getObject().
Referenced by domId(), FormHelper::error(), FormHelper::input(), FormHelper::radio(), setEntity(), tagIsInvalid(), and value().
| Helper::get__ | ( | $ | name | ) |
| Helper::loadConfig | ( | $ | name = 'tags' |
) |
Parses tag templates into $this->tags.
| $name | file name |
Definition at line 152 of file helper.php.
References $tags.
| Helper::model | ( | ) |
Gets the currently-used model of the rendering context.
Definition at line 423 of file helper.php.
References ClassRegistry::getObject().
Referenced by PaginatorHelper::__pagingLink(), domId(), AjaxHelper::form(), FormHelper::hidden(), FormHelper::input(), FormHelper::inputs(), PaginatorHelper::link(), setEntity(), PaginatorHelper::sort(), tagIsInvalid(), and value().
| Helper::modelID | ( | ) |
Gets the ID of the currently-used model of the rendering context.
Definition at line 436 of file helper.php.
References ClassRegistry::getObject().
Referenced by domId(), tagIsInvalid(), and value().
| Helper::output | ( | $ | str | ) |
Returns a string generated by a helper method
This method can be overridden in subclasses to do generalized output post-processing
| string | $str String to be output. |
Definition at line 658 of file helper.php.
Referenced by FormHelper::button(), HtmlHelper::charset(), FormHelper::checkbox(), XmlHelper::closeElem(), PaginatorHelper::counter(), FormHelper::create(), TimeHelper::dayAsSql(), TimeHelper::daysAsSql(), AjaxHelper::div(), AjaxHelper::divEnd(), HtmlHelper::docType(), XmlHelper::elem(), FormHelper::end(), FormHelper::file(), XmlHelper::header(), FormHelper::hidden(), FormHelper::label(), HtmlHelper::link(), HtmlHelper::meta(), TimeHelper::nice(), TimeHelper::niceShort(), PaginatorHelper::numbers(), FormHelper::password(), FormHelper::radio(), FormHelper::select(), FormHelper::submit(), FormHelper::text(), FormHelper::textarea(), TimeHelper::timeAgoInWords(), TimeHelper::toAtom(), TimeHelper::toQuarter(), TimeHelper::toRSS(), and TimeHelper::toUnix().
| Helper::set__ | ( | $ | name, | |
| $ | value | |||
| ) |
Definition at line 141 of file helper.php.
| Helper::setEntity | ( | $ | entity, | |
| $ | setScope = false | |||
| ) |
Sets this helper's model and field properties to the dot-separated value-pair in $entity.
| mixed | $entity A field name, like "ModelName.fieldName" or "ModelName.ID.fieldName" | |
| boolean | $setScope Sets the view scope to the model specified in $tagValue |
Definition at line 311 of file helper.php.
References field(), Set::filter(), ClassRegistry::getObject(), ClassRegistry::isKeySet(), and model().
Referenced by __name(), _initInputField(), FormHelper::create(), domId(), FormHelper::end(), FormHelper::error(), FormHelper::input(), FormHelper::isFieldError(), and value().
| Helper::tagIsInvalid | ( | $ | model = null, |
|
| $ | field = null, |
|||
| $ | modelID = null | |||
| ) |
Returns false if given FORM field has no errors. Otherwise it returns the constant set in the array Model->validationErrors.
| string | $model Model name as string | |
| string | $field Fieldname as string | |
| integer | $modelID Unique index identifying this record within the form |
Definition at line 457 of file helper.php.
References field(), ClassRegistry::getObject(), model(), and modelID().
Referenced by _initInputField(), FormHelper::error(), and FormHelper::isFieldError().
| Helper::url | ( | $ | url = null, |
|
| $ | full = 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.
| mixed | $url Cake-relative URL, like "/products/edit/92" or "/presidents/elect/4" or an array specifying any of the following: 'controller', 'action', and/or 'plugin', in addition to named arguments (keyed array elements), and standard URL arguments (indexed array elements) | |
| boolean | $full If true, the full base URL will be prepended to the result |
Definition at line 177 of file helper.php.
References $url, and Router::url().
Referenced by RssHelper::channel(), FormHelper::create(), AjaxHelper::editor(), AjaxHelper::form(), RssHelper::item(), HtmlHelper::link(), AjaxHelper::link(), HtmlHelper::meta(), AjaxHelper::remoteFunction(), and AjaxHelper::sortable().
| Helper::value | ( | $ | options = array(), |
|
| $ | field = null, |
|||
| $ | key = 'value' | |||
| ) |
Gets the data for the current tag
| array | $options | |
| string | $key |
Definition at line 552 of file helper.php.
References __selectedArray(), field(), ClassRegistry::getObject(), ClassRegistry::isKeySet(), model(), modelID(), and setEntity().
Referenced by AjaxHelper::_buildObserver(), _initInputField(), FormHelper::button(), FormHelper::checkbox(), FormHelper::create(), FormHelper::dateTime(), FormHelper::day(), AjaxHelper::editor(), XmlHelper::elem(), FormHelper::hidden(), FormHelper::hour(), FormHelper::meridian(), FormHelper::minute(), FormHelper::month(), FormHelper::radio(), FormHelper::secure(), FormHelper::select(), AjaxHelper::submit(), FormHelper::textarea(), and FormHelper::year().
| Helper::webroot | ( | $ | file | ) |
Checks if a file exists when theme is used, if no file is found default location is returned
| string | $file |
Definition at line 186 of file helper.php.
Referenced by CacheHelper::__writeFile(), JavascriptHelper::link(), and HtmlHelper::meta().
| Helper::$__cleaned = null |
Definition at line 134 of file helper.php.
| Helper::$__tainted = null |
Definition at line 127 of file helper.php.
| Helper::$action = null |
| Helper::$argSeparator = null |
Definition at line 106 of file helper.php.
| Helper::$base = null |
| Helper::$data = null |
Reimplemented in HtmlHelper, and RssHelper.
Definition at line 94 of file helper.php.
Referenced by __selectedArray(), AjaxHelper::afterRender(), FormHelper::create(), and XmlHelper::serialize().
| Helper::$helpers = null |
Reimplemented in AjaxHelper, FormHelper, PaginatorHelper, and RssHelper.
Definition at line 46 of file helper.php.
| Helper::$here = null |
| Helper::$namedArgs = null |
Definition at line 100 of file helper.php.
| Helper::$params = array() |
Reimplemented in HtmlHelper, and RssHelper.
Definition at line 76 of file helper.php.
Referenced by PaginatorHelper::__hasPage(), PaginatorHelper::current(), PaginatorHelper::first(), AjaxHelper::form(), PaginatorHelper::last(), PaginatorHelper::numbers(), PaginatorHelper::sortDir(), and PaginatorHelper::sortKey().
| Helper::$plugin = null |
Definition at line 88 of file helper.php.
| Helper::$tags = array() |
Reimplemented in HtmlHelper, and JavascriptHelper.
Definition at line 120 of file helper.php.
Referenced by loadConfig(), and TextHelper::truncate().
| Helper::$themeWeb = null |
Definition at line 64 of file helper.php.
| Helper::$validationErrors = null |
Definition at line 113 of file helper.php.
| Helper::$webroot = null |
Definition at line 58 of file helper.php.
1.4.7