AfterbuyCatalogRepository
in package
Table of Contents
- $connection : Connection
- __construct() : mixed
- addCatalog() : void
- getCatalogsByParentId() : array<string|int, mixed>
- Returns an array of AfterbuyCatalogs which are children of a parent defined by its CatalogID.
- getCategoryIdByCatalogId() : int|null
- getCategoryIdsForAfterbuyProductId() : array<string|int, mixed>
- getProductIdsForAfterbuyCatalogId() : array<string|int, mixed>
- Returns a list (array) of Gambio products_ids mapped to a catalog.
- linkCatalogIdToCategoryId() : void
- unlinkCategory() : void
- wipeCatalogs() : void
- addProductToCatalog() : void
- deleteProductsFromCatalog() : void
- isValidCategory() : bool
Properties
$connection
private
Connection
$connection
Methods
__construct()
public
__construct(Connection $connection) : mixed
Parameters
- $connection : Connection
Return values
mixed —addCatalog()
public
addCatalog(AfterbuyCatalog $catalog) : void
Parameters
- $catalog : AfterbuyCatalog
Return values
void —getCatalogsByParentId()
Returns an array of AfterbuyCatalogs which are children of a parent defined by its CatalogID.
public
getCatalogsByParentId(int $parentCatalogId) : array<string|int, mixed>
Parameters
- $parentCatalogId : int
Tags
Return values
array<string|int, mixed> —getCategoryIdByCatalogId()
public
getCategoryIdByCatalogId(int $catalogId) : int|null
Parameters
- $catalogId : int
Tags
Return values
int|null —getCategoryIdsForAfterbuyProductId()
public
getCategoryIdsForAfterbuyProductId(int $afterbuyProductId) : array<string|int, mixed>
Parameters
- $afterbuyProductId : int
Tags
Return values
array<string|int, mixed> —getProductIdsForAfterbuyCatalogId()
Returns a list (array) of Gambio products_ids mapped to a catalog.
public
getProductIdsForAfterbuyCatalogId(int $catalogId) : array<string|int, mixed>
Parameters
- $catalogId : int
Tags
Return values
array<string|int, mixed> —linkCatalogIdToCategoryId()
public
linkCatalogIdToCategoryId(int $catalogId, int $categoryId) : void
Parameters
- $catalogId : int
- $categoryId : int
Tags
Return values
void —unlinkCategory()
public
unlinkCategory(int $categoryId) : void
Parameters
- $categoryId : int
Return values
void —wipeCatalogs()
public
wipeCatalogs() : void
Return values
void —addProductToCatalog()
protected
addProductToCatalog(int $catalogId, int $productId) : void
Parameters
- $catalogId : int
- $productId : int
Tags
Return values
void —deleteProductsFromCatalog()
protected
deleteProductsFromCatalog(int $catalogId) : void
Parameters
- $catalogId : int
Tags
Return values
void —isValidCategory()
protected
isValidCategory(int $categoryId) : bool
Parameters
- $categoryId : int