MessageTranslation Class Reference

Inheritance diagram for MessageTranslation:
RedBeanModel BeanModel ObservableComponent

Public Member Functions

 updateTranslation ($translation)

Static Public Member Functions

static getDefaultMetadata ()
static getBySourceIdAndLangCode ($sourceId, $languageCode, $modelClassName=null)
static addNewTranslation ($languageCode, $sourceModel, $translation)

Detailed Description

Definition at line 37 of file MessageTranslation.php.

Member Function Documentation

static getDefaultMetadata (  )  [static]

Returns the default meta data for the class. It must be appended to the meta data from the parent model, if any.

Reimplemented from RedBeanModel.

Definition at line 39 of file MessageTranslation.php.

static getBySourceIdAndLangCode ( sourceId,
modelClassName = null 
) [static]

Gets a model from the database by source message id and langcode

$sourceId Integer Id of the source message
$languageCode String Language code of the translation
$modelClassName Pass only when getting it at runtime gets the wrong name.
A model of the type of the extending model.

Definition at line 78 of file MessageTranslation.php.

static addNewTranslation ( languageCode,
) [static]

Adds new message translation to the database

String $languageCode Languagecode of the translation
MessageSource $sourceModel MessageSource model for the relation
String $translation The translation
Instance of the MessageTranslation model for created translation

Definition at line 113 of file MessageTranslation.php.

updateTranslation ( translation  ) 

Updates the translation of the current model

String $translation The translation
The updated model

Definition at line 137 of file MessageTranslation.php.

The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Wed Mar 29 07:10:28 2017