Property | Type | Description | |
---|---|---|---|
$translatableViewBag | Data store for translated viewbag attributes. |
Method | Description | |
---|---|---|
__construct ( October\Rain\Database\Model $model ) | Constructor | |
getTranslatableModelClass ( ) : array | Returns a collection of fields that will be hashed. | |
syncTranslatableAttributes ( ) | {@inheritDoc} |
Method | Description | |
---|---|---|
createModel ( ) : Model | Internal method, prepare the form model object | |
getCmsObjectForLocale ( $locale ) | ||
isEmptyDataSet ( array $data ) : boolean | Returns true if all attributes are empty (false when converted to booleans). | |
loadTranslatableData ( string $locale = null ) : array | Loads the translation data from the join table. | |
mergeViewBagAttributes ( ) : void | Merge the viewBag array for the base and translated objects. | |
overrideTwigCacheKey ( $key ) : string | null | Translated CMS objects need their own unique cache key in twig. | |
storeTranslatableData ( string $locale = null ) : void | Saves the translation data in the join table. | |
syncTranslatableFileNames ( ) | If the parent model file name is changed, this should be reflected in the translated models also. |
public __construct ( October\Rain\Database\Model $model ) | ||
$model | October\Rain\Database\Model | The extended model. |
protected createModel ( ) : Model | ||
return | Model |
public getTranslatableModelClass ( ) : array | ||
return | array |
protected isEmptyDataSet ( array $data ) : boolean | ||
$data | array | |
return | boolean |
protected loadTranslatableData ( string $locale = null ) : array | ||
$locale | string | |
return | array |
protected mergeViewBagAttributes ( ) : void | ||
return | void |
protected overrideTwigCacheKey ( $key ) : string | null | ||
return | string | null |
protected storeTranslatableData ( string $locale = null ) : void | ||
$locale | string | |
return | void |
protected syncTranslatableFileNames ( ) |