AclForm
extends Form
in package
ACL Form class
Tags
Table of Contents
- $acl : Acl
- Acl object
- $aclStrict : bool
- Acl strict flag
- $attributes : array<string|int, mixed>
- Child element attributes
- $cData : bool
- Child element node value CDATA flag
- $childNodes : array<string|int, mixed>
- Object child nodes
- $childrenFirst : bool
- Flag to render children before node value or not
- $columns : array<string|int, mixed>
- Form columns
- $current : int
- Current field fieldset
- $fieldsets : array<string|int, mixed>
- Field fieldsets
- $indent : string
- Indentation for formatting purposes
- $nodeName : string
- Child element node name
- $nodeValue : string
- Child element node value
- $output : string
- Child output
- $parent : AbstractNode
- Parent node
- $permissions : array<string|int, mixed>
- Acl flag to manage how to display/manage fields
- $preserveWhiteSpace : bool
- Flag to preserve whitespace
- $roles : array<string|int, mixed>
- AclRole role objects
- __construct() : mixed
- Constructor
- __get() : mixed
- Get method to return the value of values[$name]
- __isset() : bool
- Return the isset value of values[$name]
- __set() : void
- Set method to set the property to the value of values[$name]
- __toString() : string
- Render Dom child object to string
- __unset() : void
- Unset values[$name]
- addChild() : mixed
- Add a child to the object
- addChildren() : mixed
- Add children to the object
- addColumn() : Form
- Method to add form column
- addField() : Form
- Method to add a form field
- addFieldFromConfig() : Form
- Method to add a form field from a config
- addFields() : Form
- Method to add form fields
- addFieldset() : Form
- Method to add fieldset
- addFieldsetsFromConfig() : Form
- Method to add form fieldsets from config
- addFieldsFromConfig() : Form
- Method to add form fields from config
- addNodeValue() : Child
- Add to the child node value
- addRole() : AclForm
- Add a AclRole object
- addRoles() : AclForm
- Add AclRole objects
- clearTokens() : Form
- Method to clear any security tokens
- count() : int
- Count of values
- create() : Child
- Static factory method to create a child object
- createFieldset() : Fieldset
- Method to create a new fieldset object
- createFromConfig() : Form
- Method to create form object and fields from config
- createFromFieldsetConfig() : Form
- Method to create form object and fields from config
- filter() : mixed
- Filter values with the filters in the form object
- filterValue() : mixed
- Filter value with the filters in the form object
- getAction() : string
- Method to get action
- getAllErrors() : array<string|int, mixed>
- Get all form element errors
- getAttribute() : string
- Get the attribute of the child object
- getAttributes() : array<string|int, mixed>
- Get the attributes of the child object
- getChild() : Child
- Get the child nodes of the object
- getChildNodes() : array<string|int, mixed>
- Get the child nodes of the object (alias)
- getChildren() : array<string|int, mixed>
- Get the child nodes of the object
- getColumn() : array<string|int, mixed>
- Method to get form column
- getCurrent() : int
- Method to get current fieldset index
- getErrors() : array<string|int, mixed>
- Get form element errors for a field.
- getField() : AbstractElement
- Method to get a field element object
- getFields() : array<string|int, mixed>
- Method to get field element objects
- getFieldset() : Fieldset
- Method to get current fieldset
- getFieldValue() : mixed
- Method to get a field element value
- getIndent() : string
- Return the indent
- getIterator() : ArrayIterator
- Method to iterate over the form elements
- getLegend() : string
- Method to get the legend of the current fieldset
- getMethod() : string
- Method to get method
- getNodeContent() : string
- Return the child node content, including tags, etc
- getNodeName() : string
- Return the child node name
- getNodeValue() : string
- Return the child node value
- getParent() : AbstractNode
- Return the parent node
- getPermissions() : array<string|int, mixed>
- Get field permissions
- getTextContent() : string
- Return the child node content, including tags, etc
- hasAttribute() : bool
- Determine if the child object has an attribute
- hasChildNodes() : bool
- Get whether or not the child object has children (alias)
- hasChildren() : bool
- Get whether or not the child object has children
- hasColumn() : bool
- Method to determine if form has a column
- hasField() : bool
- Has a field element object
- hasFields() : bool
- Has fields
- insertFieldAfter() : Form
- Method to insert a field after another one
- insertFieldBefore() : Form
- Method to insert a field before another one
- isAclStrict() : bool
- Is the Acl object set to strict evaluation
- isCData() : bool
- Determine if the child node value is CDATA
- isChildrenFirst() : bool
- Determine if child nodes render first, before the node value
- isValid() : bool
- Determine whether or not the form object is valid
- offsetExists() : bool
- ArrayAccess offsetExists
- offsetGet() : mixed
- ArrayAccess offsetGet
- offsetSet() : void
- ArrayAccess offsetSet
- offsetUnset() : void
- ArrayAccess offsetUnset
- parseFile() : Child
- Static method to parse an XML/HTML string from a file
- parseString() : Child|array<string|int, mixed>
- Static method to parse an XML/HTML string
- prepare() : Form
- Prepare form object for rendering
- prepareForView() : array<string|int, mixed>
- Prepare form object for rendering with a view
- preserveWhiteSpace() : Child
- Set whether to preserve whitespace
- removeAttribute() : Child
- Remove an attribute from the child element object
- removeChild() : void
- Remove all child nodes from the object
- removeChildren() : void
- Remove all child nodes from the object
- removeColumn() : Form
- Method to remove form column
- removeField() : Form
- Method to remove a form field
- removeFieldset() : Form
- Method to remove fieldset
- render() : mixed
- Render the form object
- reset() : Form
- Method to reset and clear any form field values
- setAcl() : AclForm
- Set the Acl object
- setAclStrict() : AclForm
- Set the Acl object as strict evaluation
- setAction() : Form
- Method to set action
- setAsCData() : Child
- Set the child node value as CDATA
- setAttribute() : Child
- Set an attribute for the child element object
- setAttributes() : Child
- Set an attribute or attributes for the child element object
- setChildrenFirst() : Child
- Set whether child nodes render first, before the node value
- setCurrent() : Form
- Method to get current fieldset index
- setFieldValue() : Form
- Method to set a field element value
- setFieldValues() : Form
- Method to set field element values
- setIndent() : mixed
- Set the indent
- setLegend() : Form
- Method to set the legend of the current fieldset
- setMethod() : Form
- Method to set method
- setNodeName() : Child
- Set the child node name
- setNodeValue() : Child
- Set the child node value
- setParent() : AbstractNode
- Set the parent node
- setPermissions() : AclForm
- Set the Acl field permissions
- setRole() : AclForm
- Set a AclRole object (alias method)
- toArray() : array<string|int, mixed>
- Get values
Properties
$acl
Acl object
protected
Acl
$acl
= null
$aclStrict
Acl strict flag
protected
bool
$aclStrict
= false
$attributes
Child element attributes
protected
array<string|int, mixed>
$attributes
= []
$cData
Child element node value CDATA flag
protected
bool
$cData
= false
$childNodes
Object child nodes
protected
array<string|int, mixed>
$childNodes
= []
$childrenFirst
Flag to render children before node value or not
protected
bool
$childrenFirst
= false
$columns
Form columns
protected
array<string|int, mixed>
$columns
= []
$current
Current field fieldset
protected
int
$current
= 0
$fieldsets
Field fieldsets
protected
array<string|int, mixed>
$fieldsets
= []
$indent
Indentation for formatting purposes
protected
string
$indent
= null
$nodeName
Child element node name
protected
string
$nodeName
= null
$nodeValue
Child element node value
protected
string
$nodeValue
= null
$output
Child output
protected
string
$output
= null
$parent
Parent node
protected
AbstractNode
$parent
= null
$permissions
Acl flag to manage how to display/manage fields
protected
array<string|int, mixed>
$permissions
= [
'display' => 'view',
// permission to display a field
'modify' => 'edit',
]
$preserveWhiteSpace
Flag to preserve whitespace
protected
bool
$preserveWhiteSpace
= true
$roles
AclRole role objects
protected
array<string|int, mixed>
$roles
= []
Methods
__construct()
Constructor
public
__construct(string $name[, string $value = null ][, array<string|int, mixed> $options = [] ]) : mixed
Instantiate the DOM element object
Parameters
- $name : string
- $value : string = null
- $options : array<string|int, mixed> = []
Return values
mixed —__get()
Get method to return the value of values[$name]
public
abstract __get(string $name) : mixed
Parameters
- $name : string
Return values
mixed —__isset()
Return the isset value of values[$name]
public
abstract __isset(string $name) : bool
Parameters
- $name : string
Return values
bool —__set()
Set method to set the property to the value of values[$name]
public
abstract __set(string $name, mixed $value) : void
Parameters
- $name : string
- $value : mixed
Return values
void —__toString()
Render Dom child object to string
public
__toString() : string
Return values
string —__unset()
Unset values[$name]
public
abstract __unset(string $name) : void
Parameters
- $name : string
Return values
void —addChild()
Add a child to the object
public
addChild(mixed $c) : mixed
Parameters
- $c : mixed
Tags
Return values
mixed —addChildren()
Add children to the object
public
addChildren( $children) : mixed
Parameters
Tags
Return values
mixed —addColumn()
Method to add form column
public
addColumn(mixed $fieldsets[, string $class = null ]) : Form
Parameters
- $fieldsets : mixed
- $class : string = null
Return values
Form —addField()
Method to add a form field
public
addField(AbstractElement $field) : Form
Parameters
- $field : AbstractElement
Return values
Form —addFieldFromConfig()
Method to add a form field from a config
public
addFieldFromConfig(string $name, array<string|int, mixed> $field) : Form
Parameters
- $name : string
- $field : array<string|int, mixed>
Return values
Form —addFields()
Method to add form fields
public
addFields(array<string|int, mixed> $fields) : Form
Parameters
- $fields : array<string|int, mixed>
Return values
Form —addFieldset()
Method to add fieldset
public
addFieldset(Fieldset $fieldset) : Form
Parameters
- $fieldset : Fieldset
Return values
Form —addFieldsetsFromConfig()
Method to add form fieldsets from config
public
addFieldsetsFromConfig(array<string|int, mixed>|FormConfig $fieldsets[, string $container = null ]) : Form
Parameters
- $fieldsets : array<string|int, mixed>|FormConfig
- $container : string = null
Return values
Form —addFieldsFromConfig()
Method to add form fields from config
public
addFieldsFromConfig(array<string|int, mixed>|FormConfig $config) : Form
Parameters
- $config : array<string|int, mixed>|FormConfig
Return values
Form —addNodeValue()
Add to the child node value
public
addNodeValue(string $value) : Child
Parameters
- $value : string
Return values
Child —addRole()
Add a AclRole object
public
addRole([AclRole $role = null ]) : AclForm
Parameters
- $role : AclRole = null
Return values
AclForm —addRoles()
Add AclRole objects
public
addRoles(array<string|int, mixed> $roles) : AclForm
Parameters
- $roles : array<string|int, mixed>
Return values
AclForm —clearTokens()
Method to clear any security tokens
public
clearTokens() : Form
Return values
Form —count()
Count of values
public
abstract count() : int
Return values
int —create()
Static factory method to create a child object
public
static create(string $name[, string $value = null ][, array<string|int, mixed> $options = [] ]) : Child
Parameters
- $name : string
- $value : string = null
- $options : array<string|int, mixed> = []
Return values
Child —createFieldset()
Method to create a new fieldset object
public
createFieldset([string $legend = null ][, string $container = null ]) : Fieldset
Parameters
- $legend : string = null
- $container : string = null
Return values
Fieldset —createFromConfig()
Method to create form object and fields from config
public
static createFromConfig(array<string|int, mixed>|FormConfig $config[, string $action = null ][, string $method = 'post' ]) : Form
Parameters
- $config : array<string|int, mixed>|FormConfig
- $action : string = null
- $method : string = 'post'
Return values
Form —createFromFieldsetConfig()
Method to create form object and fields from config
public
static createFromFieldsetConfig(array<string|int, mixed>|FormConfig $config[, string $container = null ][, string $action = null ][, string $method = 'post' ]) : Form
Parameters
- $config : array<string|int, mixed>|FormConfig
- $container : string = null
- $action : string = null
- $method : string = 'post'
Return values
Form —filter()
Filter values with the filters in the form object
public
filter([mixed $values = null ]) : mixed
Parameters
- $values : mixed = null
Return values
mixed —filterValue()
Filter value with the filters in the form object
public
filterValue(mixed $field) : mixed
Parameters
- $field : mixed
Return values
mixed —getAction()
Method to get action
public
getAction() : string
Return values
string —getAllErrors()
Get all form element errors
public
getAllErrors() : array<string|int, mixed>
Return values
array<string|int, mixed> —getAttribute()
Get the attribute of the child object
public
getAttribute(string $name) : string
Parameters
- $name : string
Return values
string —getAttributes()
Get the attributes of the child object
public
getAttributes() : array<string|int, mixed>
Return values
array<string|int, mixed> —getChild()
Get the child nodes of the object
public
getChild(int $i) : Child
Parameters
- $i : int
Return values
Child —getChildNodes()
Get the child nodes of the object (alias)
public
getChildNodes() : array<string|int, mixed>
Return values
array<string|int, mixed> —getChildren()
Get the child nodes of the object
public
getChildren() : array<string|int, mixed>
Return values
array<string|int, mixed> —getColumn()
Method to get form column
public
getColumn(string $class) : array<string|int, mixed>
Parameters
- $class : string
Return values
array<string|int, mixed> —getCurrent()
Method to get current fieldset index
public
getCurrent() : int
Return values
int —getErrors()
Get form element errors for a field.
public
getErrors(string $name) : array<string|int, mixed>
Parameters
- $name : string
Return values
array<string|int, mixed> —getField()
Method to get a field element object
public
getField(string $name) : AbstractElement
Parameters
- $name : string
Return values
AbstractElement —getFields()
Method to get field element objects
public
getFields() : array<string|int, mixed>
Return values
array<string|int, mixed> —getFieldset()
Method to get current fieldset
public
getFieldset() : Fieldset
Return values
Fieldset —getFieldValue()
Method to get a field element value
public
getFieldValue(string $name) : mixed
Parameters
- $name : string
Return values
mixed —getIndent()
Return the indent
public
getIndent() : string
Return values
string —getIterator()
Method to iterate over the form elements
public
getIterator() : ArrayIterator
Return values
ArrayIterator —getLegend()
Method to get the legend of the current fieldset
public
getLegend() : string
Return values
string —getMethod()
Method to get method
public
getMethod() : string
Return values
string —getNodeContent()
Return the child node content, including tags, etc
public
getNodeContent([bool $ignoreWhiteSpace = false ]) : string
Parameters
- $ignoreWhiteSpace : bool = false
Return values
string —getNodeName()
Return the child node name
public
getNodeName() : string
Return values
string —getNodeValue()
Return the child node value
public
getNodeValue() : string
Return values
string —getParent()
Return the parent node
public
getParent() : AbstractNode
Return values
AbstractNode —getPermissions()
Get field permissions
public
getPermissions() : array<string|int, mixed>
Return values
array<string|int, mixed> —getTextContent()
Return the child node content, including tags, etc
public
getTextContent([bool $ignoreWhiteSpace = false ]) : string
Parameters
- $ignoreWhiteSpace : bool = false
Return values
string —hasAttribute()
Determine if the child object has an attribute
public
hasAttribute(string $name) : bool
Parameters
- $name : string
Return values
bool —hasChildNodes()
Get whether or not the child object has children (alias)
public
hasChildNodes() : bool
Return values
bool —hasChildren()
Get whether or not the child object has children
public
hasChildren() : bool
Return values
bool —hasColumn()
Method to determine if form has a column
public
hasColumn(string $class) : bool
Parameters
- $class : string
Return values
bool —hasField()
Has a field element object
public
hasField(string $name) : bool
Parameters
- $name : string
Return values
bool —hasFields()
Has fields
public
hasFields() : bool
Return values
bool —insertFieldAfter()
Method to insert a field after another one
public
insertFieldAfter(string $name, AbstractElement $field) : Form
Parameters
- $name : string
- $field : AbstractElement
Return values
Form —insertFieldBefore()
Method to insert a field before another one
public
insertFieldBefore(string $name, AbstractElement $field) : Form
Parameters
- $name : string
- $field : AbstractElement
Return values
Form —isAclStrict()
Is the Acl object set to strict evaluation
public
isAclStrict() : bool
Return values
bool —isCData()
Determine if the child node value is CDATA
public
isCData() : bool
Return values
bool —isChildrenFirst()
Determine if child nodes render first, before the node value
public
isChildrenFirst() : bool
Return values
bool —isValid()
Determine whether or not the form object is valid
public
isValid() : bool
Return values
bool —offsetExists()
ArrayAccess offsetExists
public
offsetExists(mixed $offset) : bool
Parameters
- $offset : mixed
Return values
bool —offsetGet()
ArrayAccess offsetGet
public
offsetGet(mixed $offset) : mixed
Parameters
- $offset : mixed
Return values
mixed —offsetSet()
ArrayAccess offsetSet
public
offsetSet(mixed $offset, mixed $value) : void
Parameters
- $offset : mixed
- $value : mixed
Return values
void —offsetUnset()
ArrayAccess offsetUnset
public
offsetUnset(mixed $offset) : void
Parameters
- $offset : mixed
Return values
void —parseFile()
Static method to parse an XML/HTML string from a file
public
static parseFile(string $file) : Child
Parameters
- $file : string
Tags
Return values
Child —parseString()
Static method to parse an XML/HTML string
public
static parseString(string $string) : Child|array<string|int, mixed>
Parameters
- $string : string
Return values
Child|array<string|int, mixed> —prepare()
Prepare form object for rendering
public
prepare() : Form
Return values
Form —prepareForView()
Prepare form object for rendering with a view
public
prepareForView() : array<string|int, mixed>
Return values
array<string|int, mixed> —preserveWhiteSpace()
Set whether to preserve whitespace
public
preserveWhiteSpace([bool $preserve = true ]) : Child
Parameters
- $preserve : bool = true
Return values
Child —removeAttribute()
Remove an attribute from the child element object
public
removeAttribute(string $a) : Child
Parameters
- $a : string
Return values
Child —removeChild()
Remove all child nodes from the object
public
removeChild(int $i) : void
Parameters
- $i : int
Return values
void —removeChildren()
Remove all child nodes from the object
public
removeChildren() : void
Return values
void —removeColumn()
Method to remove form column
public
removeColumn(string $class) : Form
Parameters
- $class : string
Return values
Form —removeField()
Method to remove a form field
public
removeField(string $field) : Form
Parameters
- $field : string
Return values
Form —removeFieldset()
Method to remove fieldset
public
removeFieldset(int $i) : Form
Parameters
- $i : int
Return values
Form —render()
Render the form object
public
render(int $depth[, string $indent = null ][, bool $inner = false ]) : mixed
Parameters
- $depth : int
- $indent : string = null
- $inner : bool = false
Return values
mixed —reset()
Method to reset and clear any form field values
public
reset() : Form
Return values
Form —setAcl()
Set the Acl object
public
setAcl([Acl $acl = null ]) : AclForm
Parameters
- $acl : Acl = null
Return values
AclForm —setAclStrict()
Set the Acl object as strict evaluation
public
setAclStrict(bool $strict) : AclForm
Parameters
- $strict : bool
Return values
AclForm —setAction()
Method to set action
public
setAction(string $action) : Form
Parameters
- $action : string
Return values
Form —setAsCData()
Set the child node value as CDATA
public
setAsCData([bool $cData = true ]) : Child
Parameters
- $cData : bool = true
Return values
Child —setAttribute()
Set an attribute for the child element object
public
setAttribute(string $a, string $v) : Child
Parameters
- $a : string
- $v : string
Return values
Child —setAttributes()
Set an attribute or attributes for the child element object
public
setAttributes(array<string|int, mixed> $a) : Child
Parameters
- $a : array<string|int, mixed>
Return values
Child —setChildrenFirst()
Set whether child nodes render first, before the node value
public
setChildrenFirst([bool $first = true ]) : Child
Parameters
- $first : bool = true
Return values
Child —setCurrent()
Method to get current fieldset index
public
setCurrent(int $i) : Form
Parameters
- $i : int
Return values
Form —setFieldValue()
Method to set a field element value
public
setFieldValue(string $name, mixed $value) : Form
Parameters
- $name : string
- $value : mixed
Return values
Form —setFieldValues()
Method to set field element values
public
setFieldValues(array<string|int, mixed> $values) : Form
Parameters
- $values : array<string|int, mixed>
Return values
Form —setIndent()
Set the indent
public
setIndent(string $indent) : mixed
Parameters
- $indent : string
Return values
mixed —setLegend()
Method to set the legend of the current fieldset
public
setLegend(string $legend) : Form
Parameters
- $legend : string
Return values
Form —setMethod()
Method to set method
public
setMethod(string $method) : Form
Parameters
- $method : string
Return values
Form —setNodeName()
Set the child node name
public
setNodeName(string $name) : Child
Parameters
- $name : string
Return values
Child —setNodeValue()
Set the child node value
public
setNodeValue(string $value) : Child
Parameters
- $value : string
Return values
Child —setParent()
Set the parent node
public
setParent(AbstractNode $parent) : AbstractNode
Parameters
- $parent : AbstractNode
Return values
AbstractNode —setPermissions()
Set the Acl field permissions
public
setPermissions(string $displayPermission, string $modifyPermission) : AclForm
Parameters
- $displayPermission : string
- $modifyPermission : string
Return values
AclForm —setRole()
Set a AclRole object (alias method)
public
setRole([AclRole $role = null ]) : AclForm
Parameters
- $role : AclRole = null
Return values
AclForm —toArray()
Get values
public
abstract toArray() : array<string|int, mixed>