CodeExplorer highestTypePosition example
$taxRules =
$taxRules->
filter(function DTaxRuleEntity
$taxRule) use ($customer,
$shippingLocation) { foreach ($this->taxRuleTypeFilter
as $ruleTypeFilter) { if ($ruleTypeFilter->
match($taxRule,
$customer,
$shippingLocation)) { return true;
} } return false;
});
$matchingRules =
new TaxRuleCollection();
$taxRule =
$taxRules->
highestTypePosition();
if (!
$taxRule) { $tax->
setRules($matchingRules);
continue;
} $taxRules =
$taxRules->
filterByTypePosition($taxRule->
getType()->
getPosition());
$taxRule =
$taxRules->
latestActivationDate();
if ($taxRule) {