ZenMagick 0.9.11


zenmagick.store.shared.services\ZMBanners
services\ZMBanners.php at line 33

Class ZMBanners

ZMObject
└─ZMBanners

public class ZMBanners
extends ZMObject

Banner.

Author:
DerManoMann

Fields inherited from org.zenmagick.core\ZMObject
properties_
Method Summary
void

__construct(array properties)

Create new instance.

array

getAllBanners()

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

getBannerGroupIds()

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

Method Detail

services\ZMBanners.php at line 38

__construct

public void __construct(array properties)

Create new instance.

Parameters:
properties - Optional properties; default is an empty array;

services\ZMBanners.php at line 98

getAllBanners

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.

Returns:
A list of ZMBanner instances.
Deprecated.

services\ZMBanners.php at line 145

getBannerForId

public mixed getBannerForId(integer id)

Get a banner for the given id.

Parameters:
id - The banner id.
Returns:
A ZMBanner instance or null.

services\ZMBanners.php at line 84

getBannerForSet

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');

Parameters:
name - A banner group set name.
Returns:
A ZMBanner instance or null.
Deprecated.

services\ZMBanners.php at line 62

getBannerGroupIds

public array getBannerGroupIds()

Get a list of all banner groups.

Returns:
List of banner group ids.

services\ZMBanners.php at line 111

getBannersForGroupName

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.

Parameters:
group - One ore more group names, separated by ':'.
secure - Optional flag to load just banners for secure/unsecure pages; default is null for all.
Returns:
A list of ZMBanner instances.

services\ZMBanners.php at line 52

instance

public static void instance()

Get instance.


services\ZMBanners.php at line 180

updateBannerClickCount

public void updateBannerClickCount(int bannerId)

Update banner click statistics.

Parameters:
bannerId - The banner id.

services\ZMBanners.php at line 157

updateBannerDisplayCount

public void updateBannerDisplayCount(int bannerId)

Update banner display count.

Parameters:
bannerId - The banner id.

ZenMagick 0.9.11