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,
languageCode,
modelClassName = null 
) [static]

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

Parameters:
$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.
Returns:
A model of the type of the extending model.

Definition at line 78 of file MessageTranslation.php.

static addNewTranslation ( languageCode,
sourceModel,
translation 
) [static]

Adds new message translation to the database

Parameters:
String $languageCode Languagecode of the translation
MessageSource $sourceModel MessageSource model for the relation
String $translation The translation
Returns:
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

Parameters:
String $translation The translation
Returns:
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 Mon Jun 26 07:10:27 2017