$this->
createDefaultSortingsWithTranslations($connection);
} public function updateDestructive(Connection
$connection): void
{ // implement update destructive
} public function createDefaultSortingsWithTranslations(Connection
$connection): void
{ $sorting =
$this->
getTopsellerSorting();
$translations =
$sorting['translations'
];
unset($sorting['translations'
]);
$connection->
insert(ProductSortingDefinition::ENTITY_NAME,
$sorting);
$translations =
new Translations( ['product_sorting_id' =>
$sorting['id'
], 'label' =>
$translations['de-DE'
]],
['product_sorting_id' =>
$sorting['id'
], 'label' =>
$translations['en-GB'
]] );