ZenMagick 0.9.8


org.zenmagick.mvc.widgets.ZMWidget
\mvc\widgets\ZMWidget.php at line 40

Class ZMWidget

ZMObject
└─ZMWidget

public abstract class ZMWidget
extends ZMObject

Widget base class.

Widgets are simple UI element container. They have some basic meta data (title, description) and can either be enabled or disabled.

Depending on the nature of the widgets, subclasses might implement custom properties as needed.

Since widgets are typically used in the context of an HTML page, the render($request) method is expected to return valid HTML that will display the widget.

Author:
DerManoMann
Version:
$Id: ZMWidget.php 2562 2009-11-02 20:34:40Z dermanomann $

Fields inherited from org.zenmagick.core.ZMObject
properties_
Constructor Summary

ZMWidget()

Create new instance.

Method Summary
string

getDescription()

Get the description.

string

getTitle()

Get the title.

boolean

isEnabled()

Check if this widget is enabled.

abstract string

render(ZMRequest request)

Get the HTML to render this widget.

void

setDescription(string description)

Set the description.

void

setEnabled(boolean enabled)

Controls whether this widget is enabled or not.

void

setTitle(string title)

Set the title.

Methods inherited from org.zenmagick.core.ZMObject
attachMethod, get, getAttachedMethods, getPropertyNames, set, singleton

Constructor Detail

\mvc\widgets\ZMWidget.php at line 49

ZMWidget

public ZMWidget()

Create new instance.


Method Detail

\mvc\widgets\ZMWidget.php at line 95

getDescription

public string getDescription()

Get the description.

Returns:
The description.

\mvc\widgets\ZMWidget.php at line 77

getTitle

public string getTitle()

Get the title.

Returns:
The title.

\mvc\widgets\ZMWidget.php at line 113

isEnabled

public boolean isEnabled()

Check if this widget is enabled.

Returns:
The enabled state.

\mvc\widgets\ZMWidget.php at line 123

render

public abstract string render(ZMRequest request)

Get the HTML to render this widget.

Parameters:
request - The current request.
Returns:
The HTML.

\mvc\widgets\ZMWidget.php at line 86

setDescription

public void setDescription(string description)

Set the description.

Parameters:
description - The description.

\mvc\widgets\ZMWidget.php at line 104

setEnabled

public void setEnabled(boolean enabled)

Controls whether this widget is enabled or not.

Parameters:
enabled - The enabled state.

\mvc\widgets\ZMWidget.php at line 68

setTitle

public void setTitle(string title)

Set the title.

Parameters:
title - The title.

ZenMagick 0.9.8