Catalog

Contracts

CatalogContentRepositoryContract

To be written

Namespace

Plenty\Modules\Catalog\Contracts

Methods

public get(string $id):array

Get the content of the catalog

Parameters
string $id
public update(string $id, array $data):array

Update the content of the catalog

Parameters
string $id
array $data

CatalogExportFilterServiceContract

To be written

Namespace

Plenty\Modules\Catalog\Contracts

Methods

public applyFilters(DocumentSearch
 $documentSearch, array $config):void
Parameters
DocumentSearch $documentSearch
array $config

CatalogExportRepositoryContract

To be written

Namespace

Plenty\Modules\Catalog\Contracts

Methods

public exportById(string $id):CatalogExportServiceContract
Parameters
string $id

CatalogExportServiceContract

To be written

Namespace

Plenty\Modules\Catalog\Contracts

Methods

public setAdditionalFields(array $additionalFields):void
Parameters
array $additionalFields
public addMutator(callable $mutator):void
Parameters
callable $mutator
public setSettings(array $settings):void
Parameters
array $settings
public setNumberOfDocumentsPerShard(int $numberOfDocumentsPerShard):void
Parameters
int $numberOfDocumentsPerShard
public setItemsPerPage(int $itemsPerPage):void
Parameters
int $itemsPerPage
public setUpdatedSince(Carbon
 $timestamp):void
Parameters
Carbon $timestamp
public getResult():CatalogExportResult

CatalogRepositoryContract

To be written

Namespace

Plenty\Modules\Catalog\Contracts

Methods

public create(array $data):Catalog

Create a catalog

Parameters
array $data
public update(string $id, array $data):Catalog

Update a catalog

Parameters
string $id
array $data
public get(string $id):Catalog

Get a catalog

Parameters
string $id
public delete(string $id):bool

Delete a catalog

Parameters
string $id
public copy(array $data):array

Copy a catalog or multiple catalogs

Parameters
array $data
public copyCatalogFormat(string $catalogId, array $data):array

Copy a catalog format

Parameters
string $catalogId
array $data
public all(int $page = 1, int $perPage = 25):PaginatedResult

Get list of all catalogs

Parameters
int $page
int $perPage
public activate(string $id, bool $active):array

Activate a catalog

Parameters
string $id
bool $active
public setFilters(array $filters = []):void

Sets the filter array.

Parameters
array $filters
public getFilters():void

Returns the filter array.

public getConditions():void

Returns a collection of parsed filters as Condition object

public clearFilters():void

Clears the filter array.

CatalogTemplateProviderContract

To be written

Namespace

Plenty\Modules\Catalog\Contracts

Methods

public getMappings():array
public getFilter():array
public getPreMutators():array
public getPostMutators():array
public getSkuCallback():callable
public getSettings():array
public getMetaInfo():array

DataProviderContract

To be written

Namespace

Plenty\Modules\Catalog\Contracts

Methods

public getData(string $query = ""):array
Parameters
string $query
public setTemplate(TemplateContract
 $template):void
Parameters
TemplateContract $template
public setMapping(array $mapping):void
Parameters
array $mapping

FieldGroupRepositoryContract

To be written

Namespace

Plenty\Modules\Catalog\Contracts

Methods

public getFields(string $id, int $page, int $itemsPerPage, string $parentId = null):PaginatedResult

Get list of fields

Parameters
string $id
int $page
int $itemsPerPage
string $parentId
public getFieldById(string $id, string $fieldId):array

Get field by id

Parameters
string $id
string $fieldId
public getFieldsByCatalogId(string $id, string $catalogId):array

Get Fields by id of the catalog

Parameters
string $id
string $catalogId
public fieldValuesTree(string $id, int $page, int $itemsPerPage):array
Parameters
string $id
int $page
int $itemsPerPage

NestedDataProviderContract

To be written

Namespace

Plenty\Modules\Catalog\Contracts

Methods

public getNestedData(string $parentId, string $query = "", array $meta = []):array
Parameters
string $parentId
string $query
array $meta
public getDataByValue(string $id):array
Parameters
string $id
public getData(string $query = ""):array
Parameters
string $query
public setTemplate(TemplateContract
 $template):void
Parameters
TemplateContract $template
public setMapping(array $mapping):void
Parameters
array $mapping

TemplateContainerContract

To be written

Namespace

Plenty\Modules\Catalog\Contracts

Methods

public register(string $name, string $type, string $providerClass = "", string $exportType = "Plenty\Modules\Catalog\Dummy\VariationCatalogExportType"):TemplateContract
Parameters
string $name
string $type
string $providerClass
string $exportType
public getTemplates():array
public getTemplate(string $identifier):TemplateContract
Parameters
string $identifier

TemplateContract

To be written

Namespace

Plenty\Modules\Catalog\Contracts

Methods

public getName():string
public getType():string
public getExportType():string
public getMappings():array
public addMapping(array $mapping):void
Parameters
array $mapping
public addMutator(callable $callback):void
Parameters
callable $callback
public addPreMutator(callable $callback):void
Parameters
callable $callback
public addPostMutator(callable $callback):void
Parameters
callable $callback
public getFilter():array
public addFilter(array $filter):void
Parameters
array $filter
public getIdentifier():string
public getMutators():array
public getPreMutators():array
public getPostMutators():array
public setSkuCallback(callable $callback):void
Parameters
callable $callback
public getSkuCallback():callable
public addSetting(array $setting):void
Parameters
array $setting
public getSettings():array
public setMetaInfo(array $meta):void
Parameters
array $meta
public getMetaInfo():array
public boot(CatalogTemplateProviderContract
 $provider):void
Parameters
CatalogTemplateProviderContract $provider
public isBooted():bool
public toArray():array

Get the instance as an array.

public jsonSerialize():void

TemplateRepositoryContract

To be written

Namespace

Plenty\Modules\Catalog\Contracts

Methods

public getTemplates():array

Get list of templates

public getTemplate(string $id, string $data):array

Get template

Parameters
string $id
string $data
public getMappings(string $id):array

Get list of mappings

Parameters
string $id
public getMapping(string $id, string $mappingId):array

Get mapping

Parameters
string $id
string $mappingId
public getMappingData(string $id, string $mappingId, string $parentId = null):array

Get mapping data

Parameters
string $id
string $mappingId
string $parentId
public getMappingDataById(string $id, string $mappingId, string $dataId):array

Get mapping data by id

Parameters
string $id
string $mappingId
string $dataId
public test(string $id):void

Test export of a catalog

Parameters
string $id
public getAllMappings(string $id):array

Get all mappings

Parameters
string $id

DataProviders

BaseDataProvider

To be written

Namespace

Plenty\Modules\Catalog\DataProviders

Methods

public getRows():array
public setTemplate(TemplateContract
 $template):void
Parameters
TemplateContract $template
public setMapping(array $mapping):void
Parameters
array $mapping

KeyDataProvider

To be written

Namespace

Plenty\Modules\Catalog\DataProviders

Methods

public getKey():string
public getRows():array
public setTemplate(TemplateContract
 $template):void
Parameters
TemplateContract $template
public setMapping(array $mapping):void
Parameters
array $mapping

NestedKeyDataProvider

To be written

Namespace

Plenty\Modules\Catalog\DataProviders

Methods

public getKey():string
public getNestedRows($parentId):array
Parameters
$parentId
public getMetaData():void
public getNestedData(string $parentId, string $query = "", array $meta = []):array
Parameters
string $parentId
string $query
array $meta
public getRows():array
public setTemplate(TemplateContract
 $template):void
Parameters
TemplateContract $template
public setMapping(array $mapping):void
Parameters
array $mapping
public getDataByValue(string $id):array
Parameters
string $id

Models

Catalog

The catalog model

Namespace

Plenty\Modules\Catalog\Models

Properties

Type Name Description
array data
string name
string template
string id
bool active
bool showMandatoryFields

Methods

public toArray()

Returns this model as an array.

CatalogExportResult

To be written

Namespace

Plenty\Modules\Catalog\Models

Methods

public toArray()

Returns this model as an array.

Templates

BaseTemplateProvider

foo

Namespace

Plenty\Modules\Catalog\Templates

Methods

public getMappings():array
public getFilter():array
public getPreMutators():array
public getPostMutators():array
public getSkuCallback():callable
public getSettings():array
public getMetaInfo():array

Template

foo

Namespace

Plenty\Modules\Catalog\Templates

Methods

public getMappings():array
public addMapping(array $section):void
Parameters
array $section
public addMutator(callable $callback):void
Parameters
callable $callback
public getMutators():array
public addPreMutator(callable $callback):void
Parameters
callable $callback
public addPostMutator(callable $callback):void
Parameters
callable $callback
public getFilter():array
public addFilter(array $filter):void
Parameters
array $filter
public getPreMutators():array
public getPostMutators():array
public setSkuCallback(callable $callback):void
Parameters
callable $callback
public getSkuCallback():callable
public addSetting(array $setting):void
Parameters
array $setting
public getSettings():array
public setMetaInfo(array $meta):void
Parameters
array $meta
public getMetaInfo():void
public getName():string
public getExportType():string
public getType():string
public toArray():void
public jsonSerialize():void
public getIdentifier():string
public boot(CatalogTemplateProviderContract
 $provider):void
Parameters
CatalogTemplateProviderContract $provider
public isBooted():bool