Plentymarkets interface documentation

PluginMultilingualism

Contracts

PluginTranslationRepositoryContract

Get, create , update and delete plugin translations.

Namespace

Plenty\Modules\PluginMultilingualism\Contracts

Methods
public listTranslations($filters):array

List translations for plugin set

Parameters

Name

Type

Description

$filters

array

public getTranslation($translationId):Plenty\Modules\PluginMultilingualism\Models\PluginTranslation
Return type: PluginTranslation

Get a translation

Parameters

Name

Type

Description

$translationId

int

public createTranslation($data):Plenty\Modules\PluginMultilingualism\Models\PluginTranslation
Return type: PluginTranslation

Create a translation

Parameters

Name

Type

Description

$data

array

public updateTranslation($data, $translationId):Plenty\Modules\PluginMultilingualism\Models\PluginTranslation
Return type: PluginTranslation

Update a translation

Parameters

Name

Type

Description

$data

array

$translationId

int

public deleteTranslation($id):void

Delete a translation

Parameters

Name

Type

Description

$id

int

public deleteTranslations($pluginSetId, $languageCode):void

Delete multiple translation

Parameters

Name

Type

Description

$pluginSetId

int

$languageCode

string

public updateOrCreateTranslation($data):Plenty\Modules\PluginMultilingualism\Models\PluginTranslation
Return type: PluginTranslation

Update or create a translation

Parameters

Name

Type

Description

$data

array

public clearCriteria():void

Resets all Criteria filters by creating a new instance of the builder object.

public applyCriteriaFromFilters():void

Applies criteria classes to the current repository.

public setFilters($filters = []):void

Sets the filter array.

Parameters

Name

Type

Description

$filters

array

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.

Models

PluginTranslation

The plugin translation model.

Namespace

Plenty\Modules\PluginMultilingualism\Models

Properties
Name Type Description

id

int

The ID of the translation

pluginSetId

int

The ID of the plugin set

pluginName

string

The name of the plugin

languageCode

string

The code of the language

fileName

string

The file of the key

key

string

The translation key

value

string

The translation value

createdAt

The date when the translation was created

updatedAt

The date when the translation was last updated

deletedAt

The date when the translation was deleted

*

Methods
public toArray()

Returns this model as an array.