Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
highestRate example
foreach
(
$this
->
getIterator
(
)
as
$price
)
{
$taxes
->
merge
(
$price
->
getCalculatedTaxes
(
)
)
;
}
return
$taxes
;
}
public
function
getHighestTaxRule
(
)
: TaxRuleCollection
{
$rules
=
new
TaxRuleCollection
(
)
;
$highestRate
=
$this
->
getTaxRules
(
)
->
highestRate
(
)
;
if
(
$highestRate
!== null
)
{
$rules
->
add
(
new
TaxRule
(
$highestRate
->
getTaxRate
(
)
, 100
)
)
;
}
return
$rules
;
}
public
function
merge
(
self
$prices
)
: self
{
return
new
self
(
array_merge
(
$this
->elements,
$prices
->
getElements
(
)
)
)
;
}