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 UrlBuilder

Namespace

Plenty\Modules\Helper\Contracts

Methods

public getImageUrl(string $path, int $plentyId = null, string $size = "", string $fileType = "", bool $isExternalImage = false):string
Parameters
string $path
int $plentyId
string $size
string $fileType
bool $isExternalImage
public getItemUrl(int $itemId, int $plentyId, string $urlContent = "", string $lang = "de", bool $useHttpsDomain = true):string
Parameters
int $itemId
int $plentyId
string $urlContent
string $lang
bool $useHttpsDomain

Exceptions

EncryptionException

Class EncryptionException

Namespace

Plenty\Modules\Helper\Exceptions

Methods

public __construct(string $message, int $code):void
Parameters
string $message
int $code

Models

KeyValue

key value data

Namespace

Plenty\Modules\Helper\Models

Methods

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

Services

ArrayHelper

helper class for arrays

Namespace

Plenty\Modules\Helper\Services

Methods

public buildMapFromObjectList($list, string $keyField, string $valueField):KeyValue
Parameters
$list
string $keyField
string $valueField

StringEncodingService

Service for encoding strings

Namespace

Plenty\Modules\Helper\Services

Methods

public toDatabase(string $sString):string

Method converts a string to self::DATABASE_ENCODING coding

Parameters
string $sString
public toEmail(string $sString):string

Method converts a string to self::EMAIL_ENCODING coding

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

Method converts a string to self::WEBSHOP_ENCODING coding

Parameters
string $sString
string $sTargetEncoding [optional default=PlentyCoding::WEBSHOP_ENCODING]
public toAdmin(string $sString, string $sTargetEncoding = self::ADMIN_ENCODING):string

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

Parameters
string $sString
string $sTargetEncoding [optional default=PlentyCoding::ADMIN_ENCODING]
public toGwt(string $sString):string

Method converts a string to the sended coding

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

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

Parameters
string $sString
string $sTargetEncoding [optional default=PlentyCoding::EXPORT_ENCODING]
public toLegacy(string $sString):string

Method converts a string to self::LEGACY_ENCODING coding

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

Method converts a string to self::PDF_ENCODING coding

Parameters
string $sString The string to be encoded.
string $sTargetEncoding The target encoding (since plentymarkets version 5.100). [optional, default=PlentyCoding::PDF_ENCODING]
public toXML(string $string, string $targetEncoding = self::XML_ENCODING):string

Method converts a string to self::XML_ENCODING coding.

Parameters
string $string The string to be encoded.
string $targetEncoding The target encoding (since plentymarkets version 5.100). [optional, default=PlentyCoding::XML_ENCODING]
public detect_encoding(string $sString):string

Method returns the encoding of one string

Parameters
string $sString
public convertArray(array $array, string $sTargetEncoding = self::UTF8_ENCODING, bool $convertKey = false):array

Method converts a multidimensional array to the desired coding

Parameters
array $array
string $sTargetEncoding [optional, default=PlentyCoding::UTF8_ENCODING]
bool $convertKey [optional, default=false]
public cutTextForDB(string $text, int $lenghtIntoDB):string

cut the given text to fit for db insert.

Parameters
string $text
int $lenghtIntoDB
public isValidUtf8(string $string):int

Checks whether the given string is valid utf-8.

Parameters
string $string

WebstoreHelper

Webstore Helper Service

Namespace

Plenty\Modules\Helper\Services

Methods

public getCurrentWebstoreConfiguration():WebstoreConfiguration