constructor __construct [line 154]
void __construct(
string
$type, string
$name, [
&$args = null], [
&$caller = null], array
$args, object
$caller)
|
|
Constructor
Tags:
Overridden in child classes as:
- Formagic_Item_PageSwitch::__construct()
- Formagic_Item_PageSwitch::__construct()
Parameters:
method addRule [line 358]
integer addRule(
mixed
$rule, [string
$errorMessage = null], [array
$args = null])
|
|
Adds rule object to Formagic item
Formagic items can have multiple rules, which are saved in FormagicItem::rules. First parameter $rule can either be a string or a FormagicRule object. String value is assumed to be the type of rule to be added.
This method throws an exception if no valid role object can be identified.
Tags:
Parameters:
method block [line 431]
method disable [line 461]
Sets disabled flag for item and thus removes it from form
Tags:
Overridden in child classes as:
- Formagic_Item_Container::disable()
- Disables container item and all its descendants and thus removes all involved items from form
method getCaller [line 255]
Returns parent Formagic object
Tags:
method getErrorMessage [line 421]
string getErrorMessage(
)
|
|
Returns item error message
Returns error message if item check failed or empty string if not
Tags:
method getHtml [line 305]
method getLabel [line 295]
method getValue [line 284]
method hasRule [line 380]
boolean hasRule(
string
$rule)
|
|
Tells if rule exists for this item
Tags:
Parameters:
method isDisabled [line 471]
Returns disabled status of item
Tags:
method isHidden [line 451]
Returns hidden status of item
Tags:
method setAttributes [line 320]
array setAttributes(
array
$attArray)
|
|
Sets additional attributes for this item
Mainly used for additional HTML attributes other than "name", "id" or "value", such as "style", "class", javascript-handlers etc. Attributes are added corresponding to key->value-pairs in $attArray.
Tags:
Parameters:
method setCaller [line 230]
boolean setCaller(
&$caller, object
$caller)
|
|
Can be called to set caller object if not passed to constructor
Tags:
Parameters:
method setHidden [line 441]
boolean setHidden(
$flag)
|
|
Sets hidden flag for item
Tags:
Overridden in child classes as:
- Formagic_Item_Container::setHidden()
- Sets hidden flag on container item and all its descendants
Parameters:
method validate [line 394]
Performs rule checks
Iterates through all defined rules of Formagic item. Returns true if all rules apply or violated Formagic_Rule object
Tags:
Overridden in child classes as:
- Formagic_Item_Container::validate()
- Validates containing items
method _execEvent [line 483]
boolean _execEvent(
string
$event)
|
|
Event dispatcher
Tags:
Parameters:
method _getAttributeStr [line 330]
string _getAttributeStr(
)
|
|
Returns attribute string for HTML tag
Tags:
method _handleArg [line 219]
method _onCreate [line 525]
method _onFetch [line 535]
method _onPostValidate [line 515]
method _onPreValidate [line 505]
boolean _onPreValidate(
)
|
|
Executed before item validation
Can be overwritten. Must return true if successful. If not, can either return false or throw exception
Tags:
Overridden in child classes as:
- Formagic_Item_PageController::_onPreValidate()
- Implementation of preValidate handler
method __toString [line 265]
Returns string representation of formItem object
Tags: