ZenMagick 0.9.8


org.zenmagick.store.model.catalog.ZMCategory
\store\model\catalog\ZMCategory.php at line 36

Class ZMCategory

ZMObject
└─ZMCategory

public class ZMCategory
extends ZMObject

A single category

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

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

ZMCategory()

Create new instance.

Method Summary
void

addChild(mixed child)

Add a child category.

array

getChildIds(boolean includeSelf)

Get a list of all child category ids.

array

getChildren()

Get the child categories of this category.

string

getDescription()

Get the category description.

int

getId()

Get the id.

string

getImage()

Get the category image (if any).

ZMImageInfo

getImageInfo()

Get the categories image ino instance (if any).

int

getLanguageId()

Get the language id.

ZMMetaTagDetails

getMetaTagDetails(int languageId)

Get meta tag details if available.

string

getName()

Get the category name.

ZMCategory

getParent()

Get the parent category (if any).

int

getParentId()

Get the parent category id (if any).

string

getPath()

Get the category path.

array

getPathArray()

Get the category path array.

array

getProductTypeIds()

Get a list of allowed product types.

int

getSortOrder()

Get the sort order.

boolean

hasChildren()

Checks if this category has children.

boolean

hasParent()

Checks if the catgory has a parent.

boolean

isActive()

Checks if this category is active; ie.

void

setActive(boolean active)

Set the active flag.

void

setDescription(string description)

Set the category description.

void

setId(int id)

Set the id.

void

setImage(string image)

Set the category image (if any).

void

setLanguageId(int languageId)

Set the language id.

void

setName(string name)

Set the category name.

void

setParentId(int parentId)

Set the parent category id.

void

setSortOrder(int sortOrder)

Set the sort order.

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

Constructor Detail

\store\model\catalog\ZMCategory.php at line 50

ZMCategory

public ZMCategory()

Create new instance.


Method Detail

\store\model\catalog\ZMCategory.php at line 141

addChild

public void addChild(mixed child)

Add a child category.

Parameters:
child - Either a category or category id.

\store\model\catalog\ZMCategory.php at line 270

getChildIds

public array getChildIds(boolean includeSelf)

Get a list of all child category ids.

Parameters:
includeSelf - Optional flag to include this category in the list; default is true.
Returns:
A list of category ids.

\store\model\catalog\ZMCategory.php at line 132

getChildren

public array getChildren()

Get the child categories of this category.

Returns:
A list of ZMcategory instances.

\store\model\catalog\ZMCategory.php at line 154

getDescription

public string getDescription()

Get the category description.

Returns:
The description.

\store\model\catalog\ZMCategory.php at line 74

getId

public int getId()

Get the id.

Returns:
The category id.

\store\model\catalog\ZMCategory.php at line 168

getImage

public string getImage()

Get the category image (if any).

Returns:
The image name.

\store\model\catalog\ZMCategory.php at line 175

getImageInfo

public ZMImageInfo getImageInfo()

Get the categories image ino instance (if any).

Returns:
The ZMImageInfo for this categorie's image, or null.

\store\model\catalog\ZMCategory.php at line 255

getLanguageId

public int getLanguageId()

Get the language id.

Returns:
The language id.

\store\model\catalog\ZMCategory.php at line 299

getMetaTagDetails

public ZMMetaTagDetails getMetaTagDetails(int languageId)

Get meta tag details if available.

Parameters:
languageId - The language id.
Returns:
The details or null.

\store\model\catalog\ZMCategory.php at line 104

getName

public string getName()

Get the category name.

Returns:
The category name.

\store\model\catalog\ZMCategory.php at line 81

getParent

public ZMCategory getParent()

Get the parent category (if any).

Returns:
The parent category or null.

\store\model\catalog\ZMCategory.php at line 90

getParentId

public int getParentId()

Get the parent category id (if any).

Returns:
The parent category id or 0.

\store\model\catalog\ZMCategory.php at line 203

getPath

public string getPath()

Get the category path.

This method will return a value that can be used as cPath value in a URL pointing to this category.

Returns:
The category path in the form cPath=[PATH].

\store\model\catalog\ZMCategory.php at line 184

getPathArray

public array getPathArray()

Get the category path array.

Returns:
The category path as array of categories with the last element being the products category.

\store\model\catalog\ZMCategory.php at line 289

getProductTypeIds

public array getProductTypeIds()

Get a list of allowed product types.

An empty list means no restrictions.

Returns:
List of allowed product type ids (might be empty).

\store\model\catalog\ZMCategory.php at line 161

getSortOrder

public int getSortOrder()

Get the sort order.

Returns:
The sort order.

\store\model\catalog\ZMCategory.php at line 125

hasChildren

public boolean hasChildren()

Checks if this category has children.

Returns:
true if this category has children, false if not.

\store\model\catalog\ZMCategory.php at line 97

hasParent

public boolean hasParent()

Checks if the catgory has a parent.

Returns:
true if this category has a parent, false if not.

\store\model\catalog\ZMCategory.php at line 111

isActive

public boolean isActive()

Checks if this category is active; ie. visible in the storefront.

Returns:
true if this category is active, false if not.

\store\model\catalog\ZMCategory.php at line 118

setActive

public void setActive(boolean active)

Set the active flag.

Parameters:
active - true if this category is active, false if not.

\store\model\catalog\ZMCategory.php at line 234

setDescription

public void setDescription(string description)

Set the category description.

Parameters:
description - The description.

\store\model\catalog\ZMCategory.php at line 213

setId

public void setId(int id)

Set the id.

Parameters:
id - The category id.

\store\model\catalog\ZMCategory.php at line 248

setImage

public void setImage(string image)

Set the category image (if any).

Parameters:
image - The image name.

\store\model\catalog\ZMCategory.php at line 262

setLanguageId

public void setLanguageId(int languageId)

Set the language id.

Parameters:
languageId - The language id.

\store\model\catalog\ZMCategory.php at line 227

setName

public void setName(string name)

Set the category name.

Parameters:
name - The category name.

\store\model\catalog\ZMCategory.php at line 220

setParentId

public void setParentId(int parentId)

Set the parent category id.

Parameters:
parentId - The parent category id.

\store\model\catalog\ZMCategory.php at line 241

setSortOrder

public void setSortOrder(int sortOrder)

Set the sort order.

Parameters:
sortOrder - The sort order.

ZenMagick 0.9.8