Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setSchemaAssetsFilter example
return
$this
->driverConnection->
delete
(
$this
->configuration
[
'table_name'
]
,
[
'id' =>
$id
]
)
> 0;
}
catch
(
DBALException
$exception
)
{
throw
new
TransportException
(
$exception
->
getMessage
(
)
, 0,
$exception
)
;
}
}
public
function
setup
(
)
: void
{
$configuration
=
$this
->driverConnection->
getConfiguration
(
)
;
$assetFilter
=
$configuration
->
getSchemaAssetsFilter
(
)
;
$configuration
->
setSchemaAssetsFilter
(
static
fn
(
)
=> true
)
;
$this
->
updateSchema
(
)
;
$configuration
->
setSchemaAssetsFilter
(
$assetFilter
)
;
$this
->autoSetup = false;
}
public
function
getMessageCount
(
)
: int
{
$queryBuilder
=
$this
->
createAvailableMessagesQueryBuilder
(
)
->
select
(
'COUNT(m.id) AS message_count'
)
->
setMaxResults
(
1
)
;