Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getExposeSettings example
$m
=
new
Migration1681382023AddCustomFieldAllowCartExpose
(
)
;
$m
->
update
(
$con
)
;
static
::
assertTrue
(
$this
->
columnExists
(
$con
)
)
;
$con
->
setNestTransactionsWithSavepoints
(
true
)
;
$con
->
beginTransaction
(
)
;
$this
->
createCustomFields
(
)
;
$this
->
createRule
(
)
;
static
::
assertEquals
(
[
'0', '0', '0'
]
,
$this
->
getExposeSettings
(
$con
)
)
;
$m
->
update
(
$con
)
;
static
::
assertEquals
(
[
'1', '0', '1'
]
,
$this
->
getExposeSettings
(
$con
)
)
;
$con
->
rollBack
(
)
;
}
private
function
columnExists
(
Connection
$connection
)
: bool
{
$field
=
$connection
->
fetchOne
(