$this->
importTranslation('product_sorting_translation',
$translations,
$connection);
} /**
* @return array{id: string, priority: int, active: int, locked: int, fields: string, created_at: string, translations: array{de-DE: string, en-GB: string}}
*/
private function getTopsellerSorting(): array
{ return [ 'id' => Uuid::
randomBytes(),
'url_key' => 'topseller',
'priority' => 0,
'active' => 1,
'locked' => 0,
'fields' =>
json_encode([['field' => 'product.sales', 'order' => 'desc', 'priority' => 1, 'naturalSorting' => 0
]], \JSON_THROW_ON_ERROR
),
'created_at'
=> (new \
DateTime())->
format(Defaults::STORAGE_DATE_TIME_FORMAT
),
'translations' =>
[ 'de-DE' => 'Topseller',
'en-GB' => 'Topseller',
],
];
}