\pm_Form_SubForm

Sub Form

Summary

Methods
Properties
Constants
__construct()
init()
process()
isValid()
getValue()
getValues()
addElement()
getElement()
lmsg()
addSubForm()
getSubForm()
getSubForms()
setLegend()
getLegend()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A

Methods

__construct()

__construct(mixed|array  $options = array()) 

Create a new form

Parameters

mixed|array $options

basic Zend_Form options

init()

init() 

Initialize form

process()

process() 

Process form after submit

isValid()

isValid(array  $data) : boolean

Validate form

Parameters

array $data

Returns

boolean

getValue()

getValue(string  $name) : mixed

Retrieve value for single element

Parameters

string $name

Returns

mixed

getValues()

getValues(boolean  $suppressArrayNotation = false) : array

Retrieve all form element values

Parameters

boolean $suppressArrayNotation

Returns

array

addElement()

addElement(string|\Zend_Form_Element  $element, string  $name = null, array|\Zend_Config  $options = null) : \Zend_Form

Add a new element

Basic elements are:

  • Text
  • Password
  • Textarea
  • SimpleText
  • Select
  • Radio
  • Checkbox
  • Hidden

More classes see in CommonPanel\Form\Element and Zend\Form\Element

Parameters

string|\Zend_Form_Element $element
string $name
array|\Zend_Config $options

Returns

\Zend_Form

getElement()

getElement(string  $name) : null|\Zend_Form_Element

Retrieve a single element

Parameters

string $name

Returns

null|\Zend_Form_Element

lmsg()

lmsg(string  $key, array  $params = array()) : string

Translate message by key according to current locale

Parameters

string $key
array $params

Returns

string

addSubForm()

addSubForm(\Zend_Form  $form, string  $name, null  $order = null) : \Zend_Form

Add a sub form

Parameters

\Zend_Form $form
string $name
null $order

Returns

\Zend_Form

getSubForm()

getSubForm(string  $name) : null|\Zend_Form

Retrieve a single sub form

Parameters

string $name

Returns

null|\Zend_Form

getSubForms()

getSubForms() : array<mixed,\Zend_Form>

Retrieve all sub forms

Returns

array<mixed,\Zend_Form>

setLegend()

setLegend(string  $value) : \Zend_Form

Set form legend

Parameters

string $value

Returns

\Zend_Form

getLegend()

getLegend() : string

Retrieve form legend

Returns

string