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
Datei anzeigen Open project: rainlab/translate-plugin

Public Methods

Method 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.

Protected Methods

Method 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 method

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

scopeTransWhere() public method

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
return Builder

storeTranslatableBasicData() protected method

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

storeTranslatableData() protected method

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

storeTranslatableIndexData() protected method

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