PluginMultilingualism

Contracts

PluginTranslationRepositoryContract

Get, create , update and delete plugin translations.

Namespace

Plenty\Modules\PluginMultilingualism\Contracts

Methods

public listTranslations(array $filters):array

List translations for plugin set

Parameters
array $filters
public getTranslation(int $translationId):PluginTranslation

Get a translation

Parameters
int $translationId
public createTranslation(array $data):PluginTranslation

Create a translation

Parameters
array $data
public updateTranslation(array $data, int $translationId):PluginTranslation

Update a translation

Parameters
array $data
int $translationId
public deleteTranslation(int $id):void

Delete a translation

Parameters
int $id
public deleteTranslations(int $pluginSetId, string $languageCode):void

Delete multiple translation

Parameters
int $pluginSetId
string $languageCode
public updateOrCreateTranslation(array $data):PluginTranslation

Update or create a translation

Parameters
array $data
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(array $filters = []):void

Sets the filter array.

Parameters
array $filters
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

Type Name Description
int id The ID of the translation
int pluginSetId The ID of the plugin set
string pluginName The name of the plugin
string languageCode The code of the language
string fileName The file of the key
string key The translation key
string value The translation value
createdAt The date when the translation was created
updatedAt The date when the translation was last updated

Methods

public toArray()

Returns this model as an array.