Documentation

Product
in package

Table of Contents

Properties

$accessories  : array<string|int, ProducCard>
$assets  : array<string|int, Assets>
$attributes  : array<string|int, Attribute>
$awards  : array<string|int, Awards>
$banners  : array<string|int, Banner>
$blogId  : int
$brand  : array<string|int, mixed>
$category  : array<string|int, mixed>
$countries_of_sale  : array<string|int, mixed>
$id  : string
$logos  : array<string|int, Assets>
$productGroups  : array<string|int, mixed>
$rawAccessories  : array<string|int, mixed>
$rawAwards  : array<string|int, mixed>
$rawBanners  : array<string|int, mixed>
$rawRecommendedProduct  : array<string|int, mixed>
$rawRecommendedProducts  : array<string|int, mixed>
$rawRelatedProducts  : array<string|int, mixed>
$recommendedProduct  : ProductCard
$recommendedProducts  : array<string|int, ProductCard>
$relatedProducts  : array<string|int, ProducCard>
$slug  : string
$status  : array<string|int, mixed>

Methods

__construct()  : mixed
Product constructor.
createProductById()  : Product|null
Creates a Product object based on the provided product ID and optional blog ID.
getAccessories()  : array<string|int, ProductCard>
Retrieves all accessories associated with the product.
getAccessoryById()  : ProductCard|null
Retrieves a specific accessory by its ID.
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 product attribute object by name.
getAttributesByGroup()  : array<string|int, Attribute>
Retrieves all attributes belonging to a specific group.
getAttributesByGroupAndTags()  : array<string|int, mixed>
Get attributes by group and tags.
getAttributesByTag()  : array<string|int, Attribute>
Get a list of attributes that contain the specified tag.
getAttributeValue()  : array<string|int, mixed>|string|bool|null
Get the value of a product attribute by name.
getAttributeValueAsArray()  : array<string|int, mixed>
Get the value of a product attribute by name, but return type will be allways return array .
getAwards()  : array<string|int, Awards>
Retrieves all awards associated with the product.
getBannerById()  : Banner|null
Retrieves a specific banner by its ID.
getBanners()  : array<string|int, Banner>
Retrieves all banners associated with the product.
getBrand()  : string
getCardData()  : array<string|int, mixed>
Retrieves card data from this product.
getCategory()  : string
getColor()  : array<string|int, mixed>
Retrieves the color attribute for the product.
getColorGroup()  : array<string|int, mixed>|false
Retrieves the product's color group information.
getCountriesOfSale()  : array<string|int, mixed>
getDownloads()  : array<string|int, mixed>
Retrieves an array of downloadable assets related to the product.
getFlixmediaFeedData()  : array<string|int, mixed>
Builds and returns a structured array with product data formatted for the Flixmedia feed.
getId()  : string
Get the product ID.
getLogos()  : array<string|int, mixed>
Retrieves the list of logo assets that have been sorted and filtered.
getProductGroups()  : array<string|int, mixed>
Retrieves the product groups associated with the product.
getRecommendedProduct()  : ProductCard|null
Retrieves the main recommended product associated with the product.
getRecommendedProductById()  : ProductCard|null
Retrieves a specific recommended product by its ID.
getRecommendedProducts()  : array<string|int, ProductCard>
Retrieves all recommended products associated with the product.
getRelatedProductById()  : ProductCard|null
Retrieves a specific related product by its ID.
getRelatedProducts()  : array<string|int, ProductCard>
Retrieves all related products associated with the product.
getSearchCardData()  : array<string|int, mixed>
Retrieves search card data for the product.
getSearchIndexData()  : string
getSizeGroup()  : array<string|int, mixed>|false
Retrieves the product's size group information.
getSlug()  : string
Retrieves the slug of the product.
getStatus()  : string
getVariantGroup()  : array<string|int, mixed>|false
Retrieves the product's variant group information.
isGrouped()  : bool
Determines if the product is part of any product groups.
isMainProduct()  : bool
Determines if the current product is the main product.
sortAwardsByOrder()  : void
Sort the awards array by their order (ascending).
addIfNotEmpty()  : void
Adds a key-value pair to the given array only if the value is not empty.
generateGroups()  : void
Generates product groups based on specific group IDs and their attributes.
generateSortedLogos()  : void
Generates a sorted list of logo assets based on a predefined order and allowed MIME types.
getBannersFeedData()  : array<string|int, mixed>
Retrieves banner data for the feed.
getBasicInformationFeedData()  : array<string|int, mixed>
Constructs the basic information section of the Flixmedia feed.
getHeroSectionFeedData()  : array<string|int, mixed>
Prepares the hero section data for the Flixmedia feed.
getHighlightsFeedData()  : array<string|int, mixed>
Prepares the highlights section for the Flixmedia feed.
getImgsUrlArrayFromAssets()  : array<string|int, mixed>
Retrieves an array of image URLs from the given assets.
getLifestyleFeedData()  : array<string|int, mixed>
Prepares the lifestyle images section for the Flixmedia feed.
getLogosFeedData()  : array<string|int, mixed>
Prepares the logos section for the Flixmedia feed.
getTechSpecsFeedArray()  : array<string|int, mixed>
Retrieves technical specifications data for the feed.
loadAwards()  : void
loadBanners()  : void
Loads and initializes banner objects from raw banner IDs.
loadRelations()  : array<string|int, mixed>
Loads related products by their IDs and creates `ProductCard` objects for each related product.
resizeImageUrl()  : string
Resizes the image URL using the Webentor\Core\Images\get_resized_cloud_image_url_by_url function.
sortAssetsByOrder()  : array<string|int, mixed>
Sorts assets based on a given order of asset names.
sortBannersByOrder()  : void
Sorts the banners stored in $this->banners based on the 'content_order' using the getOrder method.
transfromSpecAttributesToFeedFormat()  : array<string|int, mixed>
Transforms specification attributes to the required feed format.

Properties

$accessories

private array<string|int, ProducCard> $accessories = null

Array of ProductCard objects, resolved in get method

$assets

private array<string|int, Assets> $assets

Array of Asset objects

$attributes

private array<string|int, Attribute> $attributes

Array of Attribute objects

$awards

private array<string|int, Awards> $awards = null

Sorted Array of Banner objects

$banners

private array<string|int, Banner> $banners = null

Sorted Array of Banner objects

$brand

private array<string|int, mixed> $brand

$category

private array<string|int, mixed> $category

$countries_of_sale

private array<string|int, mixed> $countries_of_sale

$logos

private array<string|int, Assets> $logos

Sorted Array of Asset logos objects

$productGroups

private array<string|int, mixed> $productGroups

$rawAccessories

private array<string|int, mixed> $rawAccessories

Array of Accesories products data, used for resolve relations in get method

$rawAwards

private array<string|int, mixed> $rawAwards

Array of Anners products data, used for resolve awards in get method

$rawBanners

private array<string|int, mixed> $rawBanners

Array of Banners products data, used for resolve banners in get method

$rawRecommendedProduct

private array<string|int, mixed> $rawRecommendedProduct

Array of recommended product data, used for resolving relations in the get method.

$rawRecommendedProducts

private array<string|int, mixed> $rawRecommendedProducts

Array of recommended products data, used for resolving relations in the get method.

$rawRelatedProducts

private array<string|int, mixed> $rawRelatedProducts

Array of Related products data, used for resolve raltions in get method

$recommendedProduct

private ProductCard $recommendedProduct = null

ProductCard object for the recommended product, resolved in the get method.

$recommendedProducts

private array<string|int, ProductCard> $recommendedProducts = null

Array of ProductCard objects for the recommended products, resolved in the get method.

$relatedProducts

private array<string|int, ProducCard> $relatedProducts = null

Array of ProductCard objects, resolved in get method

$status

private array<string|int, mixed> $status

Methods

__construct()

Product constructor.

public __construct(array<string|int, mixed> $productData[, int|null $blogId = null ]) : mixed

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

Parameters
$productData : array<string|int, mixed>

The sales country code (e.g., 'EU', 'UK').

$blogId : int|null = null
Tags
throws
Exception

If the product is not found in the collection.

createProductById()

Creates a Product object based on the provided product ID and optional blog ID.

public static createProductById(string $id[, int|null $blogId = null ]) : Product|null

Retrieves product data from the ProductsCollection instance associated with the specified blog ID. If no blog ID is provided, the current blog (site) context is used. Returns a new Product object if the product exists; otherwise, logs an error and returns null.

Parameters
$id : string

The product ID to retrieve.

$blogId : int|null = null

Optional blog ID to determine the context. Defaults to current blog if null.

Return values
Product|null

The created Product object or null if the product is not found.

getAccessories()

Retrieves all accessories associated with the product.

public getAccessories() : array<string|int, ProductCard>

This method returns an array of ProductCard objects that represent the product's accessories. If the accessories haven't been loaded yet, it resolves the relations by calling loadRelations to populate the accessories property.

Return values
array<string|int, ProductCard>

An array of ProductCard objects representing the product's accessories.

getAccessoryById()

Retrieves a specific accessory by its ID.

public getAccessoryById(string $accessoryId) : ProductCard|null

This method returns a ProductCard object for the accessory with the given ID if it exists. If the accessory with the specified ID is not found, it returns null. If the accessories have not been loaded yet, it resolves the relations before searching for the accessory.

Parameters
$accessoryId : string

The ID of the accessory to retrieve.

Return values
ProductCard|null

The ProductCard object for the specified accessory, or null if not found.

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 product 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.

getAttributesByGroup()

Retrieves all attributes belonging to a specific group.

public getAttributesByGroup(string $groupName) : array<string|int, Attribute>

This method filters the product's attributes and returns only those that belong to the specified group. Each attribute is checked based on its 'group' metadata.

Parameters
$groupName : string

The name of the group for which to retrieve attributes.

Return values
array<string|int, Attribute>

An array of attributes that belong to the specified group.

getAttributesByGroupAndTags()

Get attributes by group and tags.

public getAttributesByGroupAndTags(string $groupName, string|array<string|int, mixed> $tags) : array<string|int, mixed>
Parameters
$groupName : string

The name of the group.

$tags : string|array<string|int, mixed>

The tags to filter by.

Return values
array<string|int, mixed>

The attributes that match both the group and tags.

getAttributesByTag()

Get a list of attributes that contain the specified tag.

public getAttributesByTag(string $tag) : array<string|int, Attribute>

This function iterates through all attributes of the product and checks if the given tag exists in each attribute's tags. It returns an array of Attribute objects that contain the tag.

Parameters
$tag : string

The tag to search for.

Return values
array<string|int, Attribute>

The list of attributes that have the specified tag.

getAttributeValue()

Get the value of a product attribute by name.

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

The name of the attribute.

Return values
array<string|int, mixed>|string|bool|null

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

getAttributeValueAsArray()

Get the value of a product attribute by name, but return type will be allways return array .

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

The name of the attribute.

Return values
array<string|int, mixed>

The array of value of the attribute if found.

getAwards()

Retrieves all awards associated with the product.

public getAwards() : array<string|int, Awards>

This method returns an array of awards that are linked to the current product. Awards can include various marketing or promotional images tied to the product.

Return values
array<string|int, Awards>

The array of banners associated with the product.

getBannerById()

Retrieves a specific banner by its ID.

public getBannerById(string $bannerId) : Banner|null

This method returns a single banner object associated with the product, identified by its ID. If the banner does not exist, it returns null.

Parameters
$bannerId : string

The ID of the banner to retrieve.

Return values
Banner|null

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

getBanners()

Retrieves all banners associated with the product.

public getBanners() : array<string|int, Banner>

This method returns an array of banners that are linked to the current product. Banners can include various marketing or promotional images tied to the product.

Return values
array<string|int, Banner>

The array of banners associated with the product.

getBrand()

public getBrand() : string
Return values
string

getCardData()

Retrieves card data from this product.

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

Card data with their respective keys.

getCategory()

public getCategory() : string
Return values
string

getColor()

Retrieves the color attribute for the product.

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

This method fetches the color attribute value using the configured attribute ID for colors. It then parses the color string into an array format for easier manipulation and usage.

Return values
array<string|int, mixed>

The parsed color information as an array.

getColorGroup()

Retrieves the product's color group information.

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

This function returns the color group based on the group ID configured for colors. If the product does not belong to a color group, it returns false.

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

The color group data or false if not available.

getCountriesOfSale()

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

getDownloads()

Retrieves an array of downloadable assets related to the product.

public getDownloads([bool $assetsAsArray = false ]) : array<string|int, mixed>

This function gathers various types of downloadable product-related assets such as product fiches, warranty cards, datasheets, manuals, and quick start guides. It also includes additional reference data, like the 'Datasheets django ref'.

The function uses getAssets() to fetch the relevant assets by type and getAttributeValue() to retrieve specific attribute values, ensuring that missing data is replaced with empty arrays.

If the $assetsAsArray parameter is set to true, the assets will be returned as arrays; otherwise, they will follow the default return structure.

Parameters
$assetsAsArray : bool = false

Determines if the assets should be returned as arrays.

Return values
array<string|int, mixed>

An array of asset information, each with a 'name' and 'value' pair.

getFlixmediaFeedData()

Builds and returns a structured array with product data formatted for the Flixmedia feed.

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

The method collects various product-related sections (basic info, hero images, highlights, etc.) and adds them to the feed structure only if the corresponding data is not empty.

Return values
array<string|int, mixed>

Structured product data for the Flixmedia feed.

getId()

Get the product ID.

public getId() : string
Return values
string

The unique identifier of the product.

getLogos()

Retrieves the list of logo assets that have been sorted and filtered.

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

This method returns the list of logo assets stored in the $this->logos instance variable. The assets are filtered to include only those with allowed MIME types and sorted based on a predefined order if specified. If no order is specified, all filtered assets are returned.

If a custom order is provided, the logos will be re-sorted according to that order.

Parameters
$asArrays : bool = false

Whether to return the logos as arrays.

$customOrder : array<string|int, mixed>|null = null

Optional array of asset names to define a custom order.

Return values
array<string|int, mixed>

An array of logo assets, either as Asset objects or associative arrays.

getProductGroups()

Retrieves the product groups associated with the product.

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

This method returns the product groups that the current product is part of. Product groups typically represent a set of related products, such as variations.

Return values
array<string|int, mixed>

The product groups for the current product.

getRecommendedProduct()

Retrieves the main recommended product associated with the product.

public getRecommendedProduct() : ProductCard|null

This method returns a single ProductCard object representing the primary recommended product. If no recommended product is set, it returns null.

Return values
ProductCard|null

The ProductCard object representing the main recommended product, or null if not available.

getRecommendedProductById()

Retrieves a specific recommended product by its ID.

public getRecommendedProductById(string $recommendedProductId) : ProductCard|null

This method returns a ProductCard object for the recommended product with the given ID if it exists. If the recommended product with the specified ID is not found, it returns null.

Parameters
$recommendedProductId : string

The ID of the recommended product to retrieve.

Return values
ProductCard|null

The ProductCard object for the specified recommended product, or null if not found.

getRecommendedProducts()

Retrieves all recommended products associated with the product.

public getRecommendedProducts() : array<string|int, ProductCard>

This method returns an array of ProductCard objects that represent the product's recommended products.

Return values
array<string|int, ProductCard>

An array of ProductCard objects representing the recommended products.

getRelatedProductById()

Retrieves a specific related product by its ID.

public getRelatedProductById(string $relatedProductId) : ProductCard|null

This method returns a ProductCard object for the related product with the given ID if it exists. If the related product with the specified ID is not found, it returns null.

Parameters
$relatedProductId : string

The ID of the related product to retrieve.

Return values
ProductCard|null

The ProductCard object for the specified related product, or null if not found.

getRelatedProducts()

Retrieves all related products associated with the product.

public getRelatedProducts() : array<string|int, ProductCard>

This method returns an array of ProductCard objects that represent the product's related products.

Return values
array<string|int, ProductCard>

An array of ProductCard objects representing the related products.

getSearchCardData()

Retrieves search card data for the product.

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

The function uses helper methods to fetch the first non-empty value for marketing headlines and highlights from predefined key arrays. It also ensures that missing or unavailable data is replaced with null where appropriate.

Return values
array<string|int, mixed>

An array of product data for search cards.

getSearchIndexData()

public getSearchIndexData() : string
Return values
string

getSizeGroup()

Retrieves the product's size group information.

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

This function returns the size group based on the group ID configured for sizes. If the product does not belong to a size group, it returns false.

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

The size group data or false if not available.

getSlug()

Retrieves the slug of the product.

public getSlug() : string

The slug is a URL-friendly version of the product's name or identifier, typically used in routing or SEO-friendly URLs.

Return values
string

The slug of the product.

getStatus()

public getStatus() : string
Return values
string

getVariantGroup()

Retrieves the product's variant group information.

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

This function returns the variant group based on the group ID configured for variants. If the product does not belong to a variant group, it returns false.

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

The variant group data or false if not available.

isGrouped()

Determines if the product is part of any product groups.

public isGrouped() : bool

This function checks whether the product belongs to one or more product groups by verifying if the $productGroups property is not empty.

Return values
bool

Returns true if the product is grouped; otherwise, false.

isMainProduct()

Determines if the current product is the main product.

public isMainProduct() : bool

This method checks whether the product has a specific attribute value that identifies it as the main product. The attribute ID used for the check is retrieved from the configuration.

Return values
bool

Returns true if the product is the main product, false otherwise.

sortAwardsByOrder()

Sort the awards array by their order (ascending).

protected sortAwardsByOrder() : void

addIfNotEmpty()

Adds a key-value pair to the given array only if the value is not empty.

private addIfNotEmpty(array<string|int, mixed> &$array, string $key, mixed $value) : void

Handles both arrays and scalar values. For arrays, it checks if the array is non-empty. For scalar values, it trims and checks if the resulting string is not empty.

Parameters
$array : array<string|int, mixed>

The array to which the key-value pair may be added (passed by reference).

$key : string

The key under which the value should be added.

$value : mixed

The value to be checked and potentially added.

generateGroups()

Generates product groups based on specific group IDs and their attributes.

private generateGroups() : void

The function performs the following steps:

  1. Retrieves the list of group IDs from the configuration.
  2. For each group ID, it checks if the product belongs to the group by getting the attribute value.
  3. If the product is in the group, it performs a search query to find details about the group.
  4. The search results are then stored in the $this->productGroups array, with the group ID as the key.

generateSortedLogos()

Generates a sorted list of logo assets based on a predefined order and allowed MIME types.

private generateSortedLogos() : void

This method is typically used in the constructor of the Product class to organize logo assets.

The function performs the following steps:

  1. Retrieves the order of logos from the product attributes.
  2. Retrieves the allowed MIME types for logo assets from the configuration provider.
  3. Filters the assets to include only those with allowed MIME types.
  4. If an order is specified, sorts the filtered assets according to the specified order.
  5. If no order is specified, includes all filtered assets in the result.
  6. Assigns the resulting list of assets to the instance variable $this->logos.

getBannersFeedData()

Retrieves banner data for the feed.

private getBannersFeedData() : array<string|int, mixed>

Loops through all banners, filtering out those with missing or empty required attributes.

Return values
array<string|int, mixed>

A list of banners with their attributes.

getBasicInformationFeedData()

Constructs the basic information section of the Flixmedia feed.

private getBasicInformationFeedData() : array<string|int, mixed>

Only non-empty values are included in the returned array. Fields include brand, title, MPN, EAN, category, product category, and main image URL. The main image is included only if a valid URL is available.

Return values
array<string|int, mixed>

An array of basic product information for the feed.

getHeroSectionFeedData()

Prepares the hero section data for the Flixmedia feed.

private getHeroSectionFeedData() : array<string|int, mixed>

Filters out empty values to ensure only meaningful content is included. This includes basic product info (name, category, headline) and image gallery, where images are retrieved from primary and secondary asset sources.

Return values
array<string|int, mixed>

Hero section data for the feed.

getHighlightsFeedData()

Prepares the highlights section for the Flixmedia feed.

private getHighlightsFeedData() : array<string|int, mixed>

Retrieves highlight items from the product attributes and adds them only if the resulting array is not empty.

Return values
array<string|int, mixed>

Highlights data for the feed.

getImgsUrlArrayFromAssets()

Retrieves an array of image URLs from the given assets.

private getImgsUrlArrayFromAssets(array<string|int, mixed> $assets) : array<string|int, mixed>

Filters out any assets with empty 'url' values and returns only valid URLs.

Parameters
$assets : array<string|int, mixed>

The list of assets containing image data.

Return values
array<string|int, mixed>

An array of image URLs for the feed.

getLifestyleFeedData()

Prepares the lifestyle images section for the Flixmedia feed.

private getLifestyleFeedData() : array<string|int, mixed>

Retrieves lifestyle image URLs from the related assets and includes them only if there are any non-empty results.

Return values
array<string|int, mixed>

Lifestyle image data for the feed.

getLogosFeedData()

Prepares the logos section for the Flixmedia feed.

private getLogosFeedData() : array<string|int, mixed>

Extracts logo image URLs from the associated assets. If no valid images are found, returns an empty array.

Return values
array<string|int, mixed>

Logos data for the feed.

getTechSpecsFeedArray()

Retrieves technical specifications data for the feed.

private getTechSpecsFeedArray() : array<string|int, mixed>

Filters out empty specification values before returning.

Return values
array<string|int, mixed>

Technical specifications with their attributes.

loadAwards()

private loadAwards() : void

loadBanners()

Loads and initializes banner objects from raw banner IDs.

private loadBanners() : void
  • Transforms each raw banner ID using a helper function.
  • Attempts to create a new Banner instance for each ID and stores it in the $banners array.
  • Catches and logs any exceptions during Banner initialization, allowing the loop to continue.
  • Sorts the resulting banners by a defined order after loading.

loadRelations()

Loads related products by their IDs and creates `ProductCard` objects for each related product.

private loadRelations(array<string|int, mixed> $relations) : array<string|int, mixed>

This method iterates over an array of relation IDs, converting each ID to a slug format. For each relation, it attempts to create a Product object using createProductById and then wraps it into a ProductCard object. If an exception occurs during the creation process, the exception is logged, and the method proceeds to the next relation without stopping.

Parameters
$relations : array<string|int, mixed>

An array of related product IDs to be processed.

Return values
array<string|int, mixed>

Returns an array of ProductCard objects representing the related products.

resizeImageUrl()

Resizes the image URL using the Webentor\Core\Images\get_resized_cloud_image_url_by_url function.

private resizeImageUrl(string $url) : string

Images needs to have max width 1400px.

Parameters
$url : string

The URL of the image to resize.

Return values
string

The resized image URL.

sortAssetsByOrder()

Sorts assets based on a given order of asset names.

private sortAssetsByOrder(array<string|int, mixed> $logosAssets, array<string|int, mixed> $order) : array<string|int, mixed>
Parameters
$logosAssets : array<string|int, mixed>
$order : array<string|int, mixed>

Array of asset names specifying desired order.

Return values
array<string|int, mixed>

Sorted array of Asset objects.

sortBannersByOrder()

Sorts the banners stored in $this->banners based on the 'content_order' using the getOrder method.

private sortBannersByOrder() : void

transfromSpecAttributesToFeedFormat()

Transforms specification attributes to the required feed format.

private transfromSpecAttributesToFeedFormat(array<string|int, mixed> $attributes) : array<string|int, mixed>
Parameters
$attributes : array<string|int, mixed>

A list of specification attributes.

Return values
array<string|int, mixed>

The transformed specification attributes.


        
On this page

Search results