PHP Class RainLab\Translate\Behaviors\TranslatableModel

Usage: In the model class definition: public $implement = ['@RainLab.Translate.Behaviors.TranslatableModel']; public $translatable = ['name', 'content'];
Inheritance: extends RainLab\Translate\Classes\TranslatableBehavior
Afficher le fichier Open project: rainlab/translate-plugin

Méthodes publiques

Méthode Description
scopeTransWhere ( Builder $query, string $index, string $value, string $locale = null ) : Builder Applies a translatable index to a basic query. This scope will join the index table and cannot be executed more than once.

Méthodes protégées

Méthode Description
loadTranslatableData ( string $locale = null ) : array Loads the translation data from the join table.
storeTranslatableBasicData ( string $locale = null ) : void Saves the basic translation data in the join table.
storeTranslatableData ( string $locale = null ) : void Saves the translation data in the join table.
storeTranslatableIndexData ( string $locale = null ) : void Saves the indexed translation data in the join table.

Method Details

loadTranslatableData() protected méthode

Loads the translation data from the join table.
protected loadTranslatableData ( string $locale = null ) : array
$locale string
Résultat array

scopeTransWhere() public méthode

Applies a translatable index to a basic query. This scope will join the index table and cannot be executed more than once.
public scopeTransWhere ( Builder $query, string $index, string $value, string $locale = null ) : Builder
$query Builder
$index string
$value string
$locale string
Résultat Builder

storeTranslatableBasicData() protected méthode

Saves the basic translation data in the join table.
protected storeTranslatableBasicData ( string $locale = null ) : void
$locale string
Résultat void

storeTranslatableData() protected méthode

Saves the translation data in the join table.
protected storeTranslatableData ( string $locale = null ) : void
$locale string
Résultat void

storeTranslatableIndexData() protected méthode

Saves the indexed translation data in the join table.
protected storeTranslatableIndexData ( string $locale = null ) : void
$locale string
Résultat void