abstract class Data (View source)

Traits

Properties

string $name
string $title
string $tooltip
bool $mandatory
bool $noteditable
int $index
bool $locked
bool $style
array $permissions
string $datatype
string $columnType
string $queryColumnType
string $fieldtype
bool $relationType
bool $invisible
bool $visibleGridView
bool $visibleSearch
static protected $dropNullValues If set to true then null values will not be exported.
static array $validFilterOperators

Methods

static VarExport
__set_state($data)

No description

from VarExport
mixed
getDataForEditmode(mixed $data, null|AbstractObject $object = null, mixed $params = [])

Returns the data for the editmode

mixed
getDataFromEditmode(mixed $data, null|AbstractObject $object = null, mixed $params = [])

Converts data from editmode to internal eg. Image-Id to Asset\Image object

checkValidity(mixed $data, bool $omitMandatoryCheck = false)

Checks if data is valid for current data field

string
getForCsvExport(AbstractObject $object, array $params = [])

converts object data to a simple string value or CSV Export

mixed
getFromCsvImport($importValue, null|AbstractObject $object = null, mixed $params = [])

No description

string
getDataForSearchIndex($object, mixed $params = [])

No description

mixed
getForWebserviceExport(AbstractObject $object, mixed $params = [])

converts data to be exposed via webservices

mixed
getFromWebserviceImport(mixed $value, null|AbstractObject $object = null, mixed $params = [], $idMapper = null)

converts data to be imported via webservices

string
getName()

No description

string
getTitle()

No description

bool
getMandatory()

No description

array
getPermissions()

No description

$this
setName(string $name)

No description

$this
setTitle(string $title)

No description

$this
setMandatory(bool $mandatory)

No description

$this
setPermissions(array $permissions)

No description

$this
setValues(array $data = [])

No description

string
getDatatype()

No description

$this
setDatatype(string $datatype)

No description

string
getFieldtype()

No description

$this
setFieldtype(string $fieldtype)

No description

string
getColumnType()

No description

$this
setColumnType(string $columnType)

No description

string
getQueryColumnType()

No description

$this
setQueryColumnType(string $queryColumnType)

No description

bool
getNoteditable()

No description

$this
setNoteditable(bool $noteditable)

No description

int
getIndex()

No description

$this
setIndex(int $index)

No description

string
getPhpdocType()

No description

bool
getStyle()

No description

$this
setStyle($style)

No description

bool
getLocked()

No description

$this
setLocked($locked)

No description

string
getTooltip()

No description

$this
setTooltip($tooltip)

No description

bool
isRelationType()

No description

bool
getInvisible()

No description

$this
setInvisible($invisible)

No description

bool
getVisibleGridView()

No description

$this
setVisibleGridView($visibleGridView)

No description

bool
getVisibleSearch()

No description

$this
setVisibleSearch($visibleSearch)

No description

array
getCacheTags(mixed $data, array $tags = [])

This is a dummy and is mostly implemented by relation types

array
resolveDependencies($data)

No description

string
getFilterCondition($value, $operator, $params = [])

returns sql query statement to filter according to this data types value(s)

string
getFilterConditionExt($value, $operator, array $params = [])

returns sql query statement to filter according to this data types value(s)

string
getGetterCode($class)

Creates getter code which is used for generation of php file for object classes using this data type

string
getSetterCode($class)

Creates setter code which is used for generation of php file for object classes using this data type

string
getGetterCodeObjectbrick($brickClass)

Creates getter code which is used for generation of php file for object brick classes using this data type

string
getSetterCodeObjectbrick($brickClass)

Creates setter code which is used for generation of php file for object brick classes using this data type

string
getGetterCodeFieldcollection($fieldcollectionDefinition)

Creates getter code which is used for generation of php file for fieldcollectionk classes using this data type

string
getSetterCodeFieldcollection($fieldcollectionDefinition)

Creates setter code which is used for generation of php file for fieldcollection classes using this data type

string
getGetterCodeLocalizedfields($class)

Creates getter code which is used for generation of php file for localized fields in classes using this data type

string
getSetterCodeLocalizedfields($class)

Creates setter code which is used for generation of php file for localized fields in classes using this data type

int|null
getAsIntegerCast($number)

No description

float
getAsFloatCast($number)

No description

string
getVersionPreview($data, null|AbstractObject $object = null, mixed $params = [])

No description

bool
isEmpty(Concrete $data)

No description

bool
isDiffChangeAllowed(string $object, mixed $params = [])

True if change is allowed in edit mode.

mixed
getDiffDataFromEditmode($data, null $object = null, mixed $params = [])

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

null|array
getDiffDataForEditMode(mixed $data, null|AbstractObject $object = null, mixed $params = [])

Returns the data for the editmode in the format expected by the object merger plugin.

static 
setDropNullValues($dropNullValues)

No description

static 
getDropNullValues()

No description

bool
getUnique()

No description

mixed
getDataFromObjectParam($object, array $params = [])

No description

synchronizeWithMasterDefinition(Data $masterDefinition)

No description

adoptMasterDefinition(Data $masterDefinition)

No description

mixed
marshal(mixed $value, AbstractObject $object = null, mixed $params = [])

Encode value for packing it into a single column.

mixed
unmarshal(mixed $data, AbstractObject $object = null, array $params = [])

See marshal

mixed
appendData($existingData, $additionalData)

No description

bool
supportsInheritance()

Returns if datatype supports data inheritance

Details

static VarExport __set_state($data)

Parameters

$data

Return Value

VarExport

abstract mixed getDataForEditmode(mixed $data, null|AbstractObject $object = null, mixed $params = [])

Returns the data for the editmode

Parameters

mixed $data
null|AbstractObject $object
mixed $params

Return Value

mixed

abstract mixed getDataFromEditmode(mixed $data, null|AbstractObject $object = null, mixed $params = [])

Converts data from editmode to internal eg. Image-Id to Asset\Image object

Parameters

mixed $data
null|AbstractObject $object
mixed $params

Return Value

mixed

checkValidity(mixed $data, bool $omitMandatoryCheck = false)

Checks if data is valid for current data field

Parameters

mixed $data
bool $omitMandatoryCheck

Exceptions

Exception

string getForCsvExport(AbstractObject $object, array $params = [])

converts object data to a simple string value or CSV Export

Parameters

AbstractObject $object
array $params

Return Value

string

mixed getFromCsvImport($importValue, null|AbstractObject $object = null, mixed $params = [])

Parameters

$importValue
null|AbstractObject $object
mixed $params

Return Value

mixed

string getDataForSearchIndex($object, mixed $params = [])

Parameters

$object
mixed $params

Return Value

string

mixed getForWebserviceExport(AbstractObject $object, mixed $params = [])

converts data to be exposed via webservices

Parameters

AbstractObject $object
mixed $params

Return Value

mixed

mixed getFromWebserviceImport(mixed $value, null|AbstractObject $object = null, mixed $params = [], $idMapper = null)

converts data to be imported via webservices

Parameters

mixed $value
null|AbstractObject $object
mixed $params
$idMapper

Return Value

mixed

string getName()

Return Value

string

string getTitle()

Return Value

string

bool getMandatory()

Return Value

bool

array getPermissions()

Return Value

array

$this setName(string $name)

Parameters

string $name

Return Value

$this

$this setTitle(string $title)

Parameters

string $title

Return Value

$this

$this setMandatory(bool $mandatory)

Parameters

bool $mandatory

Return Value

$this

$this setPermissions(array $permissions)

Parameters

array $permissions

Return Value

$this

$this setValues(array $data = [])

Parameters

array $data

Return Value

$this

string getDatatype()

Return Value

string

$this setDatatype(string $datatype)

Parameters

string $datatype

Return Value

$this

string getFieldtype()

Return Value

string

$this setFieldtype(string $fieldtype)

Parameters

string $fieldtype

Return Value

$this

string getColumnType()

Return Value

string | array

$this setColumnType(string $columnType)

Parameters

string $columnType | array $columnType

Return Value

$this

string getQueryColumnType()

Return Value

string | array

$this setQueryColumnType(string $queryColumnType)

Parameters

string $queryColumnType | array $queryColumnType

Return Value

$this

bool getNoteditable()

Return Value

bool

$this setNoteditable(bool $noteditable)

Parameters

bool $noteditable

Return Value

$this

int getIndex()

Return Value

int

$this setIndex(int $index)

Parameters

int $index

Return Value

$this

string getPhpdocType()

Return Value

string

bool getStyle()

Return Value

bool

$this setStyle($style)

Parameters

$style

Return Value

$this

bool getLocked()

Return Value

bool

$this setLocked($locked)

Parameters

$locked

Return Value

$this

string getTooltip()

Return Value

string

$this setTooltip($tooltip)

Parameters

$tooltip

Return Value

$this

bool isRelationType()

Return Value

bool

bool getInvisible()

Return Value

bool

$this setInvisible($invisible)

Parameters

$invisible

Return Value

$this

bool getVisibleGridView()

Return Value

bool

$this setVisibleGridView($visibleGridView)

Parameters

$visibleGridView

Return Value

$this

bool getVisibleSearch()

Return Value

bool

$this setVisibleSearch($visibleSearch)

Parameters

$visibleSearch

Return Value

$this

array getCacheTags(mixed $data, array $tags = [])

This is a dummy and is mostly implemented by relation types

Parameters

mixed $data
array $tags

Return Value

array

array resolveDependencies($data)

Parameters

$data

Return Value

array

string getFilterCondition($value, $operator, $params = [])

returns sql query statement to filter according to this data types value(s)

Parameters

$value
$operator
$params

Return Value

string

string getFilterConditionExt($value, $operator, array $params = [])

returns sql query statement to filter according to this data types value(s)

Parameters

$value
$operator
array $params optional params used to change the behavior

Return Value

string

string getGetterCode($class)

Creates getter code which is used for generation of php file for object classes using this data type

Parameters

$class

Return Value

string

string getSetterCode($class)

Creates setter code which is used for generation of php file for object classes using this data type

Parameters

$class

Return Value

string

string getGetterCodeObjectbrick($brickClass)

Creates getter code which is used for generation of php file for object brick classes using this data type

Parameters

$brickClass

Return Value

string

string getSetterCodeObjectbrick($brickClass)

Creates setter code which is used for generation of php file for object brick classes using this data type

Parameters

$brickClass

Return Value

string

string getGetterCodeFieldcollection($fieldcollectionDefinition)

Creates getter code which is used for generation of php file for fieldcollectionk classes using this data type

Parameters

$fieldcollectionDefinition

Return Value

string

string getSetterCodeFieldcollection($fieldcollectionDefinition)

Creates setter code which is used for generation of php file for fieldcollection classes using this data type

Parameters

$fieldcollectionDefinition

Return Value

string

string getGetterCodeLocalizedfields($class)

Creates getter code which is used for generation of php file for localized fields in classes using this data type

Parameters

$class

Return Value

string

string getSetterCodeLocalizedfields($class)

Creates setter code which is used for generation of php file for localized fields in classes using this data type

Parameters

$class

Return Value

string

int|null getAsIntegerCast($number)

Parameters

$number

Return Value

int|null

float getAsFloatCast($number)

Parameters

$number

Return Value

float

string getVersionPreview($data, null|AbstractObject $object = null, mixed $params = [])

Parameters

$data
null|AbstractObject $object
mixed $params

Return Value

string

bool isEmpty(Concrete $data)

Parameters

Concrete $data

Return Value

bool

bool isDiffChangeAllowed(string $object, mixed $params = [])

True if change is allowed in edit mode.

Parameters

string $object
mixed $params

Return Value

bool

mixed getDiffDataFromEditmode($data, null $object = null, mixed $params = [])

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

Parameters

$data
null $object
mixed $params

Return Value

mixed

null|array getDiffDataForEditMode(mixed $data, null|AbstractObject $object = null, mixed $params = [])

Returns the data for the editmode in the format expected by the object merger plugin.

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

Parameters

mixed $data
null|AbstractObject $object
mixed $params

Return Value

null|array

static setDropNullValues($dropNullValues)

Parameters

$dropNullValues

static getDropNullValues()

bool getUnique()

Return Value

bool

protected mixed getDataFromObjectParam($object, array $params = [])

Parameters

$object
array $params

Return Value

mixed

Exceptions

Exception

synchronizeWithMasterDefinition(Data $masterDefinition)

Parameters

Data $masterDefinition

adoptMasterDefinition(Data $masterDefinition)

Parameters

Data $masterDefinition

mixed marshal(mixed $value, AbstractObject $object = null, mixed $params = [])

Encode value for packing it into a single column.

Parameters

mixed $value
AbstractObject $object
mixed $params

Return Value

mixed

mixed unmarshal(mixed $data, AbstractObject $object = null, array $params = [])

See marshal

Parameters

mixed $data
AbstractObject $object
array $params

Return Value

mixed

mixed appendData($existingData, $additionalData)

Parameters

$existingData
$additionalData

Return Value

mixed

bool supportsInheritance()

Returns if datatype supports data inheritance

Return Value

bool