Plentymarkets interface documentation

DataExchange

Contracts

CSVGenerator

generator for csv content

Namespace

Plenty\Modules\DataExchange\Contracts

Methods
public setDelimiter($delimiter):void
Parameters

Name

Type

Description

$delimiter

string

public setEnclosure($enclosure):void
Parameters

Name

Type

Description

$enclosure

string

public addCSVContent($data):void
Parameters

Name

Type

Description

$data

array

public addBulkCSVContent($data):void
Parameters

Name

Type

Description

$data

string

public addContent($content):void
Parameters

Name

Type

Description

$content

string

public generateContent($resultData, $formatSettings = []):void
Parameters

Name

Type

Description

$resultData

$formatSettings

array

CSVPluginGenerator

generator for csv content

Namespace

Plenty\Modules\DataExchange\Contracts

Methods
public setDelimiter($delimiter):void
Parameters

Name

Type

Description

$delimiter

string

public setEnclosure($enclosure):void
Parameters

Name

Type

Description

$enclosure

string

public addCSVContent($data):void
Parameters

Name

Type

Description

$data

array

public addBulkCSVContent($data):void
Parameters

Name

Type

Description

$data

string

public addContent($content):void
Parameters

Name

Type

Description

$content

string

public generatePluginContent($resultData, $formatSettings = [], $filter = []):void
Parameters

Name

Type

Description

$resultData

$formatSettings

array

$filter

array

ExportRepositoryContract

Namespace

Plenty\Modules\DataExchange\Contracts

Methods
public create($data):Plenty\Modules\DataExchange\Models\Export
Return type: Export
Parameters

Name

Type

Description

$data

array

public update($data, $exportId):Plenty\Modules\DataExchange\Models\Export
Return type: Export
Parameters

Name

Type

Description

$data

array

$exportId

int

public delete($exportId):bool
Parameters

Name

Type

Description

$exportId

int

Return type: PaginatedResult
Parameters

Name

Type

Description

$params

array

$with

array

$columns

array

public findById($exportId, $with = []):Plenty\Modules\DataExchange\Models\Export
Return type: Export
Parameters

Name

Type

Description

$exportId

int

$with

array

Filters

Filters

Namespace

Plenty\Modules\DataExchange\Contracts

Methods
public generateFilters($formatSettings = []):array
Parameters

Name

Type

Description

$formatSettings

array

Generator

Generator

Namespace

Plenty\Modules\DataExchange\Contracts

Methods
public addContent($content):void
Parameters

Name

Type

Description

$content

string

public generateContent($resultData, $formatSettings = []):void
Parameters

Name

Type

Description

$resultData

$formatSettings

array

Output

Output

Namespace

Plenty\Modules\DataExchange\Contracts

Methods
public out($resource, $outputParams = [], $export = null):void

process export output

Parameters

Name

Type

Description

$resource

string

filename to ressource

$outputParams

array

$export

Export

PluginGenerator

PluginGenerator

Namespace

Plenty\Modules\DataExchange\Contracts

Methods
public addContent($content):void
Parameters

Name

Type

Description

$content

string

public generatePluginContent($resultData, $formatSettings = [], $filter = []):void
Parameters

Name

Type

Description

$resultData

$formatSettings

array

$filter

array

ResultFields

ResultFields

Namespace

Plenty\Modules\DataExchange\Contracts

Methods
public generateResultFields($formatSettings = []):array
Parameters

Name

Type

Description

$formatSettings

array

public setGroupByList($groupByList):void
Parameters

Name

Type

Description

$groupByList

array

public setOrderByList($orderByList):void
Parameters

Name

Type

Description

$orderByList

array

XMLGenerator

generator for xml content

Namespace

Plenty\Modules\DataExchange\Contracts

Properties
Name Type Description

version

encoding

formatOutput

preserveWhiteSpace

Methods
public init($rootName):void

Initializes the xml document and the root element.

Parameters

Name

Type

Description

$rootName

string

public root():\DOMElement
public build():void

Build the XML.

public createElement($name, $value = null):\DOMElement

Create an XML element.

Parameters

Name

Type

Description

$name

string

$value

public createCDATASection($data):\DOMCdataSection

Create a CDATA section.

Parameters

Name

Type

Description

$data

string

public createAttribute($name, $value = null):\DOMAttr

Create an XML attribute.

Parameters

Name

Type

Description

$name

string

$value

public createTextNode($content):\DOMText

Create new text node.

Parameters

Name

Type

Description

$content

string

public addContent($content):void
Parameters

Name

Type

Description

$content

string

public generateContent($resultData, $formatSettings = []):void
Parameters

Name

Type

Description

$resultData

$formatSettings

array

XMLPluginGenerator

generator for xml content

Namespace

Plenty\Modules\DataExchange\Contracts

Properties
Name Type Description

version

encoding

formatOutput

preserveWhiteSpace

Methods
public init($rootName):void

Initializes the xml document and the root element.

Parameters

Name

Type

Description

$rootName

string

public root():\DOMElement
public build():void

Build the XML.

public createElement($name, $value = null):\DOMElement

Create an XML element.

Parameters

Name

Type

Description

$name

string

$value

public createCDATASection($data):\DOMCdataSection

Create a CDATA section.

Parameters

Name

Type

Description

$data

string

public createAttribute($name, $value = null):\DOMAttr

Create an XML attribute.

Parameters

Name

Type

Description

$name

string

$value

public createTextNode($content):\DOMText

Create new text node.

Parameters

Name

Type

Description

$content

string

public addContent($content):void
Parameters

Name

Type

Description

$content

string

public generatePluginContent($resultData, $formatSettings = [], $filter = []):void
Parameters

Name

Type

Description

$resultData

$formatSettings

array

$filter

array

Models

Export

Export model

Namespace

Plenty\Modules\DataExchange\Models

Properties
Name Type Description

id

int

export id

name

string

export name

type

string

export type

limit

int

maximum number of entries

createdAt

string

created at date timestamp

updatedAt

string

last update date timestamp

formatKey

string

the format key

outputType

string

the output type

generateCache

int

if cache should be generated

filters

array

list of filters defined by backend users

outputParams

array

list of output params

formatSettings

array

list of format settings

Methods
public toArray()

Returns this model as an array.

Filter

export filter

Namespace

Plenty\Modules\DataExchange\Models

Properties
Name Type Description

id

int

filter id

createdAt

string

created at date timestamp

updatedAt

string

last update date timestamp

exportId

int

depending export id

key

string

filter key

value

string

filter value

Methods
public toArray()

Returns this model as an array.

FormatSetting

format setting

Namespace

Plenty\Modules\DataExchange\Models

Properties
Name Type Description

id

int

format setting id

createdAt

string

created at date timestamp

updatedAt

string

last update date timestamp

exportId

int

depending export id

key

string

format setting key

value

string

format setting value

Methods
public toArray()

Returns this model as an array.

OutputParam

output params

Namespace

Plenty\Modules\DataExchange\Models

Properties
Name Type Description

id

int

output param id

createdAt

string

created at date timestamp

updatedAt

string

last update date timestamp

exportId

int

depending export id

key

string

output param key

value

string

output param value

Methods
public toArray()

Returns this model as an array.

Services

ExportPresetContainer

Register export presets

Namespace

Plenty\Modules\DataExchange\Services

Methods
public add($exportKey, $resultFieldsClass, $generatorClass, $filterClass = "", $isPlugin = false, $generatorExecute = false, $exportType = "item", $restrictRows = true):void
Parameters

Name

Type

Description

$exportKey

string

$resultFieldsClass

string

$generatorClass

string

$filterClass

string

$isPlugin

bool

$generatorExecute

bool

$exportType

string

$restrictRows

bool

Resource

Contracts

ResourceLoaderContract

Repository Contract for ResourceLoader

Namespace

Plenty\Modules\DataExchange\Resource\Contracts

Methods
public getResource($sourceOptions):void
Parameters

Name

Type

Description

$sourceOptions

array

public getResourceBag($sourceOptions):Plenty\Modules\DataExchange\Resource\Models\ResourceBag
Return type: ResourceBag
Parameters

Name

Type

Description

$sourceOptions

array

public validateSourceOptions($sourceOptions):void
Parameters

Name

Type

Description

$sourceOptions

array

public archiveFile($sourceOptions):void
Parameters

Name

Type

Description

$sourceOptions

array

public getLoaderType():string

ResourceParserContract

Repository Contract for ResourceParser

Namespace

Plenty\Modules\DataExchange\Resource\Contracts

Methods
Parameters

Name

Type

Description

$resource

$parseOptions

array

public getParserType():string

Factories

ResourceLoaderFactory

Namespace

Plenty\Modules\DataExchange\Resource\Factories

Methods
public getResourceLoaderByType($type):Plenty\Modules\DataExchange\Resource\Contracts\ResourceLoaderContract
Return type: ResourceLoaderContract
Parameters

Name

Type

Description

$type

string

public addLoader($loader):void
Parameters

Name

Type

Description

$loader

ResourceLoaderContract

ResourceParserFactory

Namespace

Plenty\Modules\DataExchange\Resource\Factories

Methods
public getResourceParserByType($type):Plenty\Modules\DataExchange\Resource\Contracts\ResourceParserContract
Return type: ResourceParserContract
Parameters

Name

Type

Description

$type

string

public addParser($parser):void
Parameters

Name

Type

Description

$parser

ResourceParserContract

Models

ResourceBag

ResourceBag

Namespace

Plenty\Modules\DataExchange\Resource\Models

Methods
public getResource():void
public getMd5():void