ZenMagick 0.9.10


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

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

Fields inherited from org.zenmagick.core\ZMObject
properties_
Method Summary
void

__construct()

Create new instance.

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
__construct, attachMethod, get, getAttachedMethods, getProperties, getPropertyNames, set, singleton

Method Detail

mvc\widgets\ZMWidget.php at line 48

__construct

public void __construct()

Create new instance.


mvc\widgets\ZMWidget.php at line 94

getDescription

public string getDescription()

Get the description.

Returns:
The description.

mvc\widgets\ZMWidget.php at line 76

getTitle

public string getTitle()

Get the title.

Returns:
The title.

mvc\widgets\ZMWidget.php at line 112

isEnabled

public boolean isEnabled()

Check if this widget is enabled.

Returns:
The enabled state.

mvc\widgets\ZMWidget.php at line 122

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 85

setDescription

public void setDescription(string description)

Set the description.

Parameters:
description - The description.

mvc\widgets\ZMWidget.php at line 103

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 67

setTitle

public void setTitle(string title)

Set the title.

Parameters:
title - The title.

ZenMagick 0.9.10