PHP Class Controller_MVCGrid, atk4

Inheritance: extends AbstractController
Mostra file Open project: atk4/atk4

Public Properties

Property Type Description
$field_associations array Field associations grid_column => model_field
$grid Grid
$model Model
$owner Grid
$type_associations array Field type associations model_field_type => grid_column_type/formatter

Public Methods

Method Description
addTypeAssociation ( string $k, string $v ) Adds additional type association.
getFieldType ( Field $field ) : string Returns grid column type associated with model field.
importField ( string $field ) : void | Grid | Controller_Grid_Format Import one field from model into grid.
importFields ( Model $model, array | string | boolean $fields = UNDEFINED ) : void | $this Import model fields in form.
setActualFields ( array | string | boolean $fields ) Import model fields in grid.

Method Details

addTypeAssociation() public method

Adds additional type association.
public addTypeAssociation ( string $k, string $v )
$k string model field type
$v string grid columnt type

getFieldType() public method

Redefine this method to add special handling of your own fields.
public getFieldType ( Field $field ) : string
$field Field
return string

importField() public method

Import one field from model into grid.
public importField ( string $field ) : void | Grid | Controller_Grid_Format
$field string
return void | Grid | Controller_Grid_Format

importFields() public method

Import model fields in form.
public importFields ( Model $model, array | string | boolean $fields = UNDEFINED ) : void | $this
$model Model
$fields array | string | boolean
return void | $this

setActualFields() public method

Import model fields in grid.
public setActualFields ( array | string | boolean $fields )
$fields array | string | boolean

Property Details

$field_associations public_oe property

Field associations grid_column => model_field
public array $field_associations
return array

$grid public_oe property

public Grid $grid
return Grid

$model public_oe property

public Model $model
return Model

$owner public_oe property

public Grid $owner
return Grid

$type_associations public_oe property

Field type associations model_field_type => grid_column_type/formatter
public array $type_associations
return array