src/Entities/CartItemExtra.php
public static function createFromArray(array $selectedExtras, Product $product) // TODO
    {
        $extras = [];

        foreach ($selectedExtras as $extra) {
            list($setId, $extraId) = explode('_', $extra);

            $extraSet = $product->getExtraSetByID($setId);

            $extras[] = new static($extraSet, $extraSet->getExtraByID($extraId));
        }

        return $extras;
    }
public static function createFromArray(array $selectedExtras, Product $product) // TODO
    {
        $extras = [];

        foreach ($selectedExtras as $extra) {
            list($setId, $extraId) = explode('_', $extra);

            $extraSet = $product->getExtraSetByID($setId);

            $extras[] = new static($extraSet, $extraSet->getExtraByID($extraId));
        }

        return $extras;
    }
@param array   $selectedExtras
@param Product $product

@return array|static[]