ZMObject
|
+--ZMBanners
public class ZMBanners
extends ZMObject
| Constructor Summary | |
|---|---|
Create new instance. |
|
| Method Summary | |
|---|---|
| array | Get all banner according to zen-cart configuration. |
| mixed | getBannerForId(integer id) Get a banner for the given id. |
| mixed | getBannerForIndex(integer index) Get a banner for the given (zen-cart) index. |
| private array | getBannerForName(string identifiers, boolean all) Get one (random) or more banner based on the given banner group(s). |
| static void | instance() Get instance. |
| void | updateBannerClickCount(int bannerId) Update banner click statistics. |
| void | updateBannerDisplayCount(int bannerId) Update banner display count. |
| Methods inherited from org.zenmagick.ZMObject | |
|---|---|
| backtrace, create, log, singleton | |
public ZMBanners()
Create new instance. /
public array getAllBanners()
Get all banner according to zen-cart configuration.
this will return all banner as configured using the zen-cart define SHOW_BANNERS_GROUP_SET_ALL.
ZMBanner instances.public mixed getBannerForId(integer id)
Get a banner for the given id.
ZMBanner instance or null.public mixed getBannerForIndex(integer index)
Get a banner for the given (zen-cart) index.
The index is based on the zen-cart defines for banner; eg: SHOW_BANNERS_GROUP_SET3.
Here the index would be three.
ZMBanner instance or null.private array getBannerForName(string identifiers, boolean all)
Get one (random) or more banner based on the given banner group(s).
If $all is set to true, all matching banners will be returned.
Thus, getAllBanner() translates into getBannerForName(SHOW_BANNERS_GROUP_SET_ALL, true).
true, all banners will be returned, ordered in
* the configured sort order.ZMBanner instances.public static void instance()
Get instance. /
public void updateBannerClickCount(int bannerId)
Update banner click statistics.
public void updateBannerDisplayCount(int bannerId)
Update banner display count.
Banner.