Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getRestResourceDependencies example
return
[
'resource' =>
new
DefaultSingleLazyPluginCollection
(
$this
->
getResourcePluginManager
(
)
,
$this
->plugin_id,
[
]
)
,
]
;
}
/** * {@inheritdoc} */
public
function
calculateDependencies
(
)
{
parent::
calculateDependencies
(
)
;
foreach
(
$this
->
getRestResourceDependencies
(
)
->
calculateDependencies
(
$this
)
as
$type
=>
$dependencies
)
{
foreach
(
$dependencies
as
$dependency
)
{
$this
->
addDependency
(
$type
,
$dependency
)
;
}
}
return
$this
;
}
/** * {@inheritdoc} */
public
function
onDependencyRemoval
(
array
$dependencies
)
{