Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setActiveMax example
if
(
!
$criteria
->
hasUserCondition
(
'price'
)
)
{
$facet
->
setActive
(
false
)
;
return
;
}
/** @var PriceCondition $condition */
$condition
=
$criteria
->
getUserCondition
(
'price'
)
;
$facet
->
setActiveMin
(
$condition
->
getMinPrice
(
)
)
;
$facet
->
setActiveMax
(
$condition
->
getMaxPrice
(
)
)
;
}
/** * @param FacetResultInterface[] $facets */
private
function
switchPriceFilterValues
(
array
$facets
, Criteria
$criteria
)
{
/** @var RangeFacetResult|null $facet */
$facet
=
$this
->
getFacetByName
(
$facets
, 'price'
)
;
if
(
$facet
&&
$criteria
->
hasBaseCondition
(
'price'
)
)
{