CatalogCategorySync
in package
implements
LoggerAwareInterface
Interfaces, Classes and Traits
- LoggerAwareInterface
Table of Contents
- $catalogRepository : AfterbuyCatalogRepository
- $logger : LoggerInterface
- $productWriteService : ProductWriteServiceInterface
- $readService : CategoryReadServiceInterface
- $writeService : CategoryWriteServiceInterface
- __construct() : mixed
- importCategoryImageFromUrl() : string
- setLogger() : void
- syncCategoriesToCatalogs() : void
- Creates/updates categories to match the catalogs provided by AfterbuyCatalogRepository
- createCategoryFromCatalog() : int
- updateCategoryFromCatalog() : void
Properties
$catalogRepository
private
AfterbuyCatalogRepository
$catalogRepository
$logger
private
LoggerInterface
$logger
$productWriteService
private
ProductWriteServiceInterface
$productWriteService
$readService
private
CategoryReadServiceInterface
$readService
$writeService
private
CategoryWriteServiceInterface
$writeService
Methods
__construct()
public
__construct(AfterbuyCatalogRepository $catalogRepository, CategoryReadServiceInterface $readService, CategoryWriteServiceInterface $writeService, ProductWriteServiceInterface $productWriteService) : mixed
Parameters
- $catalogRepository : AfterbuyCatalogRepository
- $readService : CategoryReadServiceInterface
- $writeService : CategoryWriteServiceInterface
- $productWriteService : ProductWriteServiceInterface
Return values
mixed —importCategoryImageFromUrl()
public
importCategoryImageFromUrl(string $imageUrl) : string
Parameters
- $imageUrl : string
Tags
Return values
string —setLogger()
public
setLogger(LoggerInterface $logger) : void
Parameters
- $logger : LoggerInterface
Return values
void —syncCategoriesToCatalogs()
Creates/updates categories to match the catalogs provided by AfterbuyCatalogRepository
public
syncCategoriesToCatalogs(int $parentCategoryId, int $parentCatalogId) : void
Parameters
- $parentCategoryId : int
- $parentCatalogId : int
Tags
Return values
void —createCategoryFromCatalog()
protected
createCategoryFromCatalog(AfterbuyCatalog $catalog, int $parentCategoryId) : int
Parameters
- $catalog : AfterbuyCatalog
- $parentCategoryId : int
Return values
int —ID of newly created category
updateCategoryFromCatalog()
protected
updateCategoryFromCatalog(int $categoryId, AfterbuyCatalog $catalog, int $parentCategoryId) : void
Parameters
- $categoryId : int
- $catalog : AfterbuyCatalog
- $parentCategoryId : int