PHP Class Pimcore\Model\Object\ClassDefinition\Data

Afficher le fichier Open project: pimcore/pimcore Class Usage Examples

Méthodes publiques

Свойство Type Description
$columnType string | array | array
$datatype string
$fieldtype string
$index integer
$invisible boolean
$locked boolean
$mandatory boolean
$name string
$noteditable boolean
$permissions array
$queryColumnType string | array | array
$relationType boolean
$style boolean
$title string
$tooltip string
$validFilterOperators array
$visibleGridView boolean
$visibleSearch boolean

Protected Properties

Свойство Type Description
$dropNullValues If set to true then null values will not be exported.

Méthodes publiques

Méthode Description
adoptMasterDefinition ( Data $masterDefinition )
checkValidity ( mixed $data, boolean $omitMandatoryCheck = false ) Checks if data is valid for current data field
getAsFloatCast ( $number ) : float
getAsIntegerCast ( $number ) : integer | null
getCacheTags ( mixed $data, array $tags = [] ) : array This is a dummy and is mostly implemented by relation types
getColumnType ( ) : string | array
getDataForEditmode ( mixed $data, null | AbstractObject $object = null, mixed $params = [] ) : mixed Returns the data for the editmode
getDataForSearchIndex ( $object, mixed $params = [] ) : string
getDataFromEditmode ( mixed $data, null | AbstractObject $object = null, mixed $params = [] ) : mixed Converts data from editmode to internal eg. Image-Id to Asset\Image object
getDatatype ( ) : string
getDiffDataForEditMode ( mixed $data, null | AbstractObject $object = null, mixed $params = [] ) : null | array Returns the data for the editmode in the format expected by the object merger plugin.
getDiffDataFromEditmode ( $data, null $object = null, mixed $params = [] ) : mixed Converts the data sent from the object merger plugin back to the internal object. Similar to getDiffDataForEditMode() an array of data elements is passed in containing the following attributes: - "field" => the name of (this) field - "key" => the key of the data element - "data" => the data
getDropNullValues ( )
getFieldtype ( ) : string
getFilterCondition ( $value, $operator ) : string returns sql query statement to filter according to this data types value(s)
getFilterConditionExt ( $value, $operator, $params = [] ) : string returns sql query statement to filter according to this data types value(s)
getForCsvExport ( AbstractObject $object, array $params = [] ) : string converts object data to a simple string value or CSV Export
getForWebserviceExport ( AbstractObject $object, mixed $params = [] ) : mixed converts data to be exposed via webservices
getFromCsvImport ( $importValue, null | AbstractObject $object = null, mixed $params = [] ) : mixed
getFromWebserviceImport ( mixed $value, null | AbstractObject $object = null, mixed $params = [], $idMapper = null ) : mixed converts data to be imported via webservices
getGetterCode ( $class ) : string Creates getter code which is used for generation of php file for object classes using this data type
getGetterCodeFieldcollection ( $fieldcollectionDefinition ) : string Creates getter code which is used for generation of php file for fieldcollectionk classes using this data type
getGetterCodeLocalizedfields ( $class ) : string Creates getter code which is used for generation of php file for localized fields in classes using this data type
getGetterCodeObjectbrick ( $brickClass ) : string Creates getter code which is used for generation of php file for object brick classes using this data type
getIndex ( ) : integer
getInvisible ( ) : boolean
getLocked ( ) : boolean
getMandatory ( ) : boolean
getName ( ) : string
getNoteditable ( ) : boolean
getPermissions ( ) : array
getPhpdocType ( ) : string
getQueryColumnType ( ) : string | array
getSetterCode ( $class ) : string Creates setter code which is used for generation of php file for object classes using this data type
getSetterCodeFieldcollection ( $fieldcollectionDefinition ) : string Creates setter code which is used for generation of php file for fieldcollection classes using this data type
getSetterCodeLocalizedfields ( $class ) : string Creates setter code which is used for generation of php file for localized fields in classes using this data type
getSetterCodeObjectbrick ( $brickClass ) : string Creates setter code which is used for generation of php file for object brick classes using this data type
getStyle ( ) : boolean
getTitle ( ) : string
getTooltip ( ) : string
getVersionPreview ( $data, null | AbstractObject $object = null, mixed $params = [] ) : string
getVisibleGridView ( ) : boolean
getVisibleSearch ( ) : boolean
isDiffChangeAllowed ( string $object, mixed $params = [] ) : boolean True if change is allowed in edit mode.
isEmpty ( Concrete $data ) : boolean
isRelationType ( ) : boolean
marshal ( mixed $value, AbstractObject $object = null, mixed $params = [] ) : mixed Encode value for packing it into a single column.
resolveDependencies ( $data ) : array
setColumnType ( string | array $columnType )
setDatatype ( string $datatype )
setDropNullValues ( $dropNullValues )
setFieldtype ( string $fieldtype )
setIndex ( integer $index )
setInvisible ( $invisible )
setLocked ( $locked )
setMandatory ( boolean $mandatory )
setName ( string $name )
setNoteditable ( boolean $noteditable )
setPermissions ( array $permissions )
setQueryColumnType ( string | array $queryColumnType )
setStyle ( $style )
setTitle ( string $title )
setTooltip ( $tooltip )
setValues ( array $data = [] )
setVisibleGridView ( $visibleGridView )
setVisibleSearch ( $visibleSearch )
synchronizeWithMasterDefinition ( Data $masterDefinition )
unmarshal ( $data, AbstractObject $object = null, $params = [] ) : mixed See marshal

Méthodes protégées

Méthode Description
getDataFromObjectParam ( $object, array $params = [] ) : mixed

Method Details

adoptMasterDefinition() public méthode

public adoptMasterDefinition ( Data $masterDefinition )
$masterDefinition Data

checkValidity() public méthode

Checks if data is valid for current data field
public checkValidity ( mixed $data, boolean $omitMandatoryCheck = false )
$data mixed
$omitMandatoryCheck boolean

getAsFloatCast() public méthode

public getAsFloatCast ( $number ) : float
$number
Résultat float

getAsIntegerCast() public méthode

public getAsIntegerCast ( $number ) : integer | null
$number
Résultat integer | null

getCacheTags() public méthode

This is a dummy and is mostly implemented by relation types
public getCacheTags ( mixed $data, array $tags = [] ) : array
$data mixed
$tags array
Résultat array

getColumnType() public méthode

public getColumnType ( ) : string | array
Résultat string | array | array

getDataForEditmode() abstract public méthode

Returns the data for the editmode
abstract public getDataForEditmode ( mixed $data, null | AbstractObject $object = null, mixed $params = [] ) : mixed
$data mixed
$object null | Pimcore\Model\Object\AbstractObject
$params mixed
Résultat mixed

getDataForSearchIndex() public méthode

public getDataForSearchIndex ( $object, mixed $params = [] ) : string
$object
$params mixed
Résultat string

getDataFromEditmode() abstract public méthode

Converts data from editmode to internal eg. Image-Id to Asset\Image object
abstract public getDataFromEditmode ( mixed $data, null | AbstractObject $object = null, mixed $params = [] ) : mixed
$data mixed
$object null | Pimcore\Model\Object\AbstractObject
$params mixed
Résultat mixed

getDataFromObjectParam() protected méthode

protected getDataFromObjectParam ( $object, array $params = [] ) : mixed
$object
$params array
Résultat mixed

getDatatype() public méthode

public getDatatype ( ) : string
Résultat string

getDiffDataForEditMode() public méthode

The return value is a list of data definitions containing the following attributes: - "field" => the name of the object field - "key" => a unique key identifying the data element - "type" => the type of the data component - "value" => the value used as preview - "data" => the actual data which is then sent back again by the editor. Note that the data is opaque and will not be touched by the editor in any way. - "disabled" => whether the data element can be edited or not - "title" => pretty name describing the data element
public getDiffDataForEditMode ( mixed $data, null | AbstractObject $object = null, mixed $params = [] ) : null | array
$data mixed
$object null | Pimcore\Model\Object\AbstractObject
$params mixed
Résultat null | array

getDiffDataFromEditmode() public méthode

Converts the data sent from the object merger plugin back to the internal object. Similar to getDiffDataForEditMode() an array of data elements is passed in containing the following attributes: - "field" => the name of (this) field - "key" => the key of the data element - "data" => the data
public getDiffDataFromEditmode ( $data, null $object = null, mixed $params = [] ) : mixed
$data
$object null
$params mixed
Résultat mixed

getDropNullValues() public static méthode

public static getDropNullValues ( )

getFieldtype() public méthode

public getFieldtype ( ) : string
Résultat string

getFilterCondition() public méthode

returns sql query statement to filter according to this data types value(s)
public getFilterCondition ( $value, $operator ) : string
$value
$operator
Résultat string

getFilterConditionExt() public méthode

returns sql query statement to filter according to this data types value(s)
public getFilterConditionExt ( $value, $operator, $params = [] ) : string
$value
$operator
$params optional params used to change the behavior
Résultat string

getForCsvExport() public méthode

converts object data to a simple string value or CSV Export
public getForCsvExport ( AbstractObject $object, array $params = [] ) : string
$object Pimcore\Model\Object\AbstractObject
$params array
Résultat string

getForWebserviceExport() public méthode

converts data to be exposed via webservices
public getForWebserviceExport ( AbstractObject $object, mixed $params = [] ) : mixed
$object Pimcore\Model\Object\AbstractObject
$params mixed
Résultat mixed

getFromCsvImport() public méthode

public getFromCsvImport ( $importValue, null | AbstractObject $object = null, mixed $params = [] ) : mixed
$importValue
$object null | Pimcore\Model\Object\AbstractObject
$params mixed
Résultat mixed

getFromWebserviceImport() public méthode

converts data to be imported via webservices
public getFromWebserviceImport ( mixed $value, null | AbstractObject $object = null, mixed $params = [], $idMapper = null ) : mixed
$value mixed
$object null | Pimcore\Model\Object\AbstractObject
$params mixed
Résultat mixed

getGetterCode() public méthode

Creates getter code which is used for generation of php file for object classes using this data type
public getGetterCode ( $class ) : string
$class
Résultat string

getGetterCodeFieldcollection() public méthode

Creates getter code which is used for generation of php file for fieldcollectionk classes using this data type
public getGetterCodeFieldcollection ( $fieldcollectionDefinition ) : string
$fieldcollectionDefinition
Résultat string

getGetterCodeLocalizedfields() public méthode

Creates getter code which is used for generation of php file for localized fields in classes using this data type
public getGetterCodeLocalizedfields ( $class ) : string
$class
Résultat string

getGetterCodeObjectbrick() public méthode

Creates getter code which is used for generation of php file for object brick classes using this data type
public getGetterCodeObjectbrick ( $brickClass ) : string
$brickClass
Résultat string

getIndex() public méthode

public getIndex ( ) : integer
Résultat integer

getInvisible() public méthode

public getInvisible ( ) : boolean
Résultat boolean

getLocked() public méthode

public getLocked ( ) : boolean
Résultat boolean

getMandatory() public méthode

public getMandatory ( ) : boolean
Résultat boolean

getName() public méthode

public getName ( ) : string
Résultat string

getNoteditable() public méthode

public getNoteditable ( ) : boolean
Résultat boolean

getPermissions() public méthode

public getPermissions ( ) : array
Résultat array

getPhpdocType() public méthode

public getPhpdocType ( ) : string
Résultat string

getQueryColumnType() public méthode

public getQueryColumnType ( ) : string | array
Résultat string | array | array

getSetterCode() public méthode

Creates setter code which is used for generation of php file for object classes using this data type
public getSetterCode ( $class ) : string
$class
Résultat string

getSetterCodeFieldcollection() public méthode

Creates setter code which is used for generation of php file for fieldcollection classes using this data type
public getSetterCodeFieldcollection ( $fieldcollectionDefinition ) : string
$fieldcollectionDefinition
Résultat string

getSetterCodeLocalizedfields() public méthode

Creates setter code which is used for generation of php file for localized fields in classes using this data type
public getSetterCodeLocalizedfields ( $class ) : string
$class
Résultat string

getSetterCodeObjectbrick() public méthode

Creates setter code which is used for generation of php file for object brick classes using this data type
public getSetterCodeObjectbrick ( $brickClass ) : string
$brickClass
Résultat string

getStyle() public méthode

public getStyle ( ) : boolean
Résultat boolean

getTitle() public méthode

public getTitle ( ) : string
Résultat string

getTooltip() public méthode

public getTooltip ( ) : string
Résultat string

getVersionPreview() public méthode

public getVersionPreview ( $data, null | AbstractObject $object = null, mixed $params = [] ) : string
$data
$object null | Pimcore\Model\Object\AbstractObject
$params mixed
Résultat string

getVisibleGridView() public méthode

public getVisibleGridView ( ) : boolean
Résultat boolean

getVisibleSearch() public méthode

public getVisibleSearch ( ) : boolean
Résultat boolean

isDiffChangeAllowed() public méthode

True if change is allowed in edit mode.
public isDiffChangeAllowed ( string $object, mixed $params = [] ) : boolean
$object string
$params mixed
Résultat boolean

isEmpty() public méthode

public isEmpty ( Concrete $data ) : boolean
$data Pimcore\Model\Object\Concrete
Résultat boolean

isRelationType() public méthode

public isRelationType ( ) : boolean
Résultat boolean

marshal() public méthode

Encode value for packing it into a single column.
public marshal ( mixed $value, AbstractObject $object = null, mixed $params = [] ) : mixed
$value mixed
$object Pimcore\Model\Object\AbstractObject
$params mixed
Résultat mixed

resolveDependencies() public méthode

public resolveDependencies ( $data ) : array
$data
Résultat array

setColumnType() public méthode

public setColumnType ( string | array $columnType )
$columnType string | array

setDatatype() public méthode

public setDatatype ( string $datatype )
$datatype string

setDropNullValues() public static méthode

public static setDropNullValues ( $dropNullValues )
$dropNullValues

setFieldtype() public méthode

public setFieldtype ( string $fieldtype )
$fieldtype string

setIndex() public méthode

public setIndex ( integer $index )
$index integer

setInvisible() public méthode

public setInvisible ( $invisible )
$invisible

setLocked() public méthode

public setLocked ( $locked )
$locked

setMandatory() public méthode

public setMandatory ( boolean $mandatory )
$mandatory boolean

setName() public méthode

public setName ( string $name )
$name string

setNoteditable() public méthode

public setNoteditable ( boolean $noteditable )
$noteditable boolean

setPermissions() public méthode

public setPermissions ( array $permissions )
$permissions array

setQueryColumnType() public méthode

public setQueryColumnType ( string | array $queryColumnType )
$queryColumnType string | array

setStyle() public méthode

public setStyle ( $style )
$style

setTitle() public méthode

public setTitle ( string $title )
$title string

setTooltip() public méthode

public setTooltip ( $tooltip )
$tooltip

setValues() public méthode

public setValues ( array $data = [] )
$data array

setVisibleGridView() public méthode

public setVisibleGridView ( $visibleGridView )
$visibleGridView

setVisibleSearch() public méthode

public setVisibleSearch ( $visibleSearch )
$visibleSearch

synchronizeWithMasterDefinition() public méthode

public synchronizeWithMasterDefinition ( Data $masterDefinition )
$masterDefinition Data

unmarshal() public méthode

See marshal
public unmarshal ( $data, AbstractObject $object = null, $params = [] ) : mixed
$object Pimcore\Model\Object\AbstractObject
Résultat mixed

Property Details

$columnType public_oe property

| array
public string|array $columnType
Résultat string | array

$datatype public_oe property

public string $datatype
Résultat string

$dropNullValues protected_oe static_oe property

If set to true then null values will not be exported.
protected static $dropNullValues

$fieldtype public_oe property

public string $fieldtype
Résultat string

$index public_oe property

public int $index
Résultat integer

$invisible public_oe property

public bool $invisible
Résultat boolean

$locked public_oe property

public bool $locked
Résultat boolean

$mandatory public_oe property

public bool $mandatory
Résultat boolean

$name public_oe property

public string $name
Résultat string

$noteditable public_oe property

public bool $noteditable
Résultat boolean

$permissions public_oe property

public array $permissions
Résultat array

$queryColumnType public_oe property

| array
public string|array $queryColumnType
Résultat string | array

$relationType public_oe property

public bool $relationType
Résultat boolean

$style public_oe property

public bool $style
Résultat boolean

$title public_oe property

public string $title
Résultat string

$tooltip public_oe property

public string $tooltip
Résultat string

$validFilterOperators public_oe static_oe property

public static array $validFilterOperators
Résultat array

$visibleGridView public_oe property

public bool $visibleGridView
Résultat boolean

$visibleSearch public_oe property

public bool $visibleSearch
Résultat boolean