PHP 클래스 Field_Reference, atk4

상속: extends Field
파일 보기 프로젝트 열기: atk4/atk4 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$dereferenced_field string
$display_field string
$model Model
$model_name string
$table_alias string

공개 메소드들

메소드 설명
calculateSubQuery ( ) : string
caption ( $x = UNDEFINED )
destroy ( ) Destroy this field and dereferenced field.
getDereferenced ( ) : string Return name of dereferenced field
getModel ( ) : Model Return model of field
ref ( string | boolean | null $mode = null ) : Model ref() will traverse reference and will attempt to load related model's entry. If the entry will fail to load it will return model which would not be loaded. This can be changed by specifying an argument:.
refSQL ( ) : SQL_Model Return DSQL for field
setModel ( Model | string $model, string | boolean $display_field = null ) : Model | $this Set model
sortable ( $x = UNDEFINED )

메소드 상세

calculateSubQuery() 공개 메소드

public calculateSubQuery ( ) : string
리턴 string

caption() 공개 메소드

public caption ( $x = UNDEFINED )

destroy() 공개 메소드

Destroy this field and dereferenced field.
public destroy ( )

getDereferenced() 공개 메소드

Return name of dereferenced field
public getDereferenced ( ) : string
리턴 string

getModel() 공개 메소드

Return model of field
public getModel ( ) : Model
리턴 Model

ref() 공개 메소드

'model' - simply create new model and return it without loading anything false or 'ignore' - will not even try to load anything null (default) - will tryLoad() 'load' - will always load the model and if record is not present, will fail 'create' - if record fails to load, will create new record, save, get ID and insert into $this 'link' - if record fails to load, will return new record, with appropriate afterSave hander, which will update current model also and save it too.
public ref ( string | boolean | null $mode = null ) : Model
$mode string | boolean | null
리턴 Model

refSQL() 공개 메소드

Return DSQL for field
public refSQL ( ) : SQL_Model
리턴 SQL_Model

setModel() 공개 메소드

Set model
public setModel ( Model | string $model, string | boolean $display_field = null ) : Model | $this
$model Model | string
$display_field string | boolean
리턴 Model | $this

sortable() 공개 메소드

public sortable ( $x = UNDEFINED )

프로퍼티 상세

$dereferenced_field 공개적으로 프로퍼티

public string $dereferenced_field
리턴 string

$display_field 공개적으로 프로퍼티

public string $display_field
리턴 string

$model 공개적으로 프로퍼티

public Model $model
리턴 Model

$model_name 공개적으로 프로퍼티

public string $model_name
리턴 string

$table_alias 공개적으로 프로퍼티

public string $table_alias
리턴 string