AppHelper Class Info:

Class Declaration:
class AppHelper extends Helper
File name:
cake/console/libs/templates/skel/app_helper.php
Summary:
This is a placeholder class. Create the same file in app/app_helper.php Add your application-wide methods in the class below, your helpers will inherit them.
Class Inheritance

Helper Overloadable Object

package
cake
subpackage
cake.cake

Properties:

Show/Hide parent properties
public action Current action.
public argSeparator URL argument separator character
public base Base URL
public data POST data for models
public helpers List of helpers used by this helper
public here URL to current action.
protected _log Log object
public namedArgs List of named arguments
public params Parameter array.
public plugin Plugin path
public tags Holds tag templates.
public themeWeb Theme name
public validationErrors Contains model validation errors of form post-backs
public webroot Webroot path

addClass

top
Adds the given class to the element options
Parameters:
$options array optional array ( )
$class string optional NULL
$key string optional 'class'
Method defined in class:
Helper
Method defined in file:
cake/libs/view/helper.php on line 642
return
array

afterLayout

top
After layout callback. Overridden in subclasses.
Method defined in class:
Helper
Method defined in file:
cake/libs/view/helper.php on line 683

afterRender

top
After render callback. Overridden in subclasses.
Method defined in class:
Helper
Method defined in file:
cake/libs/view/helper.php on line 671

beforeLayout

top
Before layout callback. Overridden in subclasses.
Method defined in class:
Helper
Method defined in file:
cake/libs/view/helper.php on line 677

beforeRender

top
Before render callback. Overridden in subclasses.
Method defined in class:
Helper
Method defined in file:
cake/libs/view/helper.php on line 665

cakeError

top
Used to report user friendly errors. If there is a file app/error.php or app/app_error.php this file will be loaded error.php is the AppError class it should extend ErrorHandler class.
Parameters:
$method string Method to be called in the error class (AppError or ErrorHandler classes) required (no default)
$messages array Message that is to be displayed by the error class optional array ( )
Method defined in class:
Object
Method defined in file:
cake/libs/object.php on line 189
return
error message
access
public

call__

top
Parameters:
$method required (no default)
$params required (no default)
Method defined in class:
Helper
Method defined in file:
cake/libs/view/helper.php on line 142

clean

top
Used to remove harmful tags from content
Parameters:
$output mixed required (no default)
Method defined in class:
Helper
Method defined in file:
cake/libs/view/helper.php on line 214
return
cleaned content for output
access
public

__construct

top
Class constructor, overridden in descendant classes.
Method defined in class:
Object
Method defined in file:
cake/libs/object.php on line 63

dispatchMethod

top
Calls a method on this object with the given parameters. Provides an OO wrapper for call_user_func_array, and improves performance by using straight method calls in most cases.
Parameters:
$method string Name of the method to call required (no default)
$params array Parameter list to use when calling $method optional array ( )
Method defined in class:
Object
Method defined in file:
cake/libs/object.php on line 113
return
mixed Returns the result of the method call
access
public

domId

top
Generates a DOM ID for the selected element, if one is not set.
Parameters:
$options mixed optional NULL
$id string optional 'id'
Method defined in class:
Helper
Method defined in file:
cake/libs/view/helper.php on line 483
return
mixed

field

top
Gets the currently-used model field of the rendering context.
Method defined in class:
Helper
Method defined in file:
cake/libs/view/helper.php on line 445
return
string

get__

top
Default overload methods
Parameters:
$name required (no default)
Method defined in class:
Helper
Method defined in file:
cake/libs/view/helper.php on line 140
access
protected

_initInputField

top
Sets the defaults for an input tag
Parameters:
$field required (no default)
$options array optional array ( )
Method defined in class:
Helper
Method defined in file:
cake/libs/view/helper.php on line 621
return
array
access
protected

loadConfig

top
Parses tag templates into $this->tags.
Parameters:
$name optional 'tags'
Method defined in class:
Helper
Method defined in file:
cake/libs/view/helper.php on line 152
return
array merged tags from config/$name.php

log

top
API for logging events.
Parameters:
$msg string Log message required (no default)
$type integer Error type constant. Defined in app/config/core.php. optional 2
Method defined in class:
Object
Method defined in file:
cake/libs/object.php on line 150
return
boolean Success of log write
access
public

model

top
Gets the currently-used model of the rendering context.
Method defined in class:
Helper
Method defined in file:
cake/libs/view/helper.php on line 423
return
string

modelID

top
Gets the ID of the currently-used model of the rendering context.
Method defined in class:
Helper
Method defined in file:
cake/libs/view/helper.php on line 436
return
mixed

__name

top
Gets the input field name for the current tag
Parameters:
$options array optional array ( )
$field optional NULL
$key string optional 'name'
Method defined in class:
Helper
Method defined in file:
cake/libs/view/helper.php on line 510
return
array

Object

top
A hack to support __construct() on PHP 4 Hint: descendant classes have no PHP4 class_name() constructors, so this constructor gets called first and calls the top-layer __construct() which (if present) should call parent::__construct()
Method defined in class:
Object
Method defined in file:
cake/libs/object.php on line 53
return
Object

output

top
Returns a string generated by a helper method This method can be overridden in subclasses to do generalized output post-processing
Parameters:
$str string String to be output. required (no default)
Method defined in class:
Helper
Method defined in file:
cake/libs/view/helper.php on line 658
return
string

overload

top
Overload implementation. No need for implementation in PHP5.
Method defined in class:
Overloadable
Method defined in file:
cake/libs/overloadable_php5.php on line 39
access
public

_parseAttributes

top
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:
$options array Array of options. required (no default)
$exclude array Array of options to be excluded. optional NULL
$insertBefore string String to be inserted before options. optional ' '
$insertAfter string String to be inserted ater options. optional NULL
Method defined in class:
Helper
Method defined in file:
cake/libs/view/helper.php on line 260
return
string

_persist

top
Checks for a persistent class file, if found file is opened and true returned If file is not found a file is created and false returned If used in other locations of the model you should choose a unique name for the persistent file There are many uses for this method, see manual for examples
Parameters:
$name string name of the class to persist required (no default)
$return required (no default)
$object string the object to persist required (no default)
$type optional NULL
Method defined in class:
Object
Method defined in file:
cake/libs/object.php on line 219
return
boolean Success
access
protected
todo
add examples to manual

requestAction

top
Calls a controller's method from any location.
Parameters:
$url mixed String or array-based url. required (no default)
$extra array if array includes the key "return" it sets the AutoRender to true. optional array ( )
Method defined in class:
Object
Method defined in file:
cake/libs/object.php on line 86
return
mixed Boolean true or false on success/failure, or contents of rendered action if 'return' is set in $extra.
access
public

_savePersistent

top
You should choose a unique name for the persistent file There are many uses for this method, see manual for examples
Parameters:
$name string name used for object to cache required (no default)
$object object the object to persist required (no default)
Method defined in class:
Object
Method defined in file:
cake/libs/object.php on line 247
return
boolean true on save, throws error if file can not be created
access
protected

set__

top
Parameters:
$name required (no default)
$value required (no default)
Method defined in class:
Helper
Method defined in file:
cake/libs/view/helper.php on line 141

_set

top
Allows setting of multiple properties of the object in a single line of code.
Parameters:
$properties array An associative array containing properties and corresponding values. optional array ( )
Method defined in class:
Object
Method defined in file:
cake/libs/object.php on line 169
return
void
access
protected

setEntity

top
Sets this helper's model and field properties to the dot-separated value-pair in $entity.
Parameters:
$entity mixed A field name, like "ModelName.fieldName" or "ModelName.ID.fieldName" required (no default)
$setScope boolean Sets the view scope to the model specified in $tagValue optional false
Method defined in class:
Helper
Method defined in file:
cake/libs/view/helper.php on line 311
return
void

_stop

top
Stop execution of the current script
Parameters:
$status optional 0
Method defined in class:
Object
Method defined in file:
cake/libs/object.php on line 139
return
void
access
public

tagIsInvalid

top
Returns false if given FORM field has no errors. Otherwise it returns the constant set in the array Model->validationErrors.
Parameters:
$model string Model name as string optional NULL
$field string Fieldname as string optional NULL
$modelID integer Unique index identifying this record within the form optional NULL
Method defined in class:
Helper
Method defined in file:
cake/libs/view/helper.php on line 457
return
boolean True on errors.

toString

top
Object-to-string conversion. Each class can override this method as necessary.
Method defined in class:
Object
Method defined in file:
cake/libs/object.php on line 73
return
string The name of this class
access
public

url

top
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:
$url mixed 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) optional NULL
$full boolean If true, the full base URL will be prepended to the result optional false
Method defined in class:
Helper
Method defined in file:
cake/libs/view/helper.php on line 177
return
string Full translated URL with base path.

value

top
Gets the data for the current tag
Parameters:
$options array optional array ( )
$field optional NULL
$key string optional 'value'
Method defined in class:
Helper
Method defined in file:
cake/libs/view/helper.php on line 552
return
array
access
public

webroot

top
Checks if a file exists when theme is used, if no file is found default location is returned
Parameters:
$file string required (no default)
Method defined in class:
Helper
Method defined in file:
cake/libs/view/helper.php on line 186
return
string $webPath web path to file.