\Pop\FormAclForm

ACL Form class

Summary

Methods
Properties
Constants
__construct()
createFromConfig()
createFromFieldsetConfig()
createFieldset()
setAction()
setMethod()
getAction()
getMethod()
setAttribute()
setAttributes()
addFieldset()
removeFieldset()
getFieldset()
addColumn()
hasColumn()
getColumn()
removeColumn()
getCurrent()
setCurrent()
getLegend()
setLegend()
addField()
addFields()
addFieldFromConfig()
addFieldsFromConfig()
addFieldsetsFromConfig()
insertFieldBefore()
insertFieldAfter()
count()
toArray()
getField()
getFields()
hasField()
hasFields()
removeField()
getFieldValue()
setFieldValue()
setFieldValues()
filterValue()
filter()
isValid()
getErrors()
getAllErrors()
reset()
clearTokens()
prepare()
prepareForView()
render()
__toString()
__set()
__get()
__isset()
__unset()
getIterator()
offsetExists()
offsetGet()
offsetSet()
offsetUnset()
create()
parseString()
parseFile()
getNodeName()
getNodeValue()
getNodeContent()
getTextContent()
setNodeName()
setNodeValue()
addNodeValue()
setAsCData()
isCData()
hasAttribute()
getAttribute()
getAttributes()
removeAttribute()
isChildrenFirst()
setChildrenFirst()
preserveWhiteSpace()
getIndent()
setIndent()
getParent()
setParent()
addChild()
addChildren()
hasChildren()
hasChildNodes()
getChild()
getChildren()
getChildNodes()
removeChild()
removeChildren()
setAcl()
setRole()
addRole()
addRoles()
setAclStrict()
setPermissions()
isAclStrict()
getPermissions()
No public properties found
No constants found
No protected methods found
$fieldsets
$columns
$current
$nodeName
$nodeValue
$cData
$childrenFirst
$attributes
$preserveWhiteSpace
$childNodes
$indent
$output
$parent
$acl
$roles
$aclStrict
$permissions
N/A
No private methods found
No private properties found
N/A

Properties

$fieldsets

$fieldsets : array

Field fieldsets

Type

array

$columns

$columns : array

Form columns

Type

array

$current

$current : integer

Current field fieldset

Type

integer

$nodeName

$nodeName : string

Child element node name

Type

string

$nodeValue

$nodeValue : string

Child element node value

Type

string

$cData

$cData : boolean

Child element node value CDATA flag

Type

boolean

$childrenFirst

$childrenFirst : boolean

Flag to render children before node value or not

Type

boolean

$attributes

$attributes : array

Child element attributes

Type

array

$preserveWhiteSpace

$preserveWhiteSpace : boolean

Flag to preserve whitespace

Type

boolean

$childNodes

$childNodes : array

Object child nodes

Type

array

$indent

$indent : string

Indentation for formatting purposes

Type

string

$output

$output : string

Child output

Type

string

$roles

$roles : array

AclRole role objects

Type

array

$aclStrict

$aclStrict : boolean

Acl strict flag

Type

boolean

$permissions

$permissions : array

Acl flag to manage how to display/manage fields

Type

array

Methods

__construct()

__construct(string  $name, string  $value = null, array  $options = array()) 

Constructor

Instantiate the DOM element object

Parameters

string $name
string $value
array $options

createFromConfig()

createFromConfig(array|\Pop\Form\FormConfig  $config, string  $action = null, string  $method = 'post') : \Pop\Form\Form

Method to create form object and fields from config

Parameters

array|\Pop\Form\FormConfig $config
string $action
string $method

Returns

\Pop\Form\Form

createFromFieldsetConfig()

createFromFieldsetConfig(array|\Pop\Form\FormConfig  $config, string  $container = null, string  $action = null, string  $method = 'post') : \Pop\Form\Form

Method to create form object and fields from config

Parameters

array|\Pop\Form\FormConfig $config
string $container
string $action
string $method

Returns

\Pop\Form\Form

createFieldset()

createFieldset(string  $legend = null, string  $container = null) : \Pop\Form\Fieldset

Method to create a new fieldset object

Parameters

string $legend
string $container

Returns

\Pop\Form\Fieldset

setAction()

setAction(string  $action) : \Pop\Form\Form

Method to set action

Parameters

string $action

Returns

\Pop\Form\Form

setMethod()

setMethod(string  $method) : \Pop\Form\Form

Method to set method

Parameters

string $method

Returns

\Pop\Form\Form

getAction()

getAction() : string

Method to get action

Returns

string

getMethod()

getMethod() : string

Method to get method

Returns

string

setAttribute()

setAttribute(string  $a, string  $v) : \Pop\Dom\Child

Set an attribute for the child element object

Parameters

string $a
string $v

Returns

\Pop\Dom\Child

setAttributes()

setAttributes(array  $a) : \Pop\Dom\Child

Set an attribute or attributes for the child element object

Parameters

array $a

Returns

\Pop\Dom\Child

addFieldset()

addFieldset(\Pop\Form\Fieldset  $fieldset) : \Pop\Form\Form

Method to add fieldset

Parameters

\Pop\Form\Fieldset $fieldset

Returns

\Pop\Form\Form

removeFieldset()

removeFieldset(integer  $i) : \Pop\Form\Form

Method to remove fieldset

Parameters

integer $i

Returns

\Pop\Form\Form

getFieldset()

getFieldset() : \Pop\Form\Fieldset

Method to get current fieldset

Returns

\Pop\Form\Fieldset

addColumn()

addColumn(mixed  $fieldsets, string  $class = null) : \Pop\Form\Form

Method to add form column

Parameters

mixed $fieldsets
string $class

Returns

\Pop\Form\Form

hasColumn()

hasColumn(string  $class) : boolean

Method to determine if form has a column

Parameters

string $class

Returns

boolean

getColumn()

getColumn(string  $class) : array

Method to get form column

Parameters

string $class

Returns

array

removeColumn()

removeColumn(string  $class) : \Pop\Form\Form

Method to remove form column

Parameters

string $class

Returns

\Pop\Form\Form

getCurrent()

getCurrent() : integer

Method to get current fieldset index

Returns

integer

setCurrent()

setCurrent(integer  $i) : \Pop\Form\Form

Method to get current fieldset index

Parameters

integer $i

Returns

\Pop\Form\Form

getLegend()

getLegend() : string

Method to get the legend of the current fieldset

Returns

string

setLegend()

setLegend(string  $legend) : \Pop\Form\Form

Method to set the legend of the current fieldset

Parameters

string $legend

Returns

\Pop\Form\Form

addFields()

addFields(array  $fields) : \Pop\Form\Form

Method to add form fields

Parameters

array $fields

Returns

\Pop\Form\Form

addFieldFromConfig()

addFieldFromConfig(string  $name, array  $field) : \Pop\Form\Form

Method to add a form field from a config

Parameters

string $name
array $field

Returns

\Pop\Form\Form

addFieldsFromConfig()

addFieldsFromConfig(array|\Pop\Form\FormConfig  $config) : \Pop\Form\Form

Method to add form fields from config

Parameters

array|\Pop\Form\FormConfig $config

Returns

\Pop\Form\Form

addFieldsetsFromConfig()

addFieldsetsFromConfig(array|\Pop\Form\FormConfig  $fieldsets, string  $container = null) : \Pop\Form\Form

Method to add form fieldsets from config

Parameters

array|\Pop\Form\FormConfig $fieldsets
string $container

Returns

\Pop\Form\Form

insertFieldBefore()

insertFieldBefore(string  $name, \Pop\Form\Element\AbstractElement  $field) : \Pop\Form\Form

Method to insert a field before another one

Parameters

string $name
\Pop\Form\Element\AbstractElement $field

Returns

\Pop\Form\Form

insertFieldAfter()

insertFieldAfter(string  $name, \Pop\Form\Element\AbstractElement  $field) : \Pop\Form\Form

Method to insert a field after another one

Parameters

string $name
\Pop\Form\Element\AbstractElement $field

Returns

\Pop\Form\Form

count()

count() : integer

Count of values

Returns

integer

toArray()

toArray() : array

Get values

Returns

array

getField()

getField(string  $name) : \Pop\Form\Element\AbstractElement

Method to get a field element object

Parameters

string $name

Returns

\Pop\Form\Element\AbstractElement

getFields()

getFields() : array

Method to get field element objects

Returns

array

hasField()

hasField(string  $name) : boolean

Has a field element object

Parameters

string $name

Returns

boolean

hasFields()

hasFields() : boolean

Has fields

Returns

boolean

removeField()

removeField(string  $field) : \Pop\Form\Form

Method to remove a form field

Parameters

string $field

Returns

\Pop\Form\Form

getFieldValue()

getFieldValue(string  $name) : mixed

Method to get a field element value

Parameters

string $name

Returns

mixed

setFieldValue()

setFieldValue(string  $name, mixed  $value) : \Pop\Form\Form

Method to set a field element value

Parameters

string $name
mixed $value

Returns

\Pop\Form\Form

setFieldValues()

setFieldValues(array  $values) : \Pop\Form\Form

Method to set field element values

Parameters

array $values

Returns

\Pop\Form\Form

filterValue()

filterValue(mixed  $field) : mixed

Filter value with the filters in the form object

Parameters

mixed $field

Returns

mixed

filter()

filter(mixed  $values = null) : mixed

Filter values with the filters in the form object

Parameters

mixed $values

Returns

mixed

isValid()

isValid() : boolean

Determine whether or not the form object is valid

Returns

boolean

getErrors()

getErrors(string  $name) : array

Get form element errors for a field.

Parameters

string $name

Returns

array

getAllErrors()

getAllErrors() : array

Get all form element errors

Returns

array

reset()

reset() : \Pop\Form\Form

Method to reset and clear any form field values

Returns

\Pop\Form\Form

clearTokens()

clearTokens() : \Pop\Form\Form

Method to clear any security tokens

Returns

\Pop\Form\Form

prepare()

prepare() : \Pop\Form\Form

Prepare form object for rendering

Returns

\Pop\Form\Form

prepareForView()

prepareForView() : array

Prepare form object for rendering with a view

Returns

array

render()

render(integer  $depth, string  $indent = null, boolean  $inner = false) : mixed

Render the form object

Parameters

integer $depth
string $indent
boolean $inner

Returns

mixed

__toString()

__toString() : string

Render Dom child object to string

Returns

string

__set()

__set(string  $name, mixed  $value) : void

Set method to set the property to the value of values[$name]

Parameters

string $name
mixed $value

__get()

__get(string  $name) : mixed

Get method to return the value of values[$name]

Parameters

string $name

Returns

mixed

__isset()

__isset(string  $name) : boolean

Return the isset value of values[$name]

Parameters

string $name

Returns

boolean

__unset()

__unset(string  $name) : void

Unset values[$name]

Parameters

string $name

getIterator()

getIterator() : \ArrayIterator

Method to iterate over the form elements

Returns

\ArrayIterator

offsetExists()

offsetExists(mixed  $offset) : boolean

ArrayAccess offsetExists

Parameters

mixed $offset

Returns

boolean

offsetGet()

offsetGet(mixed  $offset) : mixed

ArrayAccess offsetGet

Parameters

mixed $offset

Returns

mixed

offsetSet()

offsetSet(mixed  $offset, mixed  $value) : void

ArrayAccess offsetSet

Parameters

mixed $offset
mixed $value

offsetUnset()

offsetUnset(mixed  $offset) : void

ArrayAccess offsetUnset

Parameters

mixed $offset

create()

create(string  $name, string  $value = null, array  $options = array()) : \Pop\Dom\Child

Static factory method to create a child object

Parameters

string $name
string $value
array $options

Returns

\Pop\Dom\Child

parseString()

parseString(string  $string) : \Pop\Dom\Child|array

Static method to parse an XML/HTML string

Parameters

string $string

Returns

\Pop\Dom\Child|array

parseFile()

parseFile(string  $file) : \Pop\Dom\Child

Static method to parse an XML/HTML string from a file

Parameters

string $file

Throws

\Pop\Dom\Exception

Returns

\Pop\Dom\Child

getNodeName()

getNodeName() : string

Return the child node name

Returns

string

getNodeValue()

getNodeValue() : string

Return the child node value

Returns

string

getNodeContent()

getNodeContent(boolean  $ignoreWhiteSpace = false) : string

Return the child node content, including tags, etc

Parameters

boolean $ignoreWhiteSpace

Returns

string

getTextContent()

getTextContent(boolean  $ignoreWhiteSpace = false) : string

Return the child node content, including tags, etc

Parameters

boolean $ignoreWhiteSpace

Returns

string

setNodeName()

setNodeName(string  $name) : \Pop\Dom\Child

Set the child node name

Parameters

string $name

Returns

\Pop\Dom\Child

setNodeValue()

setNodeValue(string  $value) : \Pop\Dom\Child

Set the child node value

Parameters

string $value

Returns

\Pop\Dom\Child

addNodeValue()

addNodeValue(string  $value) : \Pop\Dom\Child

Add to the child node value

Parameters

string $value

Returns

\Pop\Dom\Child

setAsCData()

setAsCData(boolean  $cData = true) : \Pop\Dom\Child

Set the child node value as CDATA

Parameters

boolean $cData

Returns

\Pop\Dom\Child

isCData()

isCData() : boolean

Determine if the child node value is CDATA

Returns

boolean

hasAttribute()

hasAttribute(string  $name) : boolean

Determine if the child object has an attribute

Parameters

string $name

Returns

boolean

getAttribute()

getAttribute(string  $name) : string

Get the attribute of the child object

Parameters

string $name

Returns

string

getAttributes()

getAttributes() : array

Get the attributes of the child object

Returns

array

removeAttribute()

removeAttribute(string  $a) : \Pop\Dom\Child

Remove an attribute from the child element object

Parameters

string $a

Returns

\Pop\Dom\Child

isChildrenFirst()

isChildrenFirst() : boolean

Determine if child nodes render first, before the node value

Returns

boolean

setChildrenFirst()

setChildrenFirst(boolean  $first = true) : \Pop\Dom\Child

Set whether child nodes render first, before the node value

Parameters

boolean $first

Returns

\Pop\Dom\Child

preserveWhiteSpace()

preserveWhiteSpace(boolean  $preserve = true) : \Pop\Dom\Child

Set whether to preserve whitespace

Parameters

boolean $preserve

Returns

\Pop\Dom\Child

getIndent()

getIndent() : string

Return the indent

Returns

string

setIndent()

setIndent(string  $indent) : mixed

Set the indent

Parameters

string $indent

Returns

mixed

addChild()

addChild(mixed  $c) : mixed

Add a child to the object

Parameters

mixed $c

Throws

\InvalidArgumentException

Returns

mixed

addChildren()

addChildren(  $children) : mixed

Add children to the object

Parameters

$children

Throws

\Pop\Dom\Exception

Returns

mixed

hasChildren()

hasChildren() : boolean

Get whether or not the child object has children

Returns

boolean

hasChildNodes()

hasChildNodes() : boolean

Get whether or not the child object has children (alias)

Returns

boolean

getChild()

getChild(integer  $i) : \Pop\Dom\Child

Get the child nodes of the object

Parameters

integer $i

Returns

\Pop\Dom\Child

getChildren()

getChildren() : array

Get the child nodes of the object

Returns

array

getChildNodes()

getChildNodes() : array

Get the child nodes of the object (alias)

Returns

array

removeChild()

removeChild(integer  $i) : void

Remove all child nodes from the object

Parameters

integer $i

removeChildren()

removeChildren() : void

Remove all child nodes from the object

setRole()

setRole(\Pop\Acl\AclRole  $role = null) : \Pop\Form\AclForm

Set a AclRole object (alias method)

Parameters

\Pop\Acl\AclRole $role

Returns

\Pop\Form\AclForm

addRoles()

addRoles(array  $roles) : \Pop\Form\AclForm

Add AclRole objects

Parameters

array $roles

Returns

\Pop\Form\AclForm

setAclStrict()

setAclStrict(boolean  $strict) : \Pop\Form\AclForm

Set the Acl object as strict evaluation

Parameters

boolean $strict

Returns

\Pop\Form\AclForm

setPermissions()

setPermissions(string  $displayPermission, string  $modifyPermission) : \Pop\Form\AclForm

Set the Acl field permissions

Parameters

string $displayPermission
string $modifyPermission

Returns

\Pop\Form\AclForm

isAclStrict()

isAclStrict() : boolean

Is the Acl object set to strict evaluation

Returns

boolean

getPermissions()

getPermissions() : array

Get field permissions

Returns

array