Class PortletParser

Description

This class provides methods for easy reading and parsing of Portlets.

The Portlet settings are saved (by default) in a Text-Project-Field with the Key:

The Column can be changed, in order to save multiple Columns for one Item.

If one of the configured Portlet Classes can not be found in the environment by calling

  1. class_exists($classname)
, it trys to load it from the Portlets Package by calling:
  1. loadClass('portlets'$classname)

  • version: $Id: PortletParser.php,v 1.2 2006/11/26 22:04:33 kpapst Exp $
  • copyright: Copyright (C) 2002-2006 Kevin Papst
  • author: Kevin Papst
  • license: GNU Public License
PortletService
   |
   --PortletParser
Method Summary
PortletParser PortletParser ()
void getPortlets ( $itemtype,  $itemid,  $languageid, [ $column = null])
void getPortletsFromXML ( $xml)
void getPortletsXML ( $itemtype,  $itemid,  $languageid, [ $column = null])
void getXMLFromPortlet ( $portlets)
void savePortlets ( $itemtype,  $itemid,  $languageid,  $portlets, [ $column = null])
void savePortletsXML ( $itemtype,  $itemid,  $languageid,  $xml, [ $column = null])
void setIgnoreDisplaySetting ([ $ignorePortletDisplaySetting = false])
Methods
Constructor PortletParser (line 66)

Create a new instance of the PortletParser.

PortletParser PortletParser ()
getPortlets (line 92)

Get an array with ready parsed and configured Portlets for the given Itemtype and ID.

Even if Portlets are ment to be used with Menus, it is possible to fetch them for all Itemtypes.

void getPortlets ( $itemtype,  $itemid,  $languageid, [ $column = null])
  • $itemtype
  • $itemid
  • $languageid
  • $column

Redefinition of:
PortletService::getPortlets()
Get an array with ready parsed and configured Portlets for the given Itemtype and ID. Even if Portlets are ment to be used with Menus, it is possible to fetch them for all Itemtypes.
getPortletsFromXML (line 134)

Return the ready configured Portlets from the given XML.

void getPortletsFromXML ( $xml)
  • $xml
getPortletsXML (line 106)

Returns the XML that defines the Portlet settings.

If no XML is found for the current Menu, it searches the way-home till TOP-LEVEL and returns the first occurence. If no XML could be found on the complete way-home, an empty String is returned.

void getPortletsXML ( $itemtype,  $itemid,  $languageid, [ $column = null])
  • $itemtype
  • $itemid
  • $languageid
  • $column
getXMLFromPortlet (line 180)

Converts an Array of ready configured Portlets into XML.

void getXMLFromPortlet ( $portlets)
  • $portlets
savePortlets (line 166)

Converts and then saves the given Portlets.

Pass null or an empty array to delete portlet settings.

void savePortlets ( $itemtype,  $itemid,  $languageid,  $portlets, [ $column = null])
  • $itemtype
  • $itemid
  • $languageid
  • $portlets
  • $column

Redefinition of:
PortletService::savePortlets()
Saves the given Portlets for the Item.
savePortletsXML (line 154)

Saves the given Portlet XML.

void savePortletsXML ( $itemtype,  $itemid,  $languageid,  $xml, [ $column = null])
  • $itemtype
  • $itemid
  • $languageid
  • $xml
  • $column
setIgnoreDisplaySetting (line 74)

If this function is called with

  1. true
also the Portlets are rendered, that return
  1. false
for
  1. Portlet->displayPortlet()
.

void setIgnoreDisplaySetting ([ $ignorePortletDisplaySetting = false])
  • $ignorePortletDisplaySetting

Redefinition of:
PortletService::setIgnoreDisplaySetting()
If this function is called with
  1. true
also the Portlets are rendered, that return
  1. false
for
  1. Portlet->displayPortlet()
.

Inherited Methods

Inherited From PortletService

PortletService::getPortlets()
PortletService::savePortlets()
PortletService::setIgnoreDisplaySetting()

Documentation generated by phpDocumentor 1.3.1