Plentymarkets interface documentation

AutomaticEmail

Contracts

AutomaticEmailContract

This service provides a method to initiate the automatic email delivery.

Namespace

Plenty\Modules\Helper\AutomaticEmail\Contracts

Methods
public sendAutomatic($email):bool

Send the automatic email.

Parameters

Name

Type

Description

$email

AutomaticEmail

Models

AutomaticEmail

A container with all needed data to initiate the automatic email delivery.

Namespace

Plenty\Modules\Helper\AutomaticEmail\Models

Methods
public toArray()

Returns this model as an array.

AutomaticEmailContact

The automatic email data for contact type emails.

Namespace

Plenty\Modules\Helper\AutomaticEmail\Models

Methods
public toArray()

Returns this model as an array.

AutomaticEmailData

The abstract base class for all automatic email data. Provides constants for the email type to be used.

Namespace

Plenty\Modules\Helper\AutomaticEmail\Models

Methods
public toArray()

Returns this model as an array.

AutomaticEmailNewsletter

The automatic email data for newsletter type emails.

Namespace

Plenty\Modules\Helper\AutomaticEmail\Models

Methods
public toArray()

Returns this model as an array.

AutomaticEmailOrder

The automatic email data for order type emails.

Namespace

Plenty\Modules\Helper\AutomaticEmail\Models

Methods
public toArray()

Returns this model as an array.

AutomaticEmailTemplate

Provides constants for the automatic email template names.

Namespace

Plenty\Modules\Helper\AutomaticEmail\Models

Methods
public toArray()

Returns this model as an array.

Helper

Configuration

GetApiCallLimits

GetApiCallLimits reads the values for the API call limits from the config and returns them as an array.

Namespace

Plenty\Modules\Helper\Configuration

Methods
public get():array

Contracts

UrlBuilderRepositoryContract

Repository Contract for retrieving image and item URLs

Namespace

Plenty\Modules\Helper\Contracts

Methods
public getImageUrl($path, $plentyId = null, $size = "", $fileType = "", $isExternalImage = false):string

Get the URL of an image.

Parameters

Name

Type

Description

$path

string

$plentyId

int

$size

string

$fileType

string

$isExternalImage

bool

public getItemUrl($itemId, $plentyId, $urlContent = "", $lang = "de", $useHttpsDomain = true):string

Get the URL of an item.

Parameters

Name

Type

Description

$itemId

int

$plentyId

int

$urlContent

string

$lang

string

$useHttpsDomain

bool

Exceptions

EncryptionException

Class EncryptionException

Namespace

Plenty\Modules\Helper\Exceptions

Methods
public __construct($message, $code):void
Parameters

Name

Type

Description

$message

string

$code

int

Models

KeyValue

key value data

Namespace

Plenty\Modules\Helper\Models

Methods
public get($key, $default = null):mixed
Parameters

Name

Type

Description

$key

string

$default

Services

ArrayHelper

Helper class for arrays

Namespace

Plenty\Modules\Helper\Services

Methods
public buildMapFromObjectList($list, $keyField, $valueField):Plenty\Modules\Helper\Models\KeyValue
Return type: KeyValue

Build an array out of the specified object list.

Parameters

Name

Type

Description

$list

$keyField

string

$valueField

string

StringEncodingService

Service for encoding strings

Namespace

Plenty\Modules\Helper\Services

Methods
public toDatabase($sString):string

Method converts a string to self::DATABASE_ENCODING coding

Parameters

Name

Type

Description

$sString

string

public toEmail($sString):string

Method converts a string to self::EMAIL_ENCODING coding

Parameters

Name

Type

Description

$sString

string

public toWebshop($sString, $sTargetEncoding = self::WEBSHOP_ENCODING):string

Method converts a string to self::WEBSHOP_ENCODING coding

Parameters

Name

Type

Description

$sString

string

$sTargetEncoding

string

public toAdmin($sString, $sTargetEncoding = self::ADMIN_ENCODING):string

Method converts a string to the sended coding. Default will be self::ADMIN_ENCODING coding used

Parameters

Name

Type

Description

$sString

string

$sTargetEncoding

string

public toGwt($sString):string

Method converts a string to the sended coding

Parameters

Name

Type

Description

$sString

string

public toExport($sString, $sTargetEncoding = self::EXPORT_ENCODING):string

Method converts a string to the sended coding. Default will be self::EXPORT_ENCODING coding used

Parameters

Name

Type

Description

$sString

string

$sTargetEncoding

string

public toLegacy($sString):string

Method converts a string to self::LEGACY_ENCODING coding

Parameters

Name

Type

Description

$sString

string

public toPDF($sString, $sTargetEncoding = self::PDF_ENCODING):string

Method converts a string to self::PDF_ENCODING coding

Parameters

Name

Type

Description

$sString

string

The string to be encoded.

$sTargetEncoding

string

The target encoding (since plentymarkets version 5.100). [optional, default=PlentyCoding::PDF_ENCODING]

public toXML($string, $targetEncoding = self::XML_ENCODING):string

Method converts a string to self::XML_ENCODING coding.

Parameters

Name

Type

Description

$string

string

The string to be encoded.

$targetEncoding

string

The target encoding (since plentymarkets version 5.100). [optional, default=PlentyCoding::XML_ENCODING]

public detect_encoding($sString):string

Method returns the encoding of one string

Parameters

Name

Type

Description

$sString

string

public convertArray($array, $sTargetEncoding = self::UTF8_ENCODING, $convertKey = false):array

Method converts a multidimensional array to the desired coding

Parameters

Name

Type

Description

$array

array

$sTargetEncoding

string

$convertKey

bool

public cutTextForDB($text, $lenghtIntoDB):string

cut the given text to fit for db insert.

Parameters

Name

Type

Description

$text

string

$lenghtIntoDB

int

public isValidUtf8($string):int

Checks whether the given string is valid utf-8.

Parameters

Name

Type

Description

$string

string

WebstoreHelper

Webstore Helper Service

Namespace

Plenty\Modules\Helper\Services

Methods
public getCurrentWebstoreConfiguration():Plenty\Modules\System\Models\WebstoreConfiguration
Return type: WebstoreConfiguration

Get the configuration of the current webstore.