Class drop
This class is responsible for offering various interfaces for drawing
dropdown 'select' HTML elements.
Namespace: ski
Located at packages/ski.web/controls/ski.control.drop.php
Methods summary
public
|
#
__construct( array $key_value_pairs, array $attrs = null )
Prepares a new dropdown for later display..
Prepares a new dropdown for later display..
Parameters
- $key_value_pairs
array $key_value_pairs Associative array - the key is the display and the value is
the, well, value; looks something like this: array ( 'display1' => 'value1',
'display2' => 'value2' )
- $attrs
array $attrs Associative array - the key is the attribute name and the value is the
value of that attribute; for example: array ( 'class' => 'my-special-class',
'name' => 'my-element-name' )
|
public
|
#
display( array $attr_overrides = null, mixed $selected = null, boolean $echo = true )
Displays this dropdown..
Parameters
- $attr_overrides
array $attr_overrides Associative array - the key is the attribute name and the value
is the value of that attribute; note that the keys in this array will overwrite
the keys in the array that was setup at construction..
- $selected
mixed $selected Optional value to indicate which item is selected
- $echo
boolean $echo Set to 'true' to echo the markup or 'false' to only return it
|
Magic methods summary