PHP Class Field_Reference, atk4

Inheritance: extends Field
Afficher le fichier Open project: atk4/atk4 Class Usage Examples

Méthodes publiques

Свойство Type Description
$dereferenced_field string
$display_field string
$model Model
$model_name string
$table_alias string

Méthodes publiques

Méthode Description
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 )

Method Details

calculateSubQuery() public méthode

public calculateSubQuery ( ) : string
Résultat string

caption() public méthode

public caption ( $x = UNDEFINED )

destroy() public méthode

Destroy this field and dereferenced field.
public destroy ( )

getDereferenced() public méthode

Return name of dereferenced field
public getDereferenced ( ) : string
Résultat string

getModel() public méthode

Return model of field
public getModel ( ) : Model
Résultat Model

ref() public méthode

'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
Résultat Model

refSQL() public méthode

Return DSQL for field
public refSQL ( ) : SQL_Model
Résultat SQL_Model

setModel() public méthode

Set model
public setModel ( Model | string $model, string | boolean $display_field = null ) : Model | $this
$model Model | string
$display_field string | boolean
Résultat Model | $this

sortable() public méthode

public sortable ( $x = UNDEFINED )

Property Details

$dereferenced_field public_oe property

public string $dereferenced_field
Résultat string

$display_field public_oe property

public string $display_field
Résultat string

$model public_oe property

public Model $model
Résultat Model

$model_name public_oe property

public string $model_name
Résultat string

$table_alias public_oe property

public string $table_alias
Résultat string