PHP 클래스 Jarves\Configuration\Field

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

보호된 프로퍼티들

프로퍼티 타입 설명
$againstField string | null Works only with needValue. A field id from another field.
$arrayKey
$attribute boolean Whether this field is a attribute.
$attributes
$autoIncrement boolean
$children Field[]
$customGet string
$customSave string
$default mixed | null The default/initial value.
$description string Shows a grayed description text. Use markdown to format stuff.
$disabled boolean If this fields is disabled or not.
$field string The key of the field this is representing. Primarily for types 'predefined'.
$fieldWidth string | integer Width of the panel where the input is placed.
$help string Shows a little help icon and points to the given help id.
$id string
$inputWidth string | integer Width of the actual input element (input, select, textarea, etc)
$label string The label.
$layout string Not in use.
$maxLength integer
$needValue string | null Per default, this is checked against the parent (when this field is in a children section of another field), however, you can change that by using againstField.
$noWrapper boolean If this fields contains a default wrapper div with title, description etc or only the input itself.
$object string
$objectLabel string
$objectRefRelationName string The virtualField name of the field in the foreign object pointing to us back.
$objectRelation string \Jarves\ORM\ORMAbstract:: MANY_TO_ONE = 'nTo1', ONE_TO_MANY = '1ToN', ONE_TO_ONE = '1To1', MANY_TO_MANY = 'nToM';
$objectRelationCrossObjectKey string The object name of the cross-table of a nToM relation.
$objectRelationOnDelete string onDelete cascade|setnull|restrict|none
$objectRelationOnUpdate string onUpdate cascade|setnull|restrict|none
$objectRelationTable string The table name of the middle-table of a nToM relation.
$objectRelationWithConstraint boolean If the storage backend should also create a constraint so its not possible to pass a invalid reference id.
$options Options
$primaryKey boolean
$required boolean Defines if this field needs a valid value.
$requiredRegex string
$returnDefault boolean If this field returns the value even though it's the default value (in a form).
$saveOnlyFilled boolean
$startEmpty boolean If this field starts with a empty value (on initialisation). (Good fit for password fields)
$tableItem boolean If this field injects a tr+2xtd instead of div.
$target string Only used when this field is a object attribute (extends another foreign object)
$type string
$virtual boolean Virtual fields are not exported to the configuration xml.
$width integer | string Width of a column.

공개 메소드들

메소드 설명
__sleep ( )
bootRunTime ( Object $object, Configs $configs ) Do whatever is needed to setup the runtime environment correctly.
canPropertyBeExported ( $k )
fromArray ( array $values, string $key = null )
getAgainstField ( ) : string
getAttribute ( ) : boolean
getAutoIncrement ( ) : boolean
getChildren ( ) : Field[]
getChildrenArray ( ) : array
getColumnName ( ) : string Returns the column name for database access.
getCustomGet ( ) : string
getCustomSave ( ) : string
getDefault ( ) : mixed
getDescription ( ) : string
getDisabled ( ) : boolean
getField ( ) : string
getFieldType ( ) : Jarves\Admin\FieldTypes\TypeInterface
getFieldWidth ( ) : integer | string
getForm ( ) : Form
getHelp ( ) : string
getId ( ) : string
getInputWidth ( ) : integer | string
getLabel ( ) : string
getLayout ( ) : string
getMaxLength ( ) : integer
getNeedValue ( ) : mixed
getNoWrapper ( ) : boolean
getObject ( ) : string
getObjectDefinition ( ) : Object
getObjectLabel ( ) : string
getObjectRefRelationName ( ) : string
getObjectRelation ( ) : string
getObjectRelationCrossObjectKey ( ) : string
getObjectRelationOnDelete ( ) : string
getObjectRelationOnUpdate ( ) : string
getObjectRelationTable ( ) : string
getObjectRelationWithConstraint ( ) : boolean If the storage backend should also create a constraint so its not possible to pass a invalid reference id.
getOption ( string $key ) : mixed
getOptions ( ) : Options
getParentField ( ) : Field
getPhpDataType ( ) : string Returns the internal data type.
getPrimaryKey ( ) : boolean
getRequired ( ) : boolean
getRequiredRegex ( ) : string
getReturnDefault ( ) : boolean
getSaveOnlyFilled ( ) : boolean
getStartEmpty ( ) : boolean
getTableItem ( ) : mixed
getTarget ( ) : string
getType ( ) : string
getValue ( ) : mixed
getVirtual ( ) : boolean
getWidth ( ) : integer | string
hasFieldType ( ) : boolean
isAttribute ( ) : boolean
isAutoIncrement ( ) : boolean
isHidden ( ) : boolean Hidden means here if the needValue is correct with the value of parent or getAgainstField.
isObjectRelationWithConstraint ( ) : boolean If the storage backend should also create a constraint so its not possible to pass a invalid reference id.
isPrimaryKey ( ) : boolean
isRequired ( ) : boolean
isVirtual ( ) : boolean
mapValues ( array &$data )
setAgainstField ( string $againstField )
setAttribute ( boolean $attribute )
setAutoIncrement ( boolean $autoIncrement )
setChildren ( array $children = null )
setCustomGet ( string $customGet )
setCustomSave ( string $customSave )
setDefault ( mixed $default )
setDescription ( string $description )
setDisabled ( boolean $disabled )
setField ( string $field )
setFieldType ( Jarves\Admin\FieldTypes\TypeInterface $fieldType )
setFieldWidth ( integer | string $fieldWidth )
setForm ( Form $form )
setHelp ( string $help )
setId ( string $id )
setInputWidth ( integer | string $inputWidth )
setLabel ( string $label )
setLayout ( string $layout )
setMaxLength ( integer $maxLength )
setNeedValue ( mixed $needValue )
setNoWrapper ( boolean $noWrapper )
setObject ( string $object )
setObjectDefinition ( Object $objectDefinition )
setObjectLabel ( string $objectLabel )
setObjectRefRelationName ( string $objectRefRelationName )
setObjectRelation ( string $objectRelation )
setObjectRelationCrossObjectKey ( string $objectRelationPhpName )
setObjectRelationOnDelete ( string $objectRelationOnDelete )
setObjectRelationOnUpdate ( string $objectRelationOnUpdate )
setObjectRelationTable ( string $objectRelationTable )
setObjectRelationWithConstraint ( boolean $objectRelationWithConstraint )
setOption ( $key, $value )
setOptions ( Options $options )
setParentField ( Field $parentField )
setPrimaryKey ( boolean $primaryKey )
setRequired ( boolean $required )
setRequiredRegex ( string $requiredRegex )
setReturnDefault ( boolean $returnDefault )
setSaveOnlyFilled ( boolean $saveOnlyFilled )
setStartEmpty ( boolean $startEmpty )
setTableItem ( mixed $tableItem )
setTarget ( string $target )
setType ( string $type )
setValue ( mixed $value )
setVirtual ( boolean $virtual )
setWidth ( integer | string $width )
toArray ( boolean $printDefaults = false ) : array
validate ( ) : boolean

메소드 상세

__sleep() 공개 메소드

public __sleep ( )

bootRunTime() 공개 메소드

e.g. create cross foreignKeys for 1-to-n relations.
public bootRunTime ( Object $object, Configs $configs )
$object Object
$configs Configs

canPropertyBeExported() 공개 메소드

public canPropertyBeExported ( $k )

fromArray() 공개 메소드

public fromArray ( array $values, string $key = null )
$values array
$key string

getAgainstField() 공개 메소드

public getAgainstField ( ) : string
리턴 string

getAttribute() 공개 메소드

public getAttribute ( ) : boolean
리턴 boolean

getAutoIncrement() 공개 메소드

public getAutoIncrement ( ) : boolean
리턴 boolean

getChildren() 공개 메소드

public getChildren ( ) : Field[]
리턴 Field[]

getChildrenArray() 공개 메소드

public getChildrenArray ( ) : array
리턴 array

getColumnName() 공개 메소드

Returns the column name for database access.
public getColumnName ( ) : string
리턴 string

getCustomGet() 공개 메소드

public getCustomGet ( ) : string
리턴 string

getCustomSave() 공개 메소드

public getCustomSave ( ) : string
리턴 string

getDefault() 공개 메소드

public getDefault ( ) : mixed
리턴 mixed

getDescription() 공개 메소드

public getDescription ( ) : string
리턴 string

getDisabled() 공개 메소드

public getDisabled ( ) : boolean
리턴 boolean

getField() 공개 메소드

public getField ( ) : string
리턴 string

getFieldType() 공개 메소드

public getFieldType ( ) : Jarves\Admin\FieldTypes\TypeInterface
리턴 Jarves\Admin\FieldTypes\TypeInterface

getFieldWidth() 공개 메소드

public getFieldWidth ( ) : integer | string
리턴 integer | string

getForm() 공개 메소드

public getForm ( ) : Form
리턴 Jarves\Admin\Form\Form

getHelp() 공개 메소드

public getHelp ( ) : string
리턴 string

getId() 공개 메소드

public getId ( ) : string
리턴 string

getInputWidth() 공개 메소드

public getInputWidth ( ) : integer | string
리턴 integer | string

getLabel() 공개 메소드

public getLabel ( ) : string
리턴 string

getLayout() 공개 메소드

public getLayout ( ) : string
리턴 string

getMaxLength() 공개 메소드

public getMaxLength ( ) : integer
리턴 integer

getNeedValue() 공개 메소드

public getNeedValue ( ) : mixed
리턴 mixed

getNoWrapper() 공개 메소드

public getNoWrapper ( ) : boolean
리턴 boolean

getObject() 공개 메소드

public getObject ( ) : string
리턴 string

getObjectDefinition() 공개 메소드

public getObjectDefinition ( ) : Object
리턴 Object

getObjectLabel() 공개 메소드

public getObjectLabel ( ) : string
리턴 string

getObjectRefRelationName() 공개 메소드

public getObjectRefRelationName ( ) : string
리턴 string

getObjectRelation() 공개 메소드

public getObjectRelation ( ) : string
리턴 string

getObjectRelationCrossObjectKey() 공개 메소드

getObjectRelationOnDelete() 공개 메소드

getObjectRelationOnUpdate() 공개 메소드

getObjectRelationTable() 공개 메소드

public getObjectRelationTable ( ) : string
리턴 string

getObjectRelationWithConstraint() 공개 메소드

If the storage backend should also create a constraint so its not possible to pass a invalid reference id.

getOption() 공개 메소드

public getOption ( string $key ) : mixed
$key string
리턴 mixed

getOptions() 공개 메소드

public getOptions ( ) : Options
리턴 Options

getParentField() 공개 메소드

public getParentField ( ) : Field
리턴 Field

getPhpDataType() 공개 메소드

Returns the internal data type.
public getPhpDataType ( ) : string
리턴 string

getPrimaryKey() 공개 메소드

public getPrimaryKey ( ) : boolean
리턴 boolean

getRequired() 공개 메소드

public getRequired ( ) : boolean
리턴 boolean

getRequiredRegex() 공개 메소드

public getRequiredRegex ( ) : string
리턴 string

getReturnDefault() 공개 메소드

public getReturnDefault ( ) : boolean
리턴 boolean

getSaveOnlyFilled() 공개 메소드

public getSaveOnlyFilled ( ) : boolean
리턴 boolean

getStartEmpty() 공개 메소드

public getStartEmpty ( ) : boolean
리턴 boolean

getTableItem() 공개 메소드

public getTableItem ( ) : mixed
리턴 mixed

getTarget() 공개 메소드

public getTarget ( ) : string
리턴 string

getType() 공개 메소드

public getType ( ) : string
리턴 string

getValue() 공개 메소드

public getValue ( ) : mixed
리턴 mixed

getVirtual() 공개 메소드

public getVirtual ( ) : boolean
리턴 boolean

getWidth() 공개 메소드

public getWidth ( ) : integer | string
리턴 integer | string

hasFieldType() 공개 메소드

public hasFieldType ( ) : boolean
리턴 boolean

isAttribute() 공개 메소드

public isAttribute ( ) : boolean
리턴 boolean

isAutoIncrement() 공개 메소드

public isAutoIncrement ( ) : boolean
리턴 boolean

isHidden() 공개 메소드

Hidden means here if the needValue is correct with the value of parent or getAgainstField.
public isHidden ( ) : boolean
리턴 boolean

isObjectRelationWithConstraint() 공개 메소드

If the storage backend should also create a constraint so its not possible to pass a invalid reference id.

isPrimaryKey() 공개 메소드

public isPrimaryKey ( ) : boolean
리턴 boolean

isRequired() 공개 메소드

public isRequired ( ) : boolean
리턴 boolean

isVirtual() 공개 메소드

public isVirtual ( ) : boolean
리턴 boolean

mapValues() 공개 메소드

public mapValues ( array &$data )
$data array

setAgainstField() 공개 메소드

public setAgainstField ( string $againstField )
$againstField string

setAttribute() 공개 메소드

public setAttribute ( boolean $attribute )
$attribute boolean

setAutoIncrement() 공개 메소드

public setAutoIncrement ( boolean $autoIncrement )
$autoIncrement boolean

setChildren() 공개 메소드

public setChildren ( array $children = null )
$children array

setCustomGet() 공개 메소드

public setCustomGet ( string $customGet )
$customGet string

setCustomSave() 공개 메소드

public setCustomSave ( string $customSave )
$customSave string

setDefault() 공개 메소드

public setDefault ( mixed $default )
$default mixed

setDescription() 공개 메소드

public setDescription ( string $description )
$description string

setDisabled() 공개 메소드

public setDisabled ( boolean $disabled )
$disabled boolean

setField() 공개 메소드

public setField ( string $field )
$field string

setFieldType() 공개 메소드

public setFieldType ( Jarves\Admin\FieldTypes\TypeInterface $fieldType )
$fieldType Jarves\Admin\FieldTypes\TypeInterface

setFieldWidth() 공개 메소드

public setFieldWidth ( integer | string $fieldWidth )
$fieldWidth integer | string

setForm() 공개 메소드

public setForm ( Form $form )
$form Jarves\Admin\Form\Form

setHelp() 공개 메소드

public setHelp ( string $help )
$help string

setId() 공개 메소드

public setId ( string $id )
$id string

setInputWidth() 공개 메소드

public setInputWidth ( integer | string $inputWidth )
$inputWidth integer | string

setLabel() 공개 메소드

public setLabel ( string $label )
$label string

setLayout() 공개 메소드

public setLayout ( string $layout )
$layout string

setMaxLength() 공개 메소드

public setMaxLength ( integer $maxLength )
$maxLength integer

setNeedValue() 공개 메소드

public setNeedValue ( mixed $needValue )
$needValue mixed

setNoWrapper() 공개 메소드

public setNoWrapper ( boolean $noWrapper )
$noWrapper boolean

setObject() 공개 메소드

public setObject ( string $object )
$object string

setObjectDefinition() 공개 메소드

public setObjectDefinition ( Object $objectDefinition )
$objectDefinition Object

setObjectLabel() 공개 메소드

public setObjectLabel ( string $objectLabel )
$objectLabel string

setObjectRefRelationName() 공개 메소드

public setObjectRefRelationName ( string $objectRefRelationName )
$objectRefRelationName string

setObjectRelation() 공개 메소드

public setObjectRelation ( string $objectRelation )
$objectRelation string

setObjectRelationCrossObjectKey() 공개 메소드

public setObjectRelationCrossObjectKey ( string $objectRelationPhpName )
$objectRelationPhpName string

setObjectRelationOnDelete() 공개 메소드

public setObjectRelationOnDelete ( string $objectRelationOnDelete )
$objectRelationOnDelete string

setObjectRelationOnUpdate() 공개 메소드

public setObjectRelationOnUpdate ( string $objectRelationOnUpdate )
$objectRelationOnUpdate string

setObjectRelationTable() 공개 메소드

public setObjectRelationTable ( string $objectRelationTable )
$objectRelationTable string

setObjectRelationWithConstraint() 공개 메소드

public setObjectRelationWithConstraint ( boolean $objectRelationWithConstraint )
$objectRelationWithConstraint boolean

setOption() 공개 메소드

public setOption ( $key, $value )
$key
$value

setOptions() 공개 메소드

public setOptions ( Options $options )
$options Options

setParentField() 공개 메소드

public setParentField ( Field $parentField )
$parentField Field

setPrimaryKey() 공개 메소드

public setPrimaryKey ( boolean $primaryKey )
$primaryKey boolean

setRequired() 공개 메소드

public setRequired ( boolean $required )
$required boolean

setRequiredRegex() 공개 메소드

public setRequiredRegex ( string $requiredRegex )
$requiredRegex string

setReturnDefault() 공개 메소드

public setReturnDefault ( boolean $returnDefault )
$returnDefault boolean

setSaveOnlyFilled() 공개 메소드

public setSaveOnlyFilled ( boolean $saveOnlyFilled )
$saveOnlyFilled boolean

setStartEmpty() 공개 메소드

public setStartEmpty ( boolean $startEmpty )
$startEmpty boolean

setTableItem() 공개 메소드

public setTableItem ( mixed $tableItem )
$tableItem mixed

setTarget() 공개 메소드

public setTarget ( string $target )
$target string

setType() 공개 메소드

public setType ( string $type )
$type string

setValue() 공개 메소드

public setValue ( mixed $value )
$value mixed

setVirtual() 공개 메소드

public setVirtual ( boolean $virtual )
$virtual boolean

setWidth() 공개 메소드

public setWidth ( integer | string $width )
$width integer | string

toArray() 공개 메소드

public toArray ( boolean $printDefaults = false ) : array
$printDefaults boolean
리턴 array

validate() 공개 메소드

public validate ( ) : boolean
리턴 boolean

프로퍼티 상세

$againstField 보호되어 있는 프로퍼티

Works only with needValue. A field id from another field.
protected string|null $againstField
리턴 string | null

$arrayKey 보호되어 있는 프로퍼티

protected $arrayKey

$attribute 보호되어 있는 프로퍼티

Whether this field is a attribute.
protected bool $attribute
리턴 boolean

$attributes 보호되어 있는 프로퍼티

protected $attributes

$autoIncrement 보호되어 있는 프로퍼티

protected bool $autoIncrement
리턴 boolean

$children 보호되어 있는 프로퍼티

protected Field[],Jarves\Configuration $children
리턴 Field[]

$customGet 보호되어 있는 프로퍼티

protected string $customGet
리턴 string

$customSave 보호되어 있는 프로퍼티

protected string $customSave
리턴 string

$default 보호되어 있는 프로퍼티

The default/initial value.
protected mixed|null $default
리턴 mixed | null

$description 보호되어 있는 프로퍼티

Shows a grayed description text. Use markdown to format stuff.
protected string $description
리턴 string

$disabled 보호되어 있는 프로퍼티

If this fields is disabled or not.
protected bool $disabled
리턴 boolean

$field 보호되어 있는 프로퍼티

The key of the field this is representing. Primarily for types 'predefined'.
protected string $field
리턴 string

$fieldWidth 보호되어 있는 프로퍼티

Width of the panel where the input is placed.
protected string|int $fieldWidth
리턴 string | integer

$help 보호되어 있는 프로퍼티

Shows a little help icon and points to the given help id.
protected string $help
리턴 string

$id 보호되어 있는 프로퍼티

protected string $id
리턴 string

$inputWidth 보호되어 있는 프로퍼티

Width of the actual input element (input, select, textarea, etc)
protected string|int $inputWidth
리턴 string | integer

$label 보호되어 있는 프로퍼티

The label.
protected string $label
리턴 string

$layout 보호되어 있는 프로퍼티

Not in use.
protected string $layout
리턴 string

$maxLength 보호되어 있는 프로퍼티

protected int $maxLength
리턴 integer

$needValue 보호되어 있는 프로퍼티

Per default, this is checked against the parent (when this field is in a children section of another field), however, you can change that by using againstField.
protected string|null $needValue
리턴 string | null

$noWrapper 보호되어 있는 프로퍼티

If this fields contains a default wrapper div with title, description etc or only the input itself.
protected bool $noWrapper
리턴 boolean

$object 보호되어 있는 프로퍼티

protected string $object
리턴 string

$objectLabel 보호되어 있는 프로퍼티

protected string $objectLabel
리턴 string

$objectRefRelationName 보호되어 있는 프로퍼티

The virtualField name of the field in the foreign object pointing to us back.
protected string $objectRefRelationName
리턴 string

$objectRelation 보호되어 있는 프로퍼티

\Jarves\ORM\ORMAbstract:: MANY_TO_ONE = 'nTo1', ONE_TO_MANY = '1ToN', ONE_TO_ONE = '1To1', MANY_TO_MANY = 'nToM';
protected string $objectRelation
리턴 string

$objectRelationCrossObjectKey 보호되어 있는 프로퍼티

The object name of the cross-table of a nToM relation.
protected string $objectRelationCrossObjectKey
리턴 string

$objectRelationOnDelete 보호되어 있는 프로퍼티

onDelete cascade|setnull|restrict|none
protected string $objectRelationOnDelete
리턴 string

$objectRelationOnUpdate 보호되어 있는 프로퍼티

onUpdate cascade|setnull|restrict|none
protected string $objectRelationOnUpdate
리턴 string

$objectRelationTable 보호되어 있는 프로퍼티

The table name of the middle-table of a nToM relation.
protected string $objectRelationTable
리턴 string

$objectRelationWithConstraint 보호되어 있는 프로퍼티

If the storage backend should also create a constraint so its not possible to pass a invalid reference id.
protected bool $objectRelationWithConstraint
리턴 boolean

$options 보호되어 있는 프로퍼티

protected Options,Jarves\Configuration $options
리턴 Options

$primaryKey 보호되어 있는 프로퍼티

protected bool $primaryKey
리턴 boolean

$required 보호되어 있는 프로퍼티

Defines if this field needs a valid value.
protected bool $required
리턴 boolean

$requiredRegex 보호되어 있는 프로퍼티

protected string $requiredRegex
리턴 string

$returnDefault 보호되어 있는 프로퍼티

If this field returns the value even though it's the default value (in a form).
protected bool $returnDefault
리턴 boolean

$saveOnlyFilled 보호되어 있는 프로퍼티

protected bool $saveOnlyFilled
리턴 boolean

$startEmpty 보호되어 있는 프로퍼티

If this field starts with a empty value (on initialisation). (Good fit for password fields)
protected bool $startEmpty
리턴 boolean

$tableItem 보호되어 있는 프로퍼티

If this field injects a tr+2xtd instead of div.
protected bool $tableItem
리턴 boolean

$target 보호되어 있는 프로퍼티

Only used when this field is a object attribute (extends another foreign object)
protected string $target
리턴 string

$type 보호되어 있는 프로퍼티

protected string $type
리턴 string

$virtual 보호되어 있는 프로퍼티

Virtual fields are not exported to the configuration xml.
protected bool $virtual
리턴 boolean

$width 보호되어 있는 프로퍼티

Width of a column.
protected int|string $width
리턴 integer | string