array_pop($parts);
} $parts[] = 'c_' .
$currencyId;
$parts[] =
$taxState;
return implode('.',
$parts);
} public function parseSorting(FieldSorting
$sorting, EntityDefinition
$definition, Context
$context): FieldSort
{ if ($this->
isCheapestPriceField($sorting->
getField())) { return new FieldSort('_script',
$sorting->
getDirection(), null,
[ 'type' => 'number',
'script' =>
[ 'id' => 'cheapest_price',
'params' =>
$this->
getCheapestPriceParameters($context),
],
]);
} if ($this->
isCheapestPriceField($sorting->
getField(), true
)) { return new FieldSort('_script',
$sorting->
getDirection(), null,
[