SwatUIParent
public interface SwatUIParent
| Method Summary | |
|---|---|
| void | addChild(SwatObject child) Adds a child object to this parent object. |
| array | Gets descendant states. |
| array | getDescendants(string class_name) Gets descendant UI-objects. |
| SwatUIObject | getFirstDescendant(string class_name) Gets the first descendant UI-object of a specific class. |
| void | setDescendantStates(array states) Sets descendant states. |
public void addChild(SwatObject child)
Adds a child object to this parent object
This method is used by SwatUI when building a widget tree and
does not need to be called elsewhere. To add a field to a field view,
use SwatFieldView::appendField().
child - the child object to add to this parent object.public array getDescendantStates()
Gets descendant states
Retrieves an array of states of all stateful UI-objects in the widget subtree below this UI-object.
public array getDescendants(string class_name)
Gets descendant UI-objects
Retrieves an ordered array of all UI-objects in the widget subtree below this object. Widgets are ordered in the array as they are found in a breadth-first traversal of the subtree.
class_name - optional class name. If set, only UI-objects that are instances of $class_name are returned.public SwatUIObject getFirstDescendant(string class_name)
Gets the first descendant UI-object of a specific class
Retrieves the first descendant UI-object in the subtree that is a descendant of the specified class name. This uses a depth-first traversal to search the tree.
class_name - class name to look for.public void setDescendantStates(array states)
Sets descendant states
Sets states on all stateful UI-objects in the widget subtree below this UI-object.
states - an array of UI-object states with UI-object identifiers as array keys.
Interface for widgets that are parents for other widgets.