PHP 클래스 RainLab\Translate\Models\Locale

상속: extends Mode\Model, use trait October\Rain\Database\Traits\Validation
파일 보기 프로젝트 열기: rainlab/translate-plugin 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$rules Validation rules
$table The database table used by the model.
$timestamps

보호된 프로퍼티들

프로퍼티 타입 설명
$cacheByCode Object cache of self, by code.
$cacheListAvailable A cache of available locales.
$cacheListEnabled A cache of enabled locales.

공개 메소드들

메소드 설명
afterCreate ( )
beforeDelete ( )
beforeUpdate ( )
clearCache ( ) : void Clears all cache keys used by this model
findByCode ( string $code = null ) : Model Locate a locale table by its code, cached.
getDefault ( ) : self Returns the default locale defined.
isAvailable ( ) : boolean Returns true if there are at least 2 locales available.
isValid ( $locale ) : boolean Returns true if the supplied locale is valid.
listAvailable ( ) : array Lists available locales, used on the back-end.
listEnabled ( ) : array Lists the enabled locales, used on the front-end.
makeDefault ( ) : void Makes this model the default
scopeIsEnabled ( Builder $query ) : Builder Scope for checking if model is enabled

메소드 상세

afterCreate() 공개 메소드

public afterCreate ( )

beforeDelete() 공개 메소드

public beforeDelete ( )

beforeUpdate() 공개 메소드

public beforeUpdate ( )

clearCache() 공개 정적인 메소드

Clears all cache keys used by this model
public static clearCache ( ) : void
리턴 void

findByCode() 공개 정적인 메소드

Locate a locale table by its code, cached.
public static findByCode ( string $code = null ) : Model
$code string
리턴 Model

getDefault() 공개 정적인 메소드

Returns the default locale defined.
public static getDefault ( ) : self
리턴 self

isAvailable() 공개 정적인 메소드

Returns true if there are at least 2 locales available.
public static isAvailable ( ) : boolean
리턴 boolean

isValid() 공개 정적인 메소드

Returns true if the supplied locale is valid.
public static isValid ( $locale ) : boolean
리턴 boolean

listAvailable() 공개 정적인 메소드

Lists available locales, used on the back-end.
public static listAvailable ( ) : array
리턴 array

listEnabled() 공개 정적인 메소드

Lists the enabled locales, used on the front-end.
public static listEnabled ( ) : array
리턴 array

makeDefault() 공개 메소드

Makes this model the default
public makeDefault ( ) : void
리턴 void

scopeIsEnabled() 공개 메소드

Scope for checking if model is enabled
public scopeIsEnabled ( Builder $query ) : Builder
$query Builder
리턴 Builder

프로퍼티 상세

$cacheByCode 보호되어 있는 정적으로 프로퍼티

Object cache of self, by code.
protected static $cacheByCode

$cacheListAvailable 보호되어 있는 정적으로 프로퍼티

A cache of available locales.
protected static $cacheListAvailable

$cacheListEnabled 보호되어 있는 정적으로 프로퍼티

A cache of enabled locales.
protected static $cacheListEnabled

$rules 공개적으로 프로퍼티

Validation rules
public $rules

$table 공개적으로 프로퍼티

The database table used by the model.
public $table

$timestamps 공개적으로 프로퍼티

public $timestamps