ZenMagick 0.9.10


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

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

Method Summary
void

__construct()

Create new instance.

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

isEncode()

Indicate whether value and attributes will be encoded or not.

boolean

isMultiValue()

Check if this widget allows multiple values.

void

setAttributeNames(array names)

Set the list of supported attributes.

void

setEncode(boolean value)

Enable/disable encoding of value and attributes.

void

setName(string name)

Set the name.

void

setValue(mixed value)

Set the value.

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

Method Detail

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

__construct

public void __construct()

Create new instance.


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

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 136

getAttributeNames

public array getAttributeNames()

Get the list of supported attributes.

Returns:
The attribute names.

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

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 73

getName

public string getName()

Get the name.

Returns:
The name.

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

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 91

getValue

public mixed getValue()

Get the value.

Returns:
The value.

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

isEncode

public boolean isEncode()

Indicate whether value and attributes will be encoded or not.

Returns:
true if encoding will be done.

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

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 127

setAttributeNames

public void setAttributeNames(array names)

Set the list of supported attributes.

Parameters:
names - The attribute names.

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

setEncode

public void setEncode(boolean value)

Enable/disable encoding of value and attributes.

Parameters:
value - The new value.

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

setName

public void setName(string name)

Set the name.

Parameters:
name - The name.

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

setValue

public void setValue(mixed value)

Set the value.

Parameters:
value - The value.

ZenMagick 0.9.10