ZMObject
|
+--ZMModel
|
+--ZMCategory
public class ZMCategory
extends ZMModel
| Constructor Summary | |
|---|---|
Create new instance. |
|
| Method Summary | |
|---|---|
| array | Get the child categories of this category. |
| string | Get the category description. |
| int | getId() Get the id. |
| string | getImage() Get the category image (if any). |
| ZMImageInfo | Get the categories image ino instance (if any). |
| int | Get the language id. |
| string | getName() Get the category name. |
| ZMCategory | Get the parent category (if any). |
| int | Get the parent category id (if any). |
| string | getPath() Get the category path. |
| array | Get the category path array. |
| int | Get the sort order. |
| boolean | Checks if this category has children. |
| boolean | 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.ZMModel | |
|---|---|
| get, populate, set | |
| Methods inherited from org.zenmagick.ZMObject | |
|---|---|
| backtrace, create, log, singleton | |
public ZMCategory()
Create new instance. /
public array getChildren()
Get the child categories of this category.
ZMcategory instances.public string getDescription()
Get the category description.
public int getId()
Get the id.
public string getImage()
Get the category image (if any).
public ZMImageInfo getImageInfo()
Get the categories image ino instance (if any).
ZMImageInfo for this categorie's image, or null.public int getLanguageId()
Get the language id.
public string getName()
Get the category name.
public ZMCategory getParent()
Get the parent category (if any).
null.public int getParentId()
Get the parent category id (if any).
0.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.
cPath=[PATH].public array getPathArray()
Get the category path array.
public int getSortOrder()
Get the sort order.
public boolean hasChildren()
Checks if this category has children.
true if this category has children, false if not.public boolean hasParent()
Checks if the catgory has a parent.
true if this category has a parent, false if not.public boolean isActive()
Checks if this category is active; ie. visible in the storefront.
true if this category is active, false if not.public void setActive(boolean active)
Set the active flag.
true if this category is active, false if not.public void setDescription(string description)
Set the category description.
public void setId(int id)
Set the id.
public void setImage(string image)
Set the category image (if any).
public void setLanguageId(int languageId)
Set the language id.
public void setName(string name)
Set the category name.
public void setParentId(int parentId)
Set the parent category id.
public void setSortOrder(int sortOrder)
Set the sort order.
A single category