ZenMagick 0.9.8


org.zenmagick.mvc.widgets.form.ZMFormWidget
\mvc\widgets\form\ZMFormWidget.php at line 33

Class ZMFormWidget

ZMObject
└─ZMWidget
└─ZMFormWidget

public abstract class ZMFormWidget
extends ZMWidget

Form widget base class.

Form widgets are widgets that represent various HTML form input elements.

Author:
DerManoMann
Version:
$Id: ZMFormWidget.php 2626 2009-11-24 01:51:07Z dermanomann $

Constructor Summary

ZMFormWidget()

Create new instance.

Method Summary
boolean

compare(string value)

Compare the given value with the widget value.

array

getAttributeNames()

Get the list of supported attributes.

string

getAttributeString(ZMRequest request, boolean addValue, boolean addName)

Get the formatted attribute string.

string

getName()

Get the name.

string

getStringValue()

Get a stringified version of the value suitable for storing.

mixed

getValue()

Get the value.

boolean

isMultiValue()

Check if this widget allows multiple values.

void

setAttributeNames(array names)

Set the list of supported attributes.

void

setName(string name)

Set the name.

void

setValue(mixed value)

Set the value.

Methods inherited from org.zenmagick.mvc.widgets.ZMWidget
getDescription, getTitle, isEnabled, render, setDescription, setEnabled, setTitle
Methods inherited from org.zenmagick.core.ZMObject
attachMethod, get, getAttachedMethods, getPropertyNames, set, singleton

Constructor Detail

\mvc\widgets\form\ZMFormWidget.php at line 43

ZMFormWidget

public ZMFormWidget()

Create new instance.


Method Detail

\mvc\widgets\form\ZMFormWidget.php at line 177

compare

public boolean compare(string value)

Compare the given value with the widget value.

Parameters:
value - A string value.
Returns:
true if the given value evaluates to the same value as the widget value.

\mvc\widgets\form\ZMFormWidget.php at line 117

getAttributeNames

public array getAttributeNames()

Get the list of supported attributes.

Returns:
The attribute names.

\mvc\widgets\form\ZMFormWidget.php at line 138

getAttributeString

public string getAttributeString(ZMRequest request, boolean addValue, boolean addName)

Get the formatted attribute string.

Parameters:
request - The current request.
addValue - Optional flag to include/exclude the value; default is true.
addName - Optional flag to include/exclude the name; default is true.
Returns:
All set (and allowed) attributes as formatted HTML string.

\mvc\widgets\form\ZMFormWidget.php at line 72

getName

public string getName()

Get the name.

Returns:
The name.

\mvc\widgets\form\ZMFormWidget.php at line 99

getStringValue

public string getStringValue()

Get a stringified version of the value suitable for storing.

Returns:
The value as string.

\mvc\widgets\form\ZMFormWidget.php at line 90

getValue

public mixed getValue()

Get the value.

Returns:
The value.

\mvc\widgets\form\ZMFormWidget.php at line 126

isMultiValue

public boolean isMultiValue()

Check if this widget allows multiple values.

Returns:
true if multiple values are supported.

\mvc\widgets\form\ZMFormWidget.php at line 108

setAttributeNames

public void setAttributeNames(array names)

Set the list of supported attributes.

Parameters:
names - The attribute names.

\mvc\widgets\form\ZMFormWidget.php at line 63

setName

public void setName(string name)

Set the name.

Parameters:
name - The name.

\mvc\widgets\form\ZMFormWidget.php at line 81

setValue

public void setValue(mixed value)

Set the value.

Parameters:
value - The value.

ZenMagick 0.9.8