Documentation

ProductCard
in package

Table of Contents

Properties

$cardData  : array<string|int, mixed>
$id  : string

Methods

__construct()  : mixed
Product constructor.
getCardData()  : array<string|int, mixed>
getProductId()  : string
generateAssetsInCardData()  : void

Properties

$cardData

private array<string|int, mixed> $cardData

Methods

__construct()

Product constructor.

public __construct(string $productId, array<string|int, mixed> $cardData) : mixed

Initializes a ProductCard object by loading product data from the ProductsCollection or use $productData array.

Parameters
$productId : string
$cardData : array<string|int, mixed>
Tags
throws
Exception

If the product is not found in the collection.

getCardData()

public getCardData() : array<string|int, mixed>
Return values
array<string|int, mixed>

getProductId()

public getProductId() : string
Return values
string

generateAssetsInCardData()

private generateAssetsInCardData() : void

        
On this page

Search results