ZMObject
|
+--ZMCategories
public class ZMCategories
extends ZMObject
| Field Summary | |
|---|---|
| static mixed | |
| static mixed | |
| static mixed | |
| Constructor Summary | |
|---|---|
ZMCategories(int languageId) Create new instance. |
|
| Method Summary | |
|---|---|
| protected void | buildTree(int languageId) Create tree data. |
| Category | createCategory(ZMCategory category) Create a new category. |
| array | getCategories(array ids, int languageId) Get all categories. |
| ZMCategory | getCategoryForId(int categoryId, int languageId) Get a category for the given id. |
| array | getCategoryTree(int languageId) This returns, in fact, not a real tree, but a list of all top level categories. |
| ZMCategory | getDefaultCategoryForProductId(int productId, int languageId) Get the default category for the given product id. |
| static void | instance() Get instance. |
| protected void | load(int languageId) Load all categories. |
| Category | updateCategory(ZMCategory category) Update an existing category. |
| Methods inherited from org.zenmagick.ZMObject | |
|---|---|
| backtrace, create, log, singleton | |
public static mixed $CATEGORY_DESCRIPTION_MAPPING = null
public static mixed $CATEGORY_MAPPING = null
public static mixed $PRODUCTS_TO_CATEGORIES_MAPPING = null
public ZMCategories(int languageId)
Create new instance.
null for session language.protected void buildTree(int languageId)
Create tree data.
null.public Category createCategory(ZMCategory category)
Create a new category.
public array getCategories(array ids, int languageId)
Get all categories.
null.ZMCategory instances.public ZMCategory getCategoryForId(int categoryId, int languageId)
Get a category for the given id.
null.ZMCategory instance or null.public array getCategoryTree(int languageId)
This returns, in fact, not a real tree, but a list of all top level categories.
null.parentId == 0).public ZMCategory getDefaultCategoryForProductId(int productId, int languageId)
Get the default category for the given product id.
This will return the first mapped category.
null.null).public static void instance()
Get instance. /
protected void load(int languageId)
Load all categories.
null.public Category updateCategory(ZMCategory category)
Update an existing category.
Category DAO.