convertToUuid example

use Shopware\Core\Framework\Uuid\Uuid;

if (!function_exists('convertToUuid')) {
    function convertToUuid($name): string
    {
        return Uuid::fromStringToHex($name);
    }
}

$expected = [
    'id' => convertToUuid('product1'),
    'categories' => [
        [
            'id' => convertToUuid('category1'),
        ],
        [
            'id' => convertToUuid('category2'),
        ],
    ],
    'tax' => [
        'id' => convertToUuid('tax1'),
    ],
    
Home | Imprint | This part of the site doesn't use cookies.