/**
* @throws CustomValidationException
* @throws ValidationException
*
* @return ProductModel
*/
public function create(array
$params) { $this->
checkPrivilege('create'
);
$product =
new ProductModel();
$translations =
[];
if (!
empty($params['translations'
])) { $translations =
$params['translations'
];
unset($params['translations'
]);
} $params =
$this->
prepareAssociatedData($params,
$product);
$product->
fromArray($params);