$this->
getModelManager()->
persist($model);
$this->
getModelManager()->
flush();
} $this->
View()->
assign(['success' => true
]);
} private function beforeSaveElement(array
$elementData): void
{ if ($elementData['name'
] === 'shopsalutations'
) { $this->
createSalutationSnippets($elementData);
} } /**
* @return int[] indexed by shop id
*/
private function getShopLocaleMapping(): array
{ $connection =
Shopware()->
Container()->
get(Connection::
class);
$query =
$connection->
createQueryBuilder();
$query->
select(['locale_id, IFNULL(main_id, id)'
]);