ZMObject
└─ZMCategories
public class ZMCategories
extends ZMObject
| Fields inherited from org.zenmagick.core\ZMObject | |
|---|---|
| properties_ | |
| Method Summary | |
|---|---|
| void | Create new instance. |
| Category | createCategory(ZMCategory category) Create a new category. |
| array | getAllCategories(int languageId) Get all categories. |
| array | getCategories(int languageId, array ids) 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. |
| ZMMetaTagDetails | getMetaTagDetailsForId(int categoryId, int languageId) Get meta tag details for the given id and language. |
| array | getProductTypeIds(mixed categoryId) Get the allowed product types (ids) for the given category id. |
| array | getRootCategories(int languageId) Get all root categories. |
| static void | instance() Get instance. |
| protected void | invalidateCache(int languageId) Invalidate all cache entries. |
| protected array | loadAndInitTree(int languageId) Load all categories and init the category tree. |
| Category | updateCategory(ZMCategory category) Update an existing category. |
| Methods inherited from org.zenmagick.core\ZMObject | |
|---|---|
| __construct, attachMethod, get, getAttachedMethods, getProperties, getPropertyNames, set, singleton | |
public void __construct()
Create new instance.
public Category createCategory(ZMCategory category)
Create a new category.
public array getAllCategories(int languageId)
Get all categories.
ZMCategory instances.public array getCategories(int languageId, array ids)
Get all categories.
null.ZMCategory instances.public ZMCategory getCategoryForId(int categoryId, int languageId)
Get a category for the given id.
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.
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).public ZMMetaTagDetails getMetaTagDetailsForId(int categoryId, int languageId)
Get meta tag details for the given id and language.
null.public array getProductTypeIds(mixed categoryId)
Get the allowed product types (ids) for the given category id.
public array getRootCategories(int languageId)
Get all root categories.
ZMCategory instances.public static void instance()
Get instance.
protected void invalidateCache(int languageId)
Invalidate all cache entries.
protected array loadAndInitTree(int languageId)
Load all categories and init the category tree.
public Category updateCategory(ZMCategory category)
Update an existing category.
Category DAO.
The cache implementation used can be configured via the setting 'apps.store.categories.cache'. Default is
ZMCache::TRANSIENT.