Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setColumnType example
$default
=
$column
->
getDefault
(
)
;
if
(
$default
=== 'NULL'
)
{
$default
= null;
}
$item
=
new
ConfigurationStruct
(
)
;
$item
->
setTableName
(
$table
)
;
$item
->
setColumnName
(
$column
->
getName
(
)
)
;
$item
->
setIdentifier
(
$this
->tableMapping->
isIdentifierColumn
(
$table
,
$column
->
getName
(
)
)
)
;
$item
->
setCore
(
$this
->tableMapping->
isCoreColumn
(
$table
,
$column
->
getName
(
)
)
)
;
$item
->
setColumnType
(
$this
->typeMapping->
dbalToUnified
(
$column
->
getType
(
)
)
)
;
$item
->
setElasticSearchType
(
$this
->typeMapping->
unifiedToElasticSearch
(
$item
->
getColumnType
(
)
)
)
;
$item
->
setDefaultValue
(
$default
)
;
if
(
isset
(
$configuration
[
$name
]
)
)
{
$config
=
$configuration
[
$name
]
;
$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'
]
)
;