Documentation

Banner
in package

Table of Contents

Properties

$assets  : array<string|int, Assets>
$attributes  : array<string|int, Attribute>
$id  : string

Methods

__construct()  : mixed
Banner constructor.
getAllAssets()  : array<string|int, mixed>
Retrieves all assets associated with the object.
getAssets()  : array<string|int, mixed>|null
Retrieves a specific assets by it name.
getAttribute()  : Attribute|null
Get a Banner attribute object by name.
getAttributeValue()  : array<string|int, mixed>|string|false
Get the value of a Banner attribute by name.
getId()  : string
Get the Banner ID.
getOrder()  : int
Get the order of the banner.
getType()  : string
Get the type of the banner.

Properties

$assets

private array<string|int, Assets> $assets

Array of Asset objects

$attributes

private array<string|int, Attribute> $attributes

Array of Attribute objects

Methods

__construct()

Banner constructor.

public __construct(string $id[, int|null $blogId = null ]) : mixed

Initializes a Banner object by loading Banner data from the ProductsCollection.

Parameters
$id : string

The unique identifier for the banner.

$blogId : int|null = null
Tags
throws
Exception

If the Banner is not found in the collection.

getAllAssets()

Retrieves all assets associated with the object.

public getAllAssets() : array<string|int, mixed>

This method returns an array of all assets. Each asset is stored as an associative array within the $this->assets instance variable.

Return values
array<string|int, mixed>

An associative array of all assets, where the key is the asset name and the value is the asset's details.

getAssets()

Retrieves a specific assets by it name.

public getAssets(string $name[, bool $asArrays = false ]) : array<string|int, mixed>|null

This method searches for an asset in the $this->assets array by the provided asset name. If an asset with the given name exists, it returns the asset's details; otherwise, it returns null.

Parameters
$name : string

The name of the asset to retrieve.

$asArrays : bool = false
Return values
array<string|int, mixed>|null

The details of the asset if found; otherwise, null.

getAttribute()

Get a Banner attribute object by name.

public getAttribute(string $name) : Attribute|null
Parameters
$name : string

The name of the attribute.

Return values
Attribute|null

The Attribute object if found, or null if not found.

getAttributeValue()

Get the value of a Banner attribute by name.

public getAttributeValue(string $name) : array<string|int, mixed>|string|false
Parameters
$name : string

The name of the attribute.

Return values
array<string|int, mixed>|string|false

The value of the attribute if found, or false if not found or empty.

getId()

Get the Banner ID.

public getId() : string
Return values
string

The unique identifier of the Banner.

getOrder()

Get the order of the banner.

public getOrder() : int
Return values
int

The order of the banner.

getType()

Get the type of the banner.

public getType() : string
Return values
string

The type of the banner.


        
On this page

Search results