|
Andrew's Web Libraries (AWL) 0.64
|
Public Member Functions | |
| __construct ( $field, $sql="", $lookup_sql="") | |
| Set ($value) | |
| SetSql ( $sql) | |
| SetLookup ( $lookup_sql) | |
| SetOptionList ( $options, $current=null, $parameters=null) | |
| GetTarget () | |
| AddAttribute ( $k, $v) | |
| RenderLabel ( $wrapme) | |
| RenderAttributes () | |
Public Attributes | |
| $Field | |
| $Sql | |
| $Value | |
| $Attributes | |
| $LookupSql | |
| $OptionList | |
Definition at line 19 of file classEditor.php.
| EditorField::__construct | ( | $field, | |
| $sql = "", | |||
| $lookup_sql = "" ) |
Creates an EditorField for use in the Editor, possibly initialising the SQL for calculating it's value, and lookup_sql for use in drop-down lists.
| unknown | $field | |
| string | $sql | |
| string | $lookup_sql |
Definition at line 36 of file classEditor.php.
| EditorField::AddAttribute | ( | $k, | |
| $v ) |
Add some kind of attribute to this field, such as a 'class' => 'fancyinputthingy'
| string | $k | The attribute name |
| string | $v | The attribute value |
Definition at line 116 of file classEditor.php.
| EditorField::GetTarget | ( | ) |
Definition at line 105 of file classEditor.php.
| EditorField::RenderAttributes | ( | ) |
Render the array of attributes for inclusion in the input tag.
Definition at line 140 of file classEditor.php.
| EditorField::RenderLabel | ( | $wrapme | ) |
Render a LABEL around something. In particular it is useful to render a label around checkbox fields to include their labels and make them clickable.
The label value itself must be in the '_label' attribute, and the field must also have an 'id' attribute.
| string | $wrapme | The rendered field to be wrapped |
Definition at line 128 of file classEditor.php.
| EditorField::Set | ( | $value | ) |
Definition at line 44 of file classEditor.php.
| EditorField::SetLookup | ( | $lookup_sql | ) |
Set the lookup SQL to use to populate a SELECT for this field.
| string | $lookup_sql |
Definition at line 60 of file classEditor.php.
| EditorField::SetOptionList | ( | $options, | |
| $current = null, | |||
| $parameters = null ) |
Set the SELECT values explicitly, if they are not available in SQL.
For example:
SetOptionList(array('M' => 'Male', 'F' => 'Female', 'O' => 'Other'), 'F', array('maxwidth' => 6, 'translate' => true));
This would present Male/Female/Other drop-down, when in another language the values would be translated (if available), e.g. in German as Männlich/Weiblich/Andere, except that in this case Männli/Weibli/Andere, since the values would be truncated to maxwidth.
| array | $options | An array of key => value pairs |
| string | $current | The currently selected key |
| string | $parameters | An array of parameters (maxwidth & translate are the only valid parameters) |
Definition at line 79 of file classEditor.php.
| EditorField::SetSql | ( | $sql | ) |
Set the SQL used for this field, if it is more than just a field name.
| unknown | $sql |
Definition at line 52 of file classEditor.php.
| EditorField::$Attributes |
Definition at line 24 of file classEditor.php.
| EditorField::$Field |
Definition at line 21 of file classEditor.php.
| EditorField::$LookupSql |
Definition at line 25 of file classEditor.php.
| EditorField::$OptionList |
Definition at line 26 of file classEditor.php.
| EditorField::$Sql |
Definition at line 22 of file classEditor.php.
| EditorField::$Value |
Definition at line 23 of file classEditor.php.