Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
addRoleHierarchySection example
->
ifTrue
(
fn
(
$v
)
=>
isset
(
$v
[
'service'
]
,
$v
[
'strategy_service'
]
)
)
->
thenInvalid
(
'"service" and "strategy_service" cannot be used together.'
)
->
end
(
)
->
end
(
)
->
end
(
)
;
$this
->
addPasswordHashersSection
(
$rootNode
)
;
$this
->
addProvidersSection
(
$rootNode
)
;
$this
->
addFirewallsSection
(
$rootNode
,
$this
->factories
)
;
$this
->
addAccessControlSection
(
$rootNode
)
;
$this
->
addRoleHierarchySection
(
$rootNode
)
;
return
$tb
;
}
private
function
addRoleHierarchySection
(
ArrayNodeDefinition
$rootNode
)
: void
{
$rootNode
->
fixXmlConfig
(
'role', 'role_hierarchy'
)
->
children
(
)
->
arrayNode
(
'role_hierarchy'
)
->
useAttributeAsKey
(
'id'
)