ZenMagick 0.9.8


org.zenmagick.store.services.themes.ZMTemplateManager
\store\services\themes\ZMTemplateManager.php at line 36

Class ZMTemplateManager

ZMObject
└─ZMTemplateManager

public class ZMTemplateManager
extends ZMObject

Template stuff.

This is a collection of things to make templating easier.

Author:
DerManoMann
Version:
$Id: ZMTemplateManager.php 2694 2009-12-03 22:32:18Z dermanomann $

Field Summary
final str

PAGE_BOTTOM

final str

PAGE_NOW

final str

PAGE_TOP

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

ZMTemplateManager()

Create new instance.

Method Summary
void

cssFile(string filename, array attr)

Add the given CSS file to the final contents.

int

getFieldLength(string table, string field)

Get the field length of a particular column.

array

getLeftColBoxNames()

Get the box names for the left column.

string

getProductTemplate(int productId)

Find the product template for a given product.

array

getRightColBoxNames()

Get the box names for the right column.

static void

instance()

Get instance.

boolean

isLeftColEnabled()

Checks if the left column is active.

boolean

isRightColEnabled()

Checks if the right column is active.

void

jsFile(string filename, string position)

Add the given JavaScript file to the final contents.

void

onZMFinaliseContents(mixed args)

Event handler to inject JavaScript and CSS resources.

string

resolveThemeResource(mixed request, string resource, request The)

Resolve theme resource.

void

setLeftColBoxes(array boxes)

Set the boxes for the left column.

void

setLeftColEnabled(boolean bool)

Enable/disable the left column.

void

setRightColBoxes(array boxes)

Set the boxes for the right column.

void

setRightColEnabled(boolean bool)

Enable/disable the right column.

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

Field Detail

\store\services\themes\ZMTemplateManager.php at line 38

PAGE_BOTTOM

public final str PAGE_BOTTOM = 'bottom'

\store\services\themes\ZMTemplateManager.php at line 39

PAGE_NOW

public final str PAGE_NOW = 'now'

\store\services\themes\ZMTemplateManager.php at line 37

PAGE_TOP

public final str PAGE_TOP = 'top'

Constructor Detail

\store\services\themes\ZMTemplateManager.php at line 53

ZMTemplateManager

public ZMTemplateManager()

Create new instance.


Method Detail

\store\services\themes\ZMTemplateManager.php at line 291

cssFile

public void cssFile(string filename, array attr)

Add the given CSS file to the final contents.

Parameters:
filename - A relative CSS filename.
attr - Optional attribute map; special keys 'prefix' and 'suffix' may be used to wrap.

\store\services\themes\ZMTemplateManager.php at line 189

getFieldLength

public int getFieldLength(string table, string field)

Get the field length of a particular column.

Parameters:
table - The database table name.
field - The field/column name.
Returns:
The field length.

\store\services\themes\ZMTemplateManager.php at line 127

getLeftColBoxNames

public array getLeftColBoxNames()

Get the box names for the left column.

Returns:
Name of all boxes to be displayed.

\store\services\themes\ZMTemplateManager.php at line 203

getProductTemplate

public string getProductTemplate(int productId)

Find the product template for a given product.

Parameters:
productId - The product id.
Returns:
The template name to be used to display product details.

\store\services\themes\ZMTemplateManager.php at line 157

getRightColBoxNames

public array getRightColBoxNames()

Get the box names for the right column.

Returns:
Name of all boxes to be displayed.

\store\services\themes\ZMTemplateManager.php at line 75

instance

public static void instance()

Get instance.


\store\services\themes\ZMTemplateManager.php at line 113

isLeftColEnabled

public boolean isLeftColEnabled()

Checks if the left column is active.

Returns:
true if the column is active, false if not.

\store\services\themes\ZMTemplateManager.php at line 120

isRightColEnabled

public boolean isRightColEnabled()

Checks if the right column is active.

Returns:
true if the column is active, false if not.

\store\services\themes\ZMTemplateManager.php at line 301

jsFile

public void jsFile(string filename, string position)

Add the given JavaScript file to the final contents.

Parameters:
filename - A relative JavaScript filename.
position - Optional position; either PAGE_TOP (default), or PAGE_BOTTOM.

\store\services\themes\ZMTemplateManager.php at line 228

onZMFinaliseContents

public void onZMFinaliseContents(mixed args)

Event handler to inject JavaScript and CSS resources.


\store\services\themes\ZMTemplateManager.php at line 281

resolveThemeResource

public string resolveThemeResource(mixed request, string resource, request The)

Resolve theme resource.

Parameters:
The - current request.
resource - The url.
Returns:
The resolved final URL.

\store\services\themes\ZMTemplateManager.php at line 99

setLeftColBoxes

public void setLeftColBoxes(array boxes)

Set the boxes for the left column.

Parameters:
boxes - List of box names to be displayed in the left column.

\store\services\themes\ZMTemplateManager.php at line 85

setLeftColEnabled

public void setLeftColEnabled(boolean bool)

Enable/disable the left column.

Parameters:
bool - If true the left column will be displayed.

\store\services\themes\ZMTemplateManager.php at line 106

setRightColBoxes

public void setRightColBoxes(array boxes)

Set the boxes for the right column.

Parameters:
boxes - List of box names to be displayed in the right column.

\store\services\themes\ZMTemplateManager.php at line 92

setRightColEnabled

public void setRightColEnabled(boolean bool)

Enable/disable the right column.

Parameters:
bool - If true the right column will be displayed.

ZenMagick 0.9.8