Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
sortSettings example
public
function
load
(
SalesChannelProductEntity
$product
,
SalesChannelContext
$context
)
: PropertyGroupCollection
{
if
(
!
$product
->
getParentId
(
)
)
{
return
new
PropertyGroupCollection
(
)
;
}
$groups
=
$this
->
loadSettings
(
$product
,
$context
)
;
$groups
=
$this
->
sortSettings
(
$groups
,
$product
)
;
$combinations
=
$this
->combinationLoader->
loadCombinations
(
$product
->
getParentId
(
)
,
$context
,
)
;
$current
=
$this
->
buildCurrentOptions
(
$product
,
$groups
)
;
foreach
(
$groups
as
$group
)
{
$options
=
$group
->
getOptions
(
)
;
if
(
$options
=== null
)
{