__construct (Constructor) [line 56]
void __construct(
object
$form, [string
$label = ''], [array
$size = null], [object
$style = null], [object
$renderer = null])
|
|
Constructor.
Parameters:
addElement [line 310]
boolean addElement(
object
$element)
|
|
Adds an element to the group.
Parameters:
clearValue [line 423]
Clears the current values of the group elements.
This method should clear the current value of each element in the group. If not all values can be cleared, this method should return false. To clear the elements' values, clearValue() should be called on each element.
elementExists [line 298]
boolean elementExists(
string
$name)
|
|
Returns whether or not an element with the given name exists in the group.
Parameters:
freeze [line 449]
Freezes the elements in the group so that its value may not be changed.
This method should call freeze() on every member of the group.
To make life easier down the road this method should also call set_data('frozen', true);
getAllElements [line 285]
Returns an array containing all elements in the group.
The array should be of the form: array(<name> => <element>)
getElement [line 267]
object The getElement(
string
$name)
|
|
Returns an element from a group.
This method should return the element with the given name. If there is no element with the given name, this method should return false.
Parameters:
getLabel [line 517]
Returns the label that identifies the group.
This group does not return an identifying label even if one is set. This is because the label is automatically added as part of the frame. If you want to get the label that is part of the frame use GtkFrame::get_label.
getName [line 128]
Returns the element's name.
This method exists to maintain consistency in the interface. It should simply call get_name which is a GtkWidget method and should be available to all elements.
getType [line 97]
Returns the element type.
This method must return a string identifying the element type, such as text, password, submit, etc.
getValue [line 401]
Returns an array of the group elements' values.
This method should return an array of the form: array(<name> => <value>) The name and value should be obtained by calling getName() and getValue() respectively for each member of the group.
isFrozen [line 490]
Returns whether or not the group is currently frozen.
This method should just return the value from get_data('frozen')
removeElement [line 343]
void removeElement(
object
$element)
|
|
Removes an element from the group.
This method should fail gracefully (no errors or notices) if the element is not part of the group.
Parameters:
render [line 214]
Renders the contents of the frame.
Passes the elements, required note and required symbol to the renderer and then calls renderer().
Pulling elements out of a renderer is a pain in the ass. Trying to find the correct widget (or parent widget) can be nearly impossible. Therefore, even if you remove a widget from the form, it will still appear if the widget was removed after the form was rendered.
setDefaultRenderer [line 187]
void setDefaultRenderer(
)
|
|
Creates a default renderer and sets it as the current renderer.
An exception may be thrown by setRenderer. It will pass through to the calling function.
setLabel [line 502]
void setLabel(
string
$label)
|
|
Sets the label that identifies the group.
Parameters:
setName [line 113]
void setName(
string
$name)
|
|
Sets the element name.
This method exists to maintain consistency in the interface. It should simply call set_name which is a GtkWidget method and should be avialable to all elements.
Parameters:
setRenderer [line 156]
void setRenderer(
object
$renderer)
|
|
Sets a renderer object.
Renderers must implement Structures_Form_RendererInterface. This helps to ensure consistency among the API and avoid any fatal errors. A renderer is used to position and display the form elements within a container widget.
Unlike rules and elements, renderers are created on their own (not through a form method). This is because they do not need to know thing about the form at construction time and the form does not need to know anything about the renderer until the form is to be displayed.
A form may only have one renderer at a time. Setting a second renderer will overwrite the first. If no renderer is set, the default renderer will be used.
Parameters:
setValue [line 371]
boolean setValue(
array
$values)
|
|
Sets the values of the group elements.
This method should set the value of each element in the group. This should be done by calling the element's setValue() method.
Parameters:
unfreeze [line 471]
Unfreezes the element so that its value may not be changed.
This method should call unfreeze() on every member of the group.
To make life easier down the road this method should also call set_data('frozen', false);