PHP Класс Field_Reference, atk4

Наследование: extends Field
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$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