PHP Class Jarves\Configuration\Field

Inheritance: extends Model
Afficher le fichier Open project: jarves/jarves Class Usage Examples

Protected Properties

Свойство Type Description
$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.

Méthodes publiques

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

Method Details

__sleep() public méthode

public __sleep ( )

bootRunTime() public méthode

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

canPropertyBeExported() public méthode

public canPropertyBeExported ( $k )

fromArray() public méthode

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

getAgainstField() public méthode

public getAgainstField ( ) : string
Résultat string

getAttribute() public méthode

public getAttribute ( ) : boolean
Résultat boolean

getAutoIncrement() public méthode

public getAutoIncrement ( ) : boolean
Résultat boolean

getChildren() public méthode

public getChildren ( ) : Field[]
Résultat Field[]

getChildrenArray() public méthode

public getChildrenArray ( ) : array
Résultat array

getColumnName() public méthode

Returns the column name for database access.
public getColumnName ( ) : string
Résultat string

getCustomGet() public méthode

public getCustomGet ( ) : string
Résultat string

getCustomSave() public méthode

public getCustomSave ( ) : string
Résultat string

getDefault() public méthode

public getDefault ( ) : mixed
Résultat mixed

getDescription() public méthode

public getDescription ( ) : string
Résultat string

getDisabled() public méthode

public getDisabled ( ) : boolean
Résultat boolean

getField() public méthode

public getField ( ) : string
Résultat string

getFieldType() public méthode

public getFieldType ( ) : Jarves\Admin\FieldTypes\TypeInterface
Résultat Jarves\Admin\FieldTypes\TypeInterface

getFieldWidth() public méthode

public getFieldWidth ( ) : integer | string
Résultat integer | string

getForm() public méthode

public getForm ( ) : Form
Résultat Jarves\Admin\Form\Form

getHelp() public méthode

public getHelp ( ) : string
Résultat string

getId() public méthode

public getId ( ) : string
Résultat string

getInputWidth() public méthode

public getInputWidth ( ) : integer | string
Résultat integer | string

getLabel() public méthode

public getLabel ( ) : string
Résultat string

getLayout() public méthode

public getLayout ( ) : string
Résultat string

getMaxLength() public méthode

public getMaxLength ( ) : integer
Résultat integer

getNeedValue() public méthode

public getNeedValue ( ) : mixed
Résultat mixed

getNoWrapper() public méthode

public getNoWrapper ( ) : boolean
Résultat boolean

getObject() public méthode

public getObject ( ) : string
Résultat string

getObjectDefinition() public méthode

public getObjectDefinition ( ) : Object
Résultat Object

getObjectLabel() public méthode

public getObjectLabel ( ) : string
Résultat string

getObjectRefRelationName() public méthode

public getObjectRefRelationName ( ) : string
Résultat string

getObjectRelation() public méthode

public getObjectRelation ( ) : string
Résultat string

getObjectRelationCrossObjectKey() public méthode

getObjectRelationOnDelete() public méthode

public getObjectRelationOnDelete ( ) : string
Résultat string

getObjectRelationOnUpdate() public méthode

public getObjectRelationOnUpdate ( ) : string
Résultat string

getObjectRelationTable() public méthode

public getObjectRelationTable ( ) : string
Résultat string

getObjectRelationWithConstraint() public méthode

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

getOption() public méthode

public getOption ( string $key ) : mixed
$key string
Résultat mixed

getOptions() public méthode

public getOptions ( ) : Options
Résultat Options

getParentField() public méthode

public getParentField ( ) : Field
Résultat Field

getPhpDataType() public méthode

Returns the internal data type.
public getPhpDataType ( ) : string
Résultat string

getPrimaryKey() public méthode

public getPrimaryKey ( ) : boolean
Résultat boolean

getRequired() public méthode

public getRequired ( ) : boolean
Résultat boolean

getRequiredRegex() public méthode

public getRequiredRegex ( ) : string
Résultat string

getReturnDefault() public méthode

public getReturnDefault ( ) : boolean
Résultat boolean

getSaveOnlyFilled() public méthode

public getSaveOnlyFilled ( ) : boolean
Résultat boolean

getStartEmpty() public méthode

public getStartEmpty ( ) : boolean
Résultat boolean

getTableItem() public méthode

public getTableItem ( ) : mixed
Résultat mixed

getTarget() public méthode

public getTarget ( ) : string
Résultat string

getType() public méthode

public getType ( ) : string
Résultat string

getValue() public méthode

public getValue ( ) : mixed
Résultat mixed

getVirtual() public méthode

public getVirtual ( ) : boolean
Résultat boolean

getWidth() public méthode

public getWidth ( ) : integer | string
Résultat integer | string

hasFieldType() public méthode

public hasFieldType ( ) : boolean
Résultat boolean

isAttribute() public méthode

public isAttribute ( ) : boolean
Résultat boolean

isAutoIncrement() public méthode

public isAutoIncrement ( ) : boolean
Résultat boolean

isHidden() public méthode

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

isObjectRelationWithConstraint() public méthode

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

isPrimaryKey() public méthode

public isPrimaryKey ( ) : boolean
Résultat boolean

isRequired() public méthode

public isRequired ( ) : boolean
Résultat boolean

isVirtual() public méthode

public isVirtual ( ) : boolean
Résultat boolean

mapValues() public méthode

public mapValues ( array &$data )
$data array

setAgainstField() public méthode

public setAgainstField ( string $againstField )
$againstField string

setAttribute() public méthode

public setAttribute ( boolean $attribute )
$attribute boolean

setAutoIncrement() public méthode

public setAutoIncrement ( boolean $autoIncrement )
$autoIncrement boolean

setChildren() public méthode

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

setCustomGet() public méthode

public setCustomGet ( string $customGet )
$customGet string

setCustomSave() public méthode

public setCustomSave ( string $customSave )
$customSave string

setDefault() public méthode

public setDefault ( mixed $default )
$default mixed

setDescription() public méthode

public setDescription ( string $description )
$description string

setDisabled() public méthode

public setDisabled ( boolean $disabled )
$disabled boolean

setField() public méthode

public setField ( string $field )
$field string

setFieldType() public méthode

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

setFieldWidth() public méthode

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

setForm() public méthode

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

setHelp() public méthode

public setHelp ( string $help )
$help string

setId() public méthode

public setId ( string $id )
$id string

setInputWidth() public méthode

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

setLabel() public méthode

public setLabel ( string $label )
$label string

setLayout() public méthode

public setLayout ( string $layout )
$layout string

setMaxLength() public méthode

public setMaxLength ( integer $maxLength )
$maxLength integer

setNeedValue() public méthode

public setNeedValue ( mixed $needValue )
$needValue mixed

setNoWrapper() public méthode

public setNoWrapper ( boolean $noWrapper )
$noWrapper boolean

setObject() public méthode

public setObject ( string $object )
$object string

setObjectDefinition() public méthode

public setObjectDefinition ( Object $objectDefinition )
$objectDefinition Object

setObjectLabel() public méthode

public setObjectLabel ( string $objectLabel )
$objectLabel string

setObjectRefRelationName() public méthode

public setObjectRefRelationName ( string $objectRefRelationName )
$objectRefRelationName string

setObjectRelation() public méthode

public setObjectRelation ( string $objectRelation )
$objectRelation string

setObjectRelationCrossObjectKey() public méthode

public setObjectRelationCrossObjectKey ( string $objectRelationPhpName )
$objectRelationPhpName string

setObjectRelationOnDelete() public méthode

public setObjectRelationOnDelete ( string $objectRelationOnDelete )
$objectRelationOnDelete string

setObjectRelationOnUpdate() public méthode

public setObjectRelationOnUpdate ( string $objectRelationOnUpdate )
$objectRelationOnUpdate string

setObjectRelationTable() public méthode

public setObjectRelationTable ( string $objectRelationTable )
$objectRelationTable string

setObjectRelationWithConstraint() public méthode

public setObjectRelationWithConstraint ( boolean $objectRelationWithConstraint )
$objectRelationWithConstraint boolean

setOption() public méthode

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

setOptions() public méthode

public setOptions ( Options $options )
$options Options

setParentField() public méthode

public setParentField ( Field $parentField )
$parentField Field

setPrimaryKey() public méthode

public setPrimaryKey ( boolean $primaryKey )
$primaryKey boolean

setRequired() public méthode

public setRequired ( boolean $required )
$required boolean

setRequiredRegex() public méthode

public setRequiredRegex ( string $requiredRegex )
$requiredRegex string

setReturnDefault() public méthode

public setReturnDefault ( boolean $returnDefault )
$returnDefault boolean

setSaveOnlyFilled() public méthode

public setSaveOnlyFilled ( boolean $saveOnlyFilled )
$saveOnlyFilled boolean

setStartEmpty() public méthode

public setStartEmpty ( boolean $startEmpty )
$startEmpty boolean

setTableItem() public méthode

public setTableItem ( mixed $tableItem )
$tableItem mixed

setTarget() public méthode

public setTarget ( string $target )
$target string

setType() public méthode

public setType ( string $type )
$type string

setValue() public méthode

public setValue ( mixed $value )
$value mixed

setVirtual() public méthode

public setVirtual ( boolean $virtual )
$virtual boolean

setWidth() public méthode

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

toArray() public méthode

public toArray ( boolean $printDefaults = false ) : array
$printDefaults boolean
Résultat array

validate() public méthode

public validate ( ) : boolean
Résultat boolean

Property Details

$againstField protected_oe property

Works only with needValue. A field id from another field.
protected string|null $againstField
Résultat string | null

$arrayKey protected_oe property

protected $arrayKey

$attribute protected_oe property

Whether this field is a attribute.
protected bool $attribute
Résultat boolean

$attributes protected_oe property

protected $attributes

$autoIncrement protected_oe property

protected bool $autoIncrement
Résultat boolean

$children protected_oe property

protected Field[],Jarves\Configuration $children
Résultat Field[]

$customGet protected_oe property

protected string $customGet
Résultat string

$customSave protected_oe property

protected string $customSave
Résultat string

$default protected_oe property

The default/initial value.
protected mixed|null $default
Résultat mixed | null

$description protected_oe property

Shows a grayed description text. Use markdown to format stuff.
protected string $description
Résultat string

$disabled protected_oe property

If this fields is disabled or not.
protected bool $disabled
Résultat boolean

$field protected_oe property

The key of the field this is representing. Primarily for types 'predefined'.
protected string $field
Résultat string

$fieldWidth protected_oe property

Width of the panel where the input is placed.
protected string|int $fieldWidth
Résultat string | integer

$help protected_oe property

Shows a little help icon and points to the given help id.
protected string $help
Résultat string

$id protected_oe property

protected string $id
Résultat string

$inputWidth protected_oe property

Width of the actual input element (input, select, textarea, etc)
protected string|int $inputWidth
Résultat string | integer

$label protected_oe property

The label.
protected string $label
Résultat string

$layout protected_oe property

Not in use.
protected string $layout
Résultat string

$maxLength protected_oe property

protected int $maxLength
Résultat integer

$needValue protected_oe property

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
Résultat string | null

$noWrapper protected_oe property

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

$object protected_oe property

protected string $object
Résultat string

$objectLabel protected_oe property

protected string $objectLabel
Résultat string

$objectRefRelationName protected_oe property

The virtualField name of the field in the foreign object pointing to us back.
protected string $objectRefRelationName
Résultat string

$objectRelation protected_oe property

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

$objectRelationCrossObjectKey protected_oe property

The object name of the cross-table of a nToM relation.
protected string $objectRelationCrossObjectKey
Résultat string

$objectRelationOnDelete protected_oe property

onDelete cascade|setnull|restrict|none
protected string $objectRelationOnDelete
Résultat string

$objectRelationOnUpdate protected_oe property

onUpdate cascade|setnull|restrict|none
protected string $objectRelationOnUpdate
Résultat string

$objectRelationTable protected_oe property

The table name of the middle-table of a nToM relation.
protected string $objectRelationTable
Résultat string

$objectRelationWithConstraint protected_oe property

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

$options protected_oe property

protected Options,Jarves\Configuration $options
Résultat Options

$primaryKey protected_oe property

protected bool $primaryKey
Résultat boolean

$required protected_oe property

Defines if this field needs a valid value.
protected bool $required
Résultat boolean

$requiredRegex protected_oe property

protected string $requiredRegex
Résultat string

$returnDefault protected_oe property

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

$saveOnlyFilled protected_oe property

protected bool $saveOnlyFilled
Résultat boolean

$startEmpty protected_oe property

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

$tableItem protected_oe property

If this field injects a tr+2xtd instead of div.
protected bool $tableItem
Résultat boolean

$target protected_oe property

Only used when this field is a object attribute (extends another foreign object)
protected string $target
Résultat string

$type protected_oe property

protected string $type
Résultat string

$virtual protected_oe property

Virtual fields are not exported to the configuration xml.
protected bool $virtual
Résultat boolean

$width protected_oe property

Width of a column.
protected int|string $width
Résultat integer | string