Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
removeAppAndRole example
/** * @param array{id: string} $app */
public
function
delete
(
string
$appName
, array
$app
, Context
$context
, bool
$keepUserData
= false
)
: void
{
$appEntity
=
$this
->
loadApp
(
$app
[
'id'
]
,
$context
)
;
if
(
$appEntity
->
isActive
(
)
)
{
$this
->appStateService->
deactivateApp
(
$appEntity
->
getId
(
)
,
$context
)
;
}
$this
->
removeAppAndRole
(
$appEntity
,
$context
,
$keepUserData
, true
)
;
$this
->assetService->
removeAssets
(
$appEntity
->
getName
(
)
)
;
$this
->customEntitySchemaUpdater->
update
(
)
;
}
public
function
ensureIsCompatible
(
Manifest
$manifest
)
: void
{
$versionParser
=
new
VersionParser
(
)
;
if
(
!
$manifest
->
getMetadata
(
)
->
getCompatibility
(
)
->
matches
(
$versionParser
->
parseConstraints
(
$this
->shopwareVersion
)
)
)
{
throw
AppException::
notCompatible
(
$manifest
->
getMetadata
(
)
->
getName
(
)
)
;
}
}