Class Portlet

Description

A Portlet is a small piece of Logic, normally displayed by a HTML snippet.

This class is the base class for all Portlets. The method

must always return all possible Parameter for your Portlet.
Therefor your implementation MUST call
  1. setParameter($key$value)
for each possible Parameter in its constructor!
Make sure to override and return proper PortletType definitions:

  • author: Kevin Papst
  • version: $Id: Portlet.php,v 1.2 2006/11/26 22:04:42 kpapst Exp $
  • copyright: Copyright (C) 2002-2006 Kevin Papst
  • license: GNU Public License


			
Direct descendents
Class Description
TranslatedPortlet This is a base class for Portlets that use a ResourceBundle.
SkypeOnlinePortlet Shows a Skype Javascript, that displays the Status of the configured Person.
Method Summary
Portlet Portlet ()
boolean displayPortlet ()
array getAllParameter ()
String getHtml ()
String getIdentifier ()
String getJavascript ()
mixed getParameter ( $key, [ $fallback = ''])
String getParameterName ( $key)
mixed getParameterType ( $key)
String getTitle ()
boolean needsJavascript ()
void setParameter ( $key,  $value)
Methods
Constructor Portlet (line 113)
Portlet Portlet ()
displayPortlet (line 233)

OPTIONAL TO BE OVERWRITEN!
Return if this Portlet should be displayed or not.

You might use this to display stateful Portlets, like a Login, that should only be diplayed to Anonymous User.
Default returns

  1. true
.

  • return: whether this Portlet should be displayed or not
boolean displayPortlet ()

Redefined in descendants as:
getAllParameter (line 142)

Gets all configured Portlet Parameter.


Make sure this method always returns all possible Values, cause they are used for the dynamic Portlet Configuration.

  • return: an Array with all avialable Key-Value Parameter
array getAllParameter ()
getHtml (line 195)

REQIURED TO BE OVERWRITEN!
Return the HTML snippet that this Portlet represents.

  • return: the HTML that should be displayed
String getHtml ()

Redefined in descendants as:
getIdentifier (line 150)

Get the Identifier for this Portlet.

  • return: the Unique Identifier for this Portlet
String getIdentifier ()

Redefined in descendants as:
getJavascript (line 219)

OPTIONAL TO BE OVERWRITEN!
Overwrite if your Portlet needs a Javascript snippet to work.

  • return: the Javascript for this Portlet
String getJavascript ()

Redefined in descendants as:
getParameter (line 129)

Gets a Portlet Parameter.

  • return: the Value for the Key or the Fallback
mixed getParameter ( $key, [ $fallback = ''])
  • $key
  • $fallback
getParameterName (line 175)

Returns the Name of the given Parameter.

The Name will be used in Administration Masks to increase the usability for End User.

  • return: the Name for the given Parameter
String getParameterName ( $key)
  • $key

Redefined in descendants as:
getParameterType (line 166)

REQIURED TO BE OVERWRITEN!
Returns the PortletType for the given Key.

Your implementation should use a switch to return proper PortletType.
The default implementation returns

.

  • return: one of the available Portlet Types
mixed getParameterType ( $key)
  • $key

Redefined in descendants as:
getTitle (line 185)

REQIURED TO BE OVERWRITEN!
Return the Title for this Portlet.

  • return: the Title for this Portlet
String getTitle ()

Redefined in descendants as:
needsJavascript (line 209)

OPTIONAL TO BE OVERWRITEN!
This method defines if the Portlet needs a Javascript block to work.

The default implementation checks if

returns a String with length greater than zero.

  • return: whether this Portlet needs some Javascript to work
boolean needsJavascript ()

Redefined in descendants as:
setParameter (line 119)

Sets a Portlet Parameter.

void setParameter ( $key,  $value)
  • $key
  • $value

Documentation generated by phpDocumentor 1.4.0