Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
isAdminIntegration example
return
$source
;
}
if
(
$userId
!== null
)
{
$source
->
setPermissions
(
$this
->
fetchPermissions
(
$userId
)
)
;
$source
->
setIsAdmin
(
$this
->
isAdmin
(
$userId
)
)
;
return
$source
;
}
if
(
$integrationId
!== null
)
{
$source
->
setIsAdmin
(
$this
->
isAdminIntegration
(
$integrationId
)
)
;
$source
->
setPermissions
(
$this
->
fetchIntegrationPermissions
(
$integrationId
)
)
;
return
$source
;
}
return
$source
;
}
private
function
isAdmin
(
string
$userId
)
: bool
{
return
(bool)
$this
->connection->
fetchOne
(