ZMObject
└─ZMBanners
public class ZMBanners
extends ZMObject
| Fields inherited from org.zenmagick.core\ZMObject | |
|---|---|
| properties_ | |
| Method Summary | |
|---|---|
| void | __construct(array properties) Create new instance. |
| array | Get all banner according to zen-cart configuration. |
| mixed | getBannerForId(integer id) Get a banner for the given id. |
| mixed | getBannerForSet(string name) Get a random, single banner for the given symbolic banner group set (yes!) name. |
| array | Get a list of all banner groups. |
| array | getBannersForGroupName(string group, boolean secure) 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.core\ZMObject | |
|---|---|
| __construct, attachMethod, get, getAttachedMethods, getProperties, getPropertyNames, set | |
public void __construct(array properties)
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 getBannerForSet(string name)
Get a random, single banner for the given symbolic banner group set (yes!) name.
A banner set is either a single banner group or a list of banner groups.
Banner sets can be configured by creating a setting with the format: banners.[NAME], with banners. being a fixed prefix and [NAME] the name of the set.
Example: ZMSettings::set('banners.mygroup', 'Wide-Banners');
ZMBanner instance or null.public array getBannerGroupIds()
Get a list of all banner groups.
public array getBannersForGroupName(string group, boolean secure)
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.
null for all.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.