DataExchange

Contracts

CSVGenerator

generator for csv content

Namespace

Plenty\Modules\DataExchange\Contracts

Methods

public setDelimiter(string $delimiter):void
Parameters
string $delimiter
public setEnclosure(string $enclosure):void
Parameters
string $enclosure
public addCSVContent(array $data):void
Parameters
array $data
public addBulkCSVContent(string $data):void
Parameters
string $data
public addContent(string $content):void
Parameters
string $content
public generateContent($resultData, array $formatSettings = []):void
Parameters
$resultData
array $formatSettings

CSVPluginGenerator

generator for csv content

Namespace

Plenty\Modules\DataExchange\Contracts

Methods

public setDelimiter(string $delimiter):void
Parameters
string $delimiter
public setEnclosure(string $enclosure):void
Parameters
string $enclosure
public addCSVContent(array $data):void
Parameters
array $data
public addBulkCSVContent(string $data):void
Parameters
string $data
public addContent(string $content):void
Parameters
string $content
public generatePluginContent($resultData, array $formatSettings = [], array $filter = []):void
Parameters
$resultData
array $formatSettings
array $filter

ExportRepositoryContract

Namespace

Plenty\Modules\DataExchange\Contracts

Methods

public create(array $data):Export
Parameters
array $data
public update(array $data, int $exportId):Export
Parameters
array $data
int $exportId
public delete(int $exportId):bool
Parameters
int $exportId
public search(array $params = [], array $with = [], array $columns = []):PaginatedResult
Parameters
array $params
array $with
array $columns
public findById(int $exportId, array $with = []):Export
Parameters
int $exportId
array $with

Filters

Filters

Namespace

Plenty\Modules\DataExchange\Contracts

Methods

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

Generator

Generator

Namespace

Plenty\Modules\DataExchange\Contracts

Methods

public addContent(string $content):void
Parameters
string $content
public generateContent($resultData, array $formatSettings = []):void
Parameters
$resultData
array $formatSettings

Output

Output

Namespace

Plenty\Modules\DataExchange\Contracts

Methods

public out(string $resource, array $outputParams = [], Export
 $export = null):void

process export output

Parameters
string $resource filename to ressource
array $outputParams
Export $export

PluginGenerator

PluginGenerator

Namespace

Plenty\Modules\DataExchange\Contracts

Methods

public addContent(string $content):void
Parameters
string $content
public generatePluginContent($resultData, array $formatSettings = [], array $filter = []):void
Parameters
$resultData
array $formatSettings
array $filter

ResultFields

ResultFields

Namespace

Plenty\Modules\DataExchange\Contracts

Methods

public generateResultFields(array $formatSettings = []):array
Parameters
array $formatSettings
public setGroupByList(array $groupByList):void
Parameters
array $groupByList
public setOrderByList(array $orderByList):void
Parameters
array $orderByList

XMLGenerator

generator for xml content

Namespace

Plenty\Modules\DataExchange\Contracts

Properties

Type Name Description
version
encoding
formatOutput
preserveWhiteSpace

Methods

public init(string $rootName):void

Initializes the xml document and the root element.

Parameters
string $rootName
public root():DOMElement
public build():void

Build the XML.

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

Create an XML element.

Parameters
string $name
$value
public createCDATASection(string $data):DOMCdataSection

Create a CDATA section.

Parameters
string $data
public createAttribute(string $name, $value = null):DOMAttr

Create an XML attribute.

Parameters
string $name
$value
public createTextNode(string $content):DOMText

Create new text node.

Parameters
string $content
public addContent(string $content):void
Parameters
string $content
public generateContent($resultData, array $formatSettings = []):void
Parameters
$resultData
array $formatSettings

XMLPluginGenerator

generator for xml content

Namespace

Plenty\Modules\DataExchange\Contracts

Properties

Type Name Description
version
encoding
formatOutput
preserveWhiteSpace

Methods

public init(string $rootName):void

Initializes the xml document and the root element.

Parameters
string $rootName
public root():DOMElement
public build():void

Build the XML.

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

Create an XML element.

Parameters
string $name
$value
public createCDATASection(string $data):DOMCdataSection

Create a CDATA section.

Parameters
string $data
public createAttribute(string $name, $value = null):DOMAttr

Create an XML attribute.

Parameters
string $name
$value
public createTextNode(string $content):DOMText

Create new text node.

Parameters
string $content
public addContent(string $content):void
Parameters
string $content
public generatePluginContent($resultData, array $formatSettings = [], array $filter = []):void
Parameters
$resultData
array $formatSettings
array $filter

Models

Export

Export model

Namespace

Plenty\Modules\DataExchange\Models

Properties

Type Name Description
int id export id
string name export name
string type export type
int limit maximum number of entries
string createdAt created at date timestamp
string updatedAt last update date timestamp
string formatKey the format key
string outputType the output type
int generateCache if cache should be generated
array filters list of filters defined by backend users
array outputParams list of output params
array formatSettings list of format settings

Methods

public toArray()

Returns this model as an array.

Filter

export filter

Namespace

Plenty\Modules\DataExchange\Models

Properties

Type Name Description
int id filter id
string createdAt created at date timestamp
string updatedAt last update date timestamp
int exportId depending export id
string key filter key
string value filter value

Methods

public toArray()

Returns this model as an array.

FormatSetting

format setting

Namespace

Plenty\Modules\DataExchange\Models

Properties

Type Name Description
int id format setting id
string createdAt created at date timestamp
string updatedAt last update date timestamp
int exportId depending export id
string key format setting key
string value format setting value

Methods

public toArray()

Returns this model as an array.

OutputParam

output params

Namespace

Plenty\Modules\DataExchange\Models

Properties

Type Name Description
int id output param id
string createdAt created at date timestamp
string updatedAt last update date timestamp
int exportId depending export id
string key output param key
string value 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(string $exportKey, string $resultFieldsClass, string $generatorClass, string $filterClass = "", bool $isPlugin = false, bool $generatorExecute = false, string $exportType = "item"):void
Parameters
string $exportKey
string $resultFieldsClass
string $generatorClass
string $filterClass
bool $isPlugin
bool $generatorExecute
string $exportType

Resource

Contracts

ResourceLoaderContract

Repository Contract for ResourceLoader

Namespace

Plenty\Modules\DataExchange\Resource\Contracts

Methods

public getResource(array $sourceOptions):void
Parameters
array $sourceOptions
public getResourceBag(array $sourceOptions):ResourceBag
Parameters
array $sourceOptions
public validateSourceOptions(array $sourceOptions):void
Parameters
array $sourceOptions
public archiveFile(array $sourceOptions):void
Parameters
array $sourceOptions
public getLoaderType():string

ResourceParserContract

Repository Contract for ResourceParser

Namespace

Plenty\Modules\DataExchange\Resource\Contracts

Methods

public next($resource, array $parseOptions):array
Parameters
$resource
array $parseOptions
public getParserType():string

Factories

ResourceLoaderFactory

Namespace

Plenty\Modules\DataExchange\Resource\Factories

Methods

public getResourceLoaderByType(string $type):ResourceLoaderContract
Parameters
string $type
public addLoader(ResourceLoaderContract
 $loader):void
Parameters
ResourceLoaderContract $loader

ResourceParserFactory

Namespace

Plenty\Modules\DataExchange\Resource\Factories

Methods

public getResourceParserByType(string $type):ResourceParserContract
Parameters
string $type
public addParser(ResourceParserContract
 $parser):void
Parameters
ResourceParserContract $parser

Models

ResourceBag

ResourceBag

Namespace

Plenty\Modules\DataExchange\Resource\Models

Methods

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