Class EntryField
Individual fields used for data entry / viewing.
This object is not really intended to be used directly. The more normal
interface is to instantiate an EntryForm
and then issue calls
to DataEntryLine() and other EntryForm
methods.
Understanding the operation of this class (and possibly auditing the source code, particularly EntryField::Render) will however convey valuable understanding of some of the more esoteric features.
Copyright: Catalyst IT Ltd, Morphoss Ltd http://www.morphoss.com/
License: GNU GPL v2
Author: Andrew McMillan andrew@mcmillan.net.nz
Todo:
This class doesn't really provide a huge amount of utility between construct and render, but there must be good things possible there. Perhaps one EntryField is created and used repeatedly as a template (e.g.). That might be useful to support... Why is this a Class anyway? Maybe we should have just done half a dozen functions (one per major field type) and just used those... Maybe we should build a base class for this and extend it to make EntryField in a better way.
EntryField is only useful at present if you desperately want to use it's simple
field interface, but want to intimately control the layout (or parts of the layout),
otherwise you should be using EntryForm
as the main class.
Located at DataEntry.php
public
|
#
__construct( text $intype, text $inname, text $attributes = "", text $current_value = "" )
Initialise an EntryField, used for data entry. |
public
text
|
|
public
|
#
new_lookup( array $attributes )
Function called indirectly when a new EntryField of type 'lookup' is created. |
public static
string
|
#
BuildOptionList( string $qry, string $current = '', array $location = 'options', $parameters = false )
Build an option list from the query. |
public
string
|
$fname
The name of the field |
|
public
string
|
$ftype
The type of entry field |
|
public
string
|
$current
The current value |
|
public
string
|
$attributes
An array of key value pairs |
|
public
string
|
$rendered
Once it actually is... |