Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setDbalType example
$item
->
setId
(
(int)
$config
[
'id'
]
)
;
$item
->
setColumnType
(
$config
[
'columnType'
]
)
;
$item
->
setSupportText
(
$config
[
'supportText'
]
)
;
$item
->
setHelpText
(
$config
[
'helpText'
]
)
;
$item
->
setDisplayInBackend
(
(bool)
$config
[
'displayInBackend'
]
)
;
$item
->
setReadonly
(
(bool)
$config
[
'readonly'
]
)
;
$item
->
setLabel
(
$config
[
'label'
]
)
;
$item
->
setPosition
(
(int)
$config
[
'position'
]
)
;
$item
->
setCustom
(
(bool)
$config
[
'custom'
]
)
;
$item
->
setTranslatable
(
(bool)
$config
[
'translatable'
]
)
;
$item
->
setConfigured
(
true
)
;
$item
->
setDbalType
(
$column
->
getType
(
)
->
getName
(
)
)
;
$item
->
setSqlType
(
$this
->typeMapping->
unifiedToSQL
(
$item
->
getColumnType
(
)
)
)
;
$item
->
setEntity
(
$config
[
'entity'
]
)
;
$item
->
setArrayStore
(
$config
[
'arrayStore'
]
)
;
$item
->
setElasticSearchType
(
$this
->typeMapping->
unifiedToElasticSearch
(
$config
[
'columnType'
]
)
)
;
$item
->
setDefaultValue
(
$config
[
'defaultValue'
]
=== 'NULL' ? null :
$config
[
'defaultValue'
]
)
;
}
$items
[
]
=
$item
;
}
usort
(
$items
,
function
DConfigurationStruct
$a
, ConfigurationStruct
$b
)
{
if
(
$a
->
getPosition
(
)
=== null &&
$b
->
getPosition
(
)
!== null
)
{