static object Created createElement(
string
$elm, [mixed
$arg1 = null], [
$arg2 = null], [
$arg3 = null], [
$arg4 = null], [
$arg5 = null], [
$arg6 = null]
)
|
|
Creates an element
Creates whichever argument is specified by the first argument. Valid strings are generally the same as the the element that you are trying to create. A '<select>' element is created with a 'select' string.
Parameters past the first will be passed to the constructor of the created object.
Parameters:
|
string |
$elm: |
Type of element to add. |
|
mixed |
$arg1: |
First argument for object constructor... |
|
|
$arg2: |
|
|
|
$arg3: |
|
|
|
$arg4: |
|
|
|
$arg5: |
|
|
|
$arg6: |
|
API Tags:
object Added addElement(
mixed
$elm, [
$arg1 = null], [
$arg2 = null], [
$arg3 = null], [
$arg4 = null], [
$arg5 = null], [
$arg6 = null]
)
|
|
Adds an element to this container
This function has behavior that changes depending on the first argument passed to it.
If the first argument is an element object, it is added to this container as a child.
If the first argument is a string, the arguments are first passed through createElement() and an element is created. That element is then added to this container as a child.
The element is then returned.
Parameters:
|
mixed |
$elm: |
Element or type of element to add |
|
|
$arg1: |
|
|
|
$arg2: |
|
|
|
$arg3: |
|
|
|
$arg4: |
|
|
|
$arg5: |
|
|
|
$arg6: |
|
API Tags:
void applyFilter(
string
$element, mixed
$filter
)
|
|
Apply a filter to the elements
This is the same as using SForm_Element::filter(), but the first argument is the child to apply this filter to.
The filter is not applied to child elements until this container is rendered or validated. If the child doesn't exist at that time, an exception is thrown.
If you wish to apply the filter to this container's value, see filter().
Parameters:
|
string |
$element: |
Element to apply the filter too |
|
mixed |
$filter: |
The filter callback |
API Tags:
Return number of children
Implemented as part of the Countable SPL interface
API Tags:
| Return: | How many children are there |
| Access: | public |
Implementation of:
- Countable::count
Return the current element
Implemented as part of the Iterator SPL interface
API Tags:
Implementation of:
- RecursiveIterator::current
void freeze(
[boolean
$bool = true]
)
|
|
Set the frozen status of this container and its children
Setting a container as frozen. Being frozen doesn't have an effect on containers. Frozen elements will prevent their values from being altered, though.
Parameters:
|
boolean |
$bool: |
Are we freezing this or thawing it? |
API Tags:
Redefinition of:
- SForm_Element::freeze()
- Set if this element is frozen
object The getChildren(
)
|
|
Return the current element
Implemented as part of the RecursiveIterator
SPL interface
API Tags:
| Return: | current child |
| Access: | public |
Implementation of:
- RecursiveIterator::getChildren
object Requested getElement(
string
$id
)
|
|
Returns an element using the Local ID
The Local ID is the ID that passed to an element's constructor. It is useful for reequesting a specific child of an element. For iterating through elements, see the Iterator interface. Specifically next().
Parameters:
|
string |
$id: |
Local ID to fetch |
API Tags:
| Return: | obect (or null) |
| Access: | public |
object Requested getGlobalElement(
string
$id
)
|
|
Returns an element using the Global ID
The Global ID is the ID used in the HTML document or by getElementById() in JavaScript.
Parameters:
|
string |
$id: |
Global ID to fetch |
API Tags:
| Return: | object (or null) |
| Access: | public |
Redefined in descendants as:
Does the current element have children?
Implemented as part of the RecursiveIterator
SPL interface
API Tags:
| Return: | Is the current element a container? |
| Access: | public |
Implementation of:
- RecursiveIterator::hasChildren
Return the key of the current element
Implemented as part of the Iterator SPL interface
API Tags:
| Return: | Returns the current Local ID |
| Access: | public |
Implementation of:
- RecursiveIterator::key
Add any requested filters and rules, then lock this container
We override the parent in order to add filters and rules.
API Tags:
Redefinition of:
- SForm_Element::lock()
- Locks & adds any last minute stuff
Advance pointer and return the new current
Implemented as part of the Iterator SPL interface
API Tags:
| Return: | current object |
| Access: | public |
Implementation of:
- RecursiveIterator::next
object The removeElement(
string
$id
)
|
|
Removes an element from this group
Parameters:
|
string |
$id: |
The id of the object to remove |
API Tags:
| Return: | removed object |
| Access: | public |
Render this container and all elements in it
Parameters:
|
object The |
$rend: |
renderer to use |
API Tags:
Redefinition of:
- SForm_Element::render()
- Append this leaf element to the render queue
Redefined in descendants as:
Move the current element to the first one
Implemented as part of the Iterator SPL interface
API Tags:
Implementation of:
- RecursiveIterator::rewind
Create a HTML representation of this container
Constructs the HTML tag that opens this container. Normally this is either a <form> tag or a <fieldset> tag. The 'id' attribute is automatically filled with this container's Global ID. Other attributes may be added via setAttribute().
API Tags:
Redefinition of:
- SForm_Element::toHtml()
- Create a HTML representation of this element
Redefined in descendants as:
Is the current ponter valid?
Implemented as part of the Iterator SPL interface
API Tags:
| Return: | True if the current pointer is valid |
| Access: | public |
Implementation of:
- RecursiveIterator::valid
Is this valid?
Validates this container and all of its children. Keep in mind that no rules can be added after an element is validated because that would invalidate the validation. If there was no request submitted, it is assumed that validation is not passed.
Rules can be added via addRule().
API Tags:
Redefinition of:
- SForm_Element::validate()
- Is this a valid element?
Redefined in descendants as: