PHP 클래스 creocoder\translateable\TranslateableBehavior

저자: Alexander Kochetov ([email protected])
상속: extends yii\base\Behavior
파일 보기 프로젝트 열기: creocoder/yii2-translateable 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$translationAttributes the list of attributes to be translated
$translationLanguageAttribute the translations model language attribute name
$translationRelation the translations relation name

공개 메소드들

메소드 설명
__get ( $name )
__set ( $name, $value )
afterSave ( ) : void
afterValidate ( ) : void
canGetProperty ( $name, $checkVars = true )
canSetProperty ( $name, $checkVars = true )
events ( )
getTranslation ( string | null $language = null ) : ActiveRecord Returns the translation model for the specified language.
hasTranslation ( string | null $language = null ) : boolean Returns a value indicating whether the translation model for the specified language exists.
init ( )
translate ( string | null $language = null ) : ActiveRecord Returns the translation model for the specified language.

메소드 상세

__get() 공개 메소드

public __get ( $name )

__set() 공개 메소드

public __set ( $name, $value )

afterSave() 공개 메소드

public afterSave ( ) : void
리턴 void

afterValidate() 공개 메소드

public afterValidate ( ) : void
리턴 void

canGetProperty() 공개 메소드

public canGetProperty ( $name, $checkVars = true )

canSetProperty() 공개 메소드

public canSetProperty ( $name, $checkVars = true )

events() 공개 메소드

public events ( )

getTranslation() 공개 메소드

Returns the translation model for the specified language.
public getTranslation ( string | null $language = null ) : ActiveRecord
$language string | null
리턴 yii\db\ActiveRecord

hasTranslation() 공개 메소드

Returns a value indicating whether the translation model for the specified language exists.
public hasTranslation ( string | null $language = null ) : boolean
$language string | null
리턴 boolean

init() 공개 메소드

public init ( )

translate() 공개 메소드

Returns the translation model for the specified language.
public translate ( string | null $language = null ) : ActiveRecord
$language string | null
리턴 yii\db\ActiveRecord

프로퍼티 상세

$translationAttributes 공개적으로 프로퍼티

the list of attributes to be translated
public $translationAttributes

$translationLanguageAttribute 공개적으로 프로퍼티

the translations model language attribute name
public $translationLanguageAttribute

$translationRelation 공개적으로 프로퍼티

the translations relation name
public $translationRelation