ZenMagick 0.9.10


zenmagick.store.shared.services.themes\ZMTemplateManager
services\themes\ZMTemplateManager.php at line 32

Class ZMTemplateManager

ZMObject
└─ZMTemplateManager

public class ZMTemplateManager
extends ZMObject

Template stuff.

This is a collection of things to make templating easier.

Author:
DerManoMann

Constant Summary
final static str

PAGE_BOTTOM

final static str

PAGE_NOW

final static str

PAGE_TOP

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

__construct()

Create new instance.

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.

string

handleResources(mixed files, string type, string location, array List)

Empty callback method for group processing.

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

Constant Detail

services\themes\ZMTemplateManager.php at line 34

PAGE_BOTTOM

public final static str PAGE_BOTTOM = 'bottom'

services\themes\ZMTemplateManager.php at line 35

PAGE_NOW

public final static str PAGE_NOW = 'now'

services\themes\ZMTemplateManager.php at line 33

PAGE_TOP

public final static str PAGE_TOP = 'top'

Method Detail

services\themes\ZMTemplateManager.php at line 49

__construct

public void __construct()

Create new instance.


services\themes\ZMTemplateManager.php at line 313

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.

services\themes\ZMTemplateManager.php at line 179

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.

services\themes\ZMTemplateManager.php at line 123

getLeftColBoxNames

public array getLeftColBoxNames()

Get the box names for the left column.

Returns:
Name of all boxes to be displayed.

services\themes\ZMTemplateManager.php at line 193

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.

services\themes\ZMTemplateManager.php at line 150

getRightColBoxNames

public array getRightColBoxNames()

Get the box names for the right column.

Returns:
Name of all boxes to be displayed.

services\themes\ZMTemplateManager.php at line 303

handleResources

public string handleResources(mixed files, string type, string location, array List)

Empty callback method for group processing.

Parameters:
List - of file infos.
type - The type; either css or js.
location - The location; either ZMTemplateManager::PAGE_TOP or ZMTemplateManager::PAGE_BOTTOM.
Returns:
Fully processed script code or null.

services\themes\ZMTemplateManager.php at line 71

instance

public static void instance()

Get instance.


services\themes\ZMTemplateManager.php at line 109

isLeftColEnabled

public boolean isLeftColEnabled()

Checks if the left column is active.

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

services\themes\ZMTemplateManager.php at line 116

isRightColEnabled

public boolean isRightColEnabled()

Checks if the right column is active.

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

services\themes\ZMTemplateManager.php at line 323

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.

services\themes\ZMTemplateManager.php at line 218

onZMFinaliseContents

public void onZMFinaliseContents(mixed args)

Event handler to inject JavaScript and CSS resources.


services\themes\ZMTemplateManager.php at line 287

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.

services\themes\ZMTemplateManager.php at line 95

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.

services\themes\ZMTemplateManager.php at line 81

setLeftColEnabled

public void setLeftColEnabled(boolean bool)

Enable/disable the left column.

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

services\themes\ZMTemplateManager.php at line 102

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.

services\themes\ZMTemplateManager.php at line 88

setRightColEnabled

public void setRightColEnabled(boolean bool)

Enable/disable the right column.

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

ZenMagick 0.9.10