Overview

Packages

  • awl
    • AuthPlugin
    • AwlDatabase
    • Browser
    • classEditor
    • DataEntry
    • DataUpdate
    • EMail
    • iCalendar
    • MenuSet
    • PgQuery
    • Session
    • Translation
    • User
    • Utilities
    • Validation
    • vCalendar
    • vComponent
    • XMLDocument
    • XMLElement
  • None

Classes

  • Editor
  • EditorField
  • Overview
  • Package
  • Class

Class EditorField

A class for the fields in the editor

Package: awl\classEditor
Copyright: Catalyst IT Ltd, Morphoss Ltd http://www.morphoss.com/
License: GNU GPL v2
Author: Andrew McMillan andrew@mcmillan.net.nz
Located at classEditor.php
Methods summary
public
# __construct( unknown $field, string $sql = "", string $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.

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.

Parameters

$field
$sql
$lookup_sql
public
# Set( $value )
public
# SetSql( unknown $sql )

Set the SQL used for this field, if it is more than just a field name.

Set the SQL used for this field, if it is more than just a field name.

Parameters

$sql
public
# SetLookup( string $lookup_sql )

Set the lookup SQL to use to populate a SELECT for this field.

Set the lookup SQL to use to populate a SELECT for this field.

Parameters

$lookup_sql
public
# SetOptionList( array $options, string $current = null, string $parameters = null )

Set the SELECT values explicitly, if they are not available in SQL.

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.

Parameters

$options
An array of key => value pairs
$current
The currently selected key
$parameters
An array of parameters (maxwidth & translate are the only valid parameters)
public
# GetTarget( )
public
# AddAttribute( string $k, string $v )

Add some kind of attribute to this field, such as a 'class' => 'fancyinputthingy'

Add some kind of attribute to this field, such as a 'class' => 'fancyinputthingy'

Parameters

$k
The attribute name
$v
The attribute value
public string
# RenderLabel( string $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.

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.

Parameters

$wrapme
The rendered field to be wrapped

Returns

string
public string
# RenderAttributes( )

Render the array of attributes for inclusion in the input tag.

Render the array of attributes for inclusion in the input tag.

Returns

string
Properties summary
public $Field
#
public $Sql
#
public $Value
#
public $Attributes
#
public $LookupSql
#
public $OptionList
#
API documentation generated by ApiGen