Zikula: A Flexible Open Source Content Management System
home | forum | international support | contact us

Docs For Class FormUtil

Class: FormUtil

Source Location: /pnobjlib/FormUtil.class.php

Class Overview


FormUtil

Methods


Inherited Variables

Inherited Methods


Class Details

[line 20] FormUtil



[ Top ]

Class Methods


method cleanArray [line 124]

The cleanArray( array &$array)

Clean an array acquired from input. This method is safe to use for recursive arrays and cleans the array in place as well as returning it.



Tags:

return:  the altered/cleaned data array.


Parameters:

array   &$array   The array to clean up

[ Top ]

method cleanValue [line 156]

A cleanValue( value &$value)

Clean an individual data element in place; cleans the array in place as well as returning it.



Tags:

return:  reference to the original (altered/cleaned) data array


Parameters:

value   &$value   The value to clean

[ Top ]

method clearValidationErrors [line 243]

nothing clearValidationErrors( [objectType $objectType = null])

Clear the validation error array





Parameters:

objectType   $objectType   The (string) object type

[ Top ]

method clearValidationFailedObjects [line 264]

nothing clearValidationFailedObjects( [objectType $objectType = null])

Clear the objects which failed validation





Parameters:

objectType   $objectType   The (string) object type

[ Top ]

method getFailedValidationObjects [line 302]

The getFailedValidationObjects( [ $objectType = null])

Return the objects which failed validation



Tags:

return:  validation error array or null


Parameters:

   $objectType  

[ Top ]

method getFieldMarker [line 396]

The getFieldMarker( objectType $objectType, validationInfo $validationInfo, field $field)

Get the appropriate field marker



Tags:

return:  a marker string or an 'nbsp';


Parameters:

objectType   $objectType   The (string) object type
validationInfo   $validationInfo   The plain (non-structured) validation array
field   $field   The fieldname

[ Top ]

method getPassedValue [line 35]

The getPassedValue( key $key, [default $default = null], [source $source = null])

Return the requested key from input in a safe way. This function is safe to use for recursive arrays and either returns a non-empty string or the (optional) default.

This method is based on pnVarCleanFromInput but array-safe.




Tags:

return:  requested input key or the specified default


Parameters:

key   $key   The field to return
default   $default   The value to return if the requested field is not found (optional) (default=false)
source   $source   The sourc field to get a parameter from

[ Top ]

method getRequiredFieldMarker [line 226]

The getRequiredFieldMarker( validationInfo $validationInfo, field $field)

Get the required field marker (or nothing) for the specified field



Tags:

return:  required field marker or an empty string


Parameters:

validationInfo   $validationInfo   The plain (non-structured) validation array
field   $field   The fieldname

[ Top ]

method getValidationError [line 371]

The getValidationError( objectType $objectType, field $field)

Get the validation error for the specified field



Tags:

return:  validation error or an empty string


Parameters:

objectType   $objectType   The (string) object type
field   $field   The fieldname to get the error for

[ Top ]

method getValidationErrors [line 283]

The getValidationErrors( )

Get the validation errors



Tags:

return:  validation error array or null


[ Top ]

method getValidationFieldMarker [line 353]

The getValidationFieldMarker( objectType $objectType, field $field)

Get the required field marker (or nothing) for the specified field



Tags:

return:  validation error marker or an empty string


Parameters:

objectType   $objectType   The (string) object type
field   $field   The fieldname

[ Top ]

method hasValidationErrors [line 330]

A hasValidationErrors( objectType $objectType, [field $field = null])

Return a boolean indicating whether or not the specified field failed validation



Tags:

return:  boolean indicating whether or not the specified field failed validation


Parameters:

objectType   $objectType   The (string) object type
field   $field   The fieldname (optional) (default=null)

[ Top ]

method isRequiredField [line 198]

A isRequiredField( validationInfo $validationInfo, field $field)

Return a boolean indicating whether the specified field is required



Tags:

return:  boolean indicating whether or not the specified field is required


Parameters:

validationInfo   $validationInfo   The plain (non-structured) validation array
field   $field   The fieldname

[ Top ]

method newPNForm [line 415]

The newPNForm( $name)

Return a newly created pnFormRender instance with the given name



Tags:

return:  newly created pnFormRender instance.


Parameters:

   $name  

[ Top ]

Packages:

Files:

Classes: