PHP Interface Jarves\Admin\FieldTypes\TypeInterface

Show file Open project: jarves/jarves Interface Usage Examples

Public Methods

Method Description
bootRunTime ( Object $object, Configs $configs ) Do whatever is needed to setup the runtime environment correctly.
getColumns ( ) : Jarves\Admin\FieldTypes\ColumnDefinitionInterface[] Returns all columns that are necessary to get this field working.
getFieldDefinition ( ) : Field
getForm ( ) : Form
getName ( ) : string
getPhpDataType ( ) : string Returns the internal data type that is required for setValue or that is returned by getValue.
getRequiredFields ( ) : array A list of field names that are included additional in ObjectCrud's field list during loading of this field.
getSelection ( ) : string[] Returns the field names to select from the object model as array.
getValue ( ) : mixed
isDiffAllowed ( )
mapValues ( array &$data ) Maps the internal value to $data.
setFieldDefinition ( Field $field )
setValue ( mixed $value )
validate ( ) : array

Method Details

bootRunTime() public method

This changes are also used in the model buildTime. e.g. create cross foreignKeys for 1-to-n relations. This changes will be cached. Make sure that this method does only change stuff once, because we call it frequently, depends if another boot has something changed.
public bootRunTime ( Object $object, Configs $configs )
$object Jarves\Configuration\Object
$configs Jarves\Configuration\Configs

getColumns() public method

Returns all columns that are necessary to get this field working.
public getColumns ( ) : Jarves\Admin\FieldTypes\ColumnDefinitionInterface[]
return Jarves\Admin\FieldTypes\ColumnDefinitionInterface[]

getFieldDefinition() public method

public getFieldDefinition ( ) : Field
return Jarves\Configuration\Field

getForm() public method

public getForm ( ) : Form
return Jarves\Admin\Form\Form

getName() public method

public getName ( ) : string
return string

getPhpDataType() public method

Possible values: integer|float|string|array|bool
public getPhpDataType ( ) : string
return string

getRequiredFields() public method

A list of field names that are included additional in ObjectCrud's field list during loading of this field.
public getRequiredFields ( ) : array
return array

getSelection() public method

Returns the field names to select from the object model as array.
public getSelection ( ) : string[]
return string[]

getValue() public method

public getValue ( ) : mixed
return mixed

isDiffAllowed() public method

public isDiffAllowed ( )

mapValues() public method

Maps the internal value to $data.
public mapValues ( array &$data )
$data array

setFieldDefinition() public method

public setFieldDefinition ( Field $field )
$field Jarves\Configuration\Field

setValue() public method

public setValue ( mixed $value )
$value mixed

validate() public method

public validate ( ) : array
return array