src/Entity/Gos/ProductVariant.php line 26

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos;
  3. use App\Entity\Gos\Uniqskills\Certificate;
  4. use App\Entity\Gos\Uniqskills\Course;
  5. use App\Entity\Gos\Uniqskills\Package;
  6. use App\Entity\Gos\VirtualCurrency\ProductVariantVirtualCurrencySettings;
  7. use App\Enum\Product\ProductSourceSystem;
  8. use Doctrine\Common\Collections\ArrayCollection;
  9. use Doctrine\Common\Collections\Collection;
  10. use Doctrine\ORM\Mapping as ORM;
  11. use Doctrine\ORM\Mapping\OrderBy;
  12. use Symfony\Component\HttpFoundation\File\File;
  13. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  14. use JMS\Serializer\Annotation as JMS;
  15. /**
  16.  * ProductVariant
  17.  *
  18.  * @ORM\Table(name="product_variant")
  19.  * @ORM\Entity(repositoryClass="App\Repository\ProductVariantRepository")
  20.  * @ORM\HasLifecycleCallbacks
  21.  * @Vich\Uploadable
  22.  */
  23. class ProductVariant
  24. {
  25.     /**
  26.      * @var int
  27.      *
  28.      * @ORM\Column(name="id", type="integer")
  29.      * @ORM\Id
  30.      * @ORM\GeneratedValue(strategy="AUTO")
  31.      * @JMS\Groups({"PortalSettings"})
  32.      */
  33.     private $id;
  34.     /**
  35.      * @var bool
  36.      *
  37.      * @ORM\Column(name="isVirtual", type="boolean", nullable=true)
  38.      * @JMS\Groups({"PortalSettings"})
  39.      */
  40.     private $isVirtual;
  41.     /**
  42.      * @var bool
  43.      *
  44.      * @ORM\Column(type="boolean", nullable=true)
  45.      */
  46.     private $isTest;
  47.     /**
  48.      * @var string
  49.      *
  50.      * @ORM\Column(type="string", length=255, nullable=true)
  51.      */
  52.     private $productVariantNo;
  53.     /**
  54.      * @var string
  55.      *
  56.      * @ORM\Column(type="string", length=255, nullable=true)
  57.      */
  58.     private $productNumberNoTax;
  59.     /**
  60.      * @var string
  61.      *
  62.      * @ORM\Column(type="string", length=255, nullable=true)
  63.      */
  64.     private $productNumberPartTax;
  65.     /**
  66.      * @var ProductVariant
  67.      *
  68.      * @ORM\ManyToOne(targetEntity=ProductVariant::class)
  69.      * @ORM\JoinColumn(name="bur_funding_product_variant_id", referencedColumnName="id", nullable=true)
  70.      */
  71.     private $burFundingProductVariant;
  72.     /**
  73.      * @var int
  74.      *
  75.      * @ORM\Column(type="integer", nullable=true)
  76.      */
  77.     private $productVariantId;
  78.     /**
  79.      * @var string
  80.      *
  81.      * @ORM\Column(type="string", length=255, nullable=true, unique=true)
  82.      * @JMS\Groups({"PortalSettings"})
  83.      */
  84.     private $productVariantNoComplete;
  85.     /**
  86.      * @var string
  87.      *
  88.      * @ORM\Column(type="string", length=255, nullable=true)
  89.      */
  90.     private $productVariantKey;
  91.     /**
  92.      * @var string
  93.      *
  94.      * @ORM\Column(type="string", length=255)
  95.      */
  96.     private $variantState 'active';
  97.     /**
  98.      * @var string
  99.      *
  100.      * @ORM\Column(type="string", length=255)
  101.      */
  102.     private $tittleOnInvoice;
  103.     /**
  104.      * @var string
  105.      *
  106.      * @ORM\Column(type="string", length=255)
  107.      */
  108.     private $workingTitle;
  109.     /**
  110.      * @var float
  111.      *
  112.      * @ORM\Column(type="float", precision=18, scale=2)
  113.      * @JMS\Groups({"PortalSettings"})
  114.      */
  115.     private $priceNet '0';
  116.     /**
  117.      * @var float
  118.      *
  119.      * @ORM\Column(type="float", precision=18, scale=2, nullable=true)
  120.      * @JMS\Groups({"PortalSettings"})
  121.      */
  122.     private $priceGross '0';
  123.     /**
  124.      * @var string
  125.      *
  126.      * @ORM\Column(type="string", length=255)
  127.      * @JMS\Groups({"PortalSettings"})
  128.      */
  129.     private $tradeName;
  130.     /**
  131.      * @ORM\Column(type="string", length=255, nullable=true)
  132.      */
  133.     private $altTradeName;
  134.     /**
  135.      * @var string
  136.      *
  137.      * @ORM\Column(type="text", nullable=true)
  138.      * @JMS\Groups({"PortalSettings"})
  139.      */
  140.     private $technicalInformations;
  141.     /**
  142.      * @var string
  143.      *
  144.      * @ORM\Column(type="text", nullable=true)
  145.      * @JMS\Groups({"PortalSettings"})
  146.      */
  147.     private $technicalInformationForMail;
  148.     /**
  149.      * @var string
  150.      *
  151.      * @ORM\Column(type="text", nullable=true)
  152.      * @JMS\Groups({"PortalSettings"})
  153.      */
  154.     private $label;
  155.     /**
  156.      * @var bool
  157.      *
  158.      * @ORM\Column(type="boolean", nullable=true)
  159.      * @JMS\Groups({"PortalSettings"})
  160.      */
  161.     private $isGross;
  162.     /**
  163.      * @var string
  164.      *
  165.      * @ORM\Column(type="string", length=255)
  166.      * @JMS\Groups({"PortalSettings"})
  167.      */
  168.     private $currencyCode 'PLN';
  169.     /**
  170.      * @var string
  171.      *
  172.      * @ORM\Column(type="string", length=255, nullable=true)
  173.      * @JMS\Groups({"PortalSettings"})
  174.      */
  175.     private $postageType 'Poczta Polska-wysyƂka AD';
  176.     /**
  177.      * @var float
  178.      *
  179.      * @ORM\Column(type="float", precision=18, scale=2)
  180.      * @JMS\Groups({"PortalSettings"})
  181.      */
  182.     private $postageCost '0';
  183.     /**
  184.      * @var int
  185.      *
  186.      * @ORM\Column(type="integer")
  187.      */
  188.     private $totalWeight '0';
  189.     /**
  190.      * @var int
  191.      *
  192.      * @ORM\Column(type="integer")
  193.      */
  194.     private $seriesType '0';
  195.     /**
  196.      * @var bool
  197.      *
  198.      * @ORM\Column(type="boolean", nullable=true)
  199.      */
  200.     private $isDefault;
  201.     /**
  202.      * @ORM\Column(type="boolean", nullable=true)
  203.      */
  204.     private $taxFreeForBudgetUnit;
  205.     /**
  206.      * @ORM\Column(type="string", length=50, nullable=true)
  207.      */
  208.     private $productNumberForBudgetUnit;
  209.     /**
  210.      * @ORM\Column(type="boolean")
  211.      * @JMS\Groups({"PortalSettings"})
  212.      */
  213.     private $showGrossPrice;
  214.     /**
  215.      * @ORM\Column(type="boolean", nullable=true)
  216.      */
  217.     private $discountOnline;
  218.     /**
  219.      * @ORM\Column(type="float", precision=16, scale=4, nullable=true)
  220.      */
  221.     private $discountValueOnline;
  222.     /**
  223.      * @var bool
  224.      *
  225.      * @ORM\Column(type="boolean", nullable=true)
  226.      * @JMS\Groups({"PortalSettings"})
  227.      */
  228.     private $stateIsAvailible;
  229.     /**
  230.      * @var bool
  231.      *
  232.      * @ORM\Column(type="boolean", nullable=true)
  233.      * @JMS\Groups({"PortalSettings"})
  234.      */
  235.     private $stateIsForcedReservation;
  236.     /**
  237.      * @var bool
  238.      *
  239.      * @ORM\Column(type="boolean", nullable=true)
  240.      * @JMS\Groups({"PortalSettings"})
  241.      */
  242.     private $stateIsProductTest;
  243.     /**
  244.      * @var bool
  245.      *
  246.      * @ORM\Column(type="boolean", nullable=true)
  247.      * @JMS\Groups({"PortalSettings"})
  248.      */
  249.     private $stateIsTrialRecurring;
  250.     /**
  251.      * @var int
  252.      *
  253.      * @ORM\Column(type="integer", nullable=true, options={"default": 3})
  254.      */
  255.     private $trialRecurringDuration 3;
  256.     /**
  257.      * @var ProductVariant
  258.      *
  259.      * @ORM\ManyToOne(targetEntity=ProductVariant::class)
  260.      * @ORM\JoinColumn(name="product_variant_after_trial_recurring_end_id", referencedColumnName="id", nullable=true)
  261.      */
  262.     private $productVariantAfterTrialRecurringEnd;
  263.     /**
  264.      * @ORM\Column(type="boolean", nullable=true)
  265.      */
  266.     private $isAccessWithoutPayment false;
  267.     /**
  268.      * @var bool
  269.      *
  270.      * @ORM\Column(type="boolean", nullable=true)
  271.      */
  272.     private $buyMaxOne;
  273.     /**
  274.      * @var bool
  275.      *
  276.      * @ORM\Column(type="boolean", nullable=true)
  277.      */
  278.     private $isAddition;
  279.     /**
  280.      * @var int
  281.      *
  282.      * @ORM\Column(type="integer")
  283.      */
  284.     private $maxUsers '1';
  285.     /**
  286.      * @var int
  287.      *
  288.      * @ORM\Column(type="integer", nullable=true)
  289.      */
  290.     private $quantity;
  291.     /**
  292.      * @var int
  293.      *
  294.      * @ORM\Column(type="integer", nullable=true)
  295.      */
  296.     private $orderQuantity;
  297.     /**
  298.      * @ORM\Column(type="datetime", nullable=true)
  299.      */
  300.     private $eventDate;
  301.     /**
  302.      * @ORM\ManyToMany(targetEntity="App\Entity\Gos\Product", inversedBy="productVariant")
  303.      * @ORM\JoinTable(name="product_product_variant")
  304.      */
  305.     private $product;
  306.     /**
  307.      * @ORM\OneToMany(targetEntity="App\Entity\Gos\ProductVariantMultiDiscount", mappedBy="productVariant", orphanRemoval=true, cascade={"persist"})
  308.      */
  309.     private $multiDiscount;
  310.     /**
  311.      * @ORM\ManyToMany(targetEntity="App\Entity\Gos\Coupon", mappedBy="productVariant")
  312.      */
  313.     private $coupon;
  314.     /**
  315.      * @ORM\ManyToMany(targetEntity="App\Entity\Gos\ApplicationCoupon", mappedBy="productVariant")
  316.      */
  317.     private $applicationCoupon;
  318.     /**
  319.      * @ORM\ManyToMany(targetEntity="App\Entity\Gos\SalesManagoCoupon", mappedBy="productVariant")
  320.      */
  321.     private $salesManagoCoupons;
  322.     /**
  323.      * @ORM\ManyToMany(targetEntity="App\Entity\Gos\SalesManagoCatalog", inversedBy="productVariants")
  324.      */
  325.     private $salesManagoCatalogs;
  326.     /**
  327.      * @ORM\ManyToMany(targetEntity="App\Entity\Gos\Coupon", mappedBy="gratis")
  328.      */
  329.     private $gratisCoupon;
  330.     /**
  331.      * @ORM\ManyToMany(targetEntity="App\Entity\Gos\Coupon", mappedBy="bundleProducts")
  332.      */
  333.     private $bundleCoupon;
  334.     /**
  335.      * @ORM\OneToMany(targetEntity="App\Entity\Gos\CouponPackProduct", mappedBy="productVariant")
  336.      */
  337.     private $couponPack;
  338.     /**
  339.      * @ORM\ManyToMany(targetEntity="App\Entity\Gos\SalesManagoCoupon", mappedBy="gratis")
  340.      */
  341.     private $salesManagoGratisCoupons;
  342.     /**
  343.      * @ORM\ManyToMany(targetEntity="App\Entity\Gos\PortalSettings", mappedBy="productVariant")
  344.      */
  345.     private $portalSettings;
  346.     /**
  347.      * @ORM\ManyToMany(targetEntity="App\Entity\Gos\ProductVariant", mappedBy="physicalVariant")
  348.      */
  349.     protected $virtualVariant;
  350.     /**
  351.      * @ORM\ManyToMany(targetEntity="App\Entity\Gos\ProductVariant", inversedBy="virtualVariant")
  352.      * @ORM\JoinTable(name="relations_product_variant",
  353.      *      joinColumns={@ORM\JoinColumn(name="virtual_variant_id", referencedColumnName="id")},
  354.      *      inverseJoinColumns={@ORM\JoinColumn(name="physical_variant_id", referencedColumnName="id")}
  355.      *      )
  356.      */
  357.     protected $physicalVariant;
  358.     /**
  359.      * @ORM\ManyToMany(targetEntity="App\Entity\Gos\ProductVariant", mappedBy="exclusiveVariant")
  360.      */
  361.     protected $normalVariant;
  362.     /**
  363.      * @ORM\ManyToMany(targetEntity="App\Entity\Gos\ProductVariant", inversedBy="normalVariant")
  364.      * @ORM\JoinTable(name="product_variant_exclusives",
  365.      *      joinColumns={@ORM\JoinColumn(name="normal_variant_id", referencedColumnName="id")},
  366.      *      inverseJoinColumns={@ORM\JoinColumn(name="exclusive_variant_id", referencedColumnName="id")}
  367.      *      )
  368.      */
  369.     protected $exclusiveVariant;
  370.     /**
  371.      * @ORM\ManyToMany(targetEntity="App\Entity\Gos\ProductVariant", mappedBy="additionalCartVariant")
  372.      */
  373.     protected $basicCartVariant;
  374.     /**
  375.      * @ORM\ManyToMany(targetEntity="App\Entity\Gos\ProductVariant", inversedBy="basicCartVariant")
  376.      * @ORM\JoinTable(name="product_variant_cart_additionals",
  377.      *      joinColumns={@ORM\JoinColumn(name="basic_cart_variant_id", referencedColumnName="id")},
  378.      *      inverseJoinColumns={@ORM\JoinColumn(name="additional_cart_variant_id", referencedColumnName="id")}
  379.      *      )
  380.      */
  381.     protected $additionalCartVariant;
  382.     /**
  383.      * @ORM\ManyToMany(targetEntity="App\Entity\Gos\ProductVariant", mappedBy="additionalCartVariantUpselling")
  384.      */
  385.     protected $basicCartVariantUpselling;
  386.     /**
  387.      * @ORM\ManyToMany(targetEntity="App\Entity\Gos\ProductVariant", inversedBy="basicCartVariantUpselling")
  388.      * @ORM\JoinTable(name="product_variant_cart_additionals_upselling",
  389.      *      joinColumns={@ORM\JoinColumn(name="basic_cart_variant_upselling_id", referencedColumnName="id")},
  390.      *      inverseJoinColumns={@ORM\JoinColumn(name="additional_cart_variant_upselling_id", referencedColumnName="id")}
  391.      *      )
  392.      */
  393.     protected $additionalCartVariantUpselling;
  394.     /**
  395.      * @ORM\OneToMany(targetEntity="App\Entity\Gos\ProductCart", mappedBy="productVariant")
  396.      */
  397.     private $productCart;
  398.     /**
  399.      * @ORM\ManyToMany(targetEntity="App\Entity\Gos\PaymentMethod", inversedBy="productVariant")
  400.      * @ORM\JoinColumn()
  401.      */
  402.     private $paymentMethod;
  403.     /**
  404.      * @ORM\ManyToMany(targetEntity="App\Entity\Gos\PaymentSystem", inversedBy="productVariant")
  405.      * @ORM\JoinColumn()
  406.      */
  407.     private $paymentSystem;
  408.     /**
  409.      * @ORM\ManyToMany(targetEntity="App\Entity\Gos\ClientType", inversedBy="productVariant")
  410.      * @ORM\JoinColumn()
  411.      * @OrderBy({"id" = "DESC"})
  412.      */
  413.     private $clientType;
  414.     /**
  415.      * @ORM\ManyToOne(targetEntity="App\Entity\Gos\Product", inversedBy="masterProductVariant")
  416.      * @ORM\JoinColumn(onDelete="CASCADE")
  417.      */
  418.     private $masterProduct;
  419.     /**
  420.      * @ORM\ManyToMany(targetEntity="App\Entity\Gos\Term", mappedBy="productVariants")
  421.      */
  422.     private $terms;
  423.     /**
  424.      * @ORM\OneToMany(targetEntity="App\Entity\Gos\AccessLevel", mappedBy="productVariant")
  425.      */
  426.     private $accessLevel;
  427.     /**
  428.      * @ORM\OneToMany(targetEntity="App\Entity\Gos\OrderProductVariant", mappedBy="productVariant")
  429.      */
  430.     private $orderProductVariant;
  431.     /**
  432.      * @ORM\OneToMany(targetEntity="App\Entity\Gos\ProductPackItem", mappedBy="productVariant")
  433.      */
  434.     private $productPackItem;
  435.     /**
  436.      * @ORM\OneToMany(targetEntity="EventProductVariantGroupItem", mappedBy="productVariant")
  437.      */
  438.     private $productVariantGroupItems;
  439.     /**
  440.      * @ORM\OneToMany(targetEntity="EventProductVariantGroup", mappedBy="productVariant", cascade={"persist"}, orphanRemoval=true)
  441.      */
  442.     private $productVariantGroups;
  443.     /**
  444.      * @ORM\OneToMany(targetEntity="App\Entity\Gos\CartParticipant", mappedBy="primaryProductVariant")
  445.      */
  446.     private $cartParticipantsPrimary;
  447.     /**
  448.      * @ORM\OneToMany(targetEntity="App\Entity\Gos\Participants", mappedBy="primaryProductVariant")
  449.      */
  450.     private $participantsPrimary;
  451.     /**
  452.      * @ORM\Column(type="datetime")
  453.      */
  454.     private $createdAt;
  455.     /**
  456.      * @ORM\Column(type="datetime", nullable=true)
  457.      */
  458.     private $updatedAt;
  459.     /**
  460.      * @ORM\OneToMany(targetEntity="App\Entity\Gos\ProductVariantDescription", mappedBy="productVariant", orphanRemoval=true, cascade={"persist"})
  461.      */
  462.     private $productVariantDescriptions;
  463.     /**
  464.      * @var string
  465.      *
  466.      * @ORM\Column(type="string", length=255, nullable=true)
  467.      */
  468.     private $subscriptionType;
  469.     /**
  470.      * @var string
  471.      *
  472.      * @ORM\Column(type="string", length=255, nullable=true)
  473.      */
  474.     private $subscriptionPlan;
  475.     /**
  476.      * @ORM\Column(type="string", length=255, nullable=true)
  477.      * @var string
  478.      */
  479.     private $image;
  480.     /**
  481.      * @Vich\UploadableField(mapping="product_images", fileNameProperty="image")
  482.      * @var File
  483.      */
  484.     private $imageFile;
  485.     /**
  486.      * @ORM\Column(type="boolean", options={"default": 0})
  487.      */
  488.     private $defaultProductAssociation 0;
  489.     /**
  490.      * @ORM\Column(type="boolean", options={"default": 0})
  491.      */
  492.     private $promoted 0;
  493.     /**
  494.      * @ORM\OneToMany(targetEntity="App\Entity\Gos\Alert", mappedBy="productVariant")
  495.      */
  496.     private $alerts;
  497.     /**
  498.      * @ORM\Column(type="boolean", options={"default": 0})
  499.      */
  500.     private $isPublished 0;
  501.     /**
  502.      * @ORM\Column(type="boolean", nullable=true)
  503.      */
  504.     private $isGiftable;
  505.     /**
  506.      * @ORM\Column(type="boolean", nullable=true)
  507.      */
  508.     private $isHidden;
  509.     /**
  510.      * @ORM\Column(type="boolean", options={"default": 0})
  511.      */
  512.     private $isPartialPaymentActive 0;
  513.     /**
  514.      * @ORM\ManyToOne(targetEntity="App\Entity\Gos\Country", inversedBy="productVariants")
  515.      * @ORM\JoinColumn()
  516.      */
  517.     private $country;
  518.     /**
  519.      * @ORM\Column(type="integer", options={"default" : 1})
  520.      */
  521.     private $installmentAmount;
  522.     /**
  523.      * @ORM\ManyToOne(targetEntity="App\Entity\Gos\PaymentType", inversedBy="productVariant")
  524.      * @ORM\JoinTable()
  525.      */
  526.     private $paymentType;
  527.     /**
  528.      * @ORM\Column(type="integer", options={"default": 0})
  529.      */
  530.     private $extendedPaymentTime 0;
  531.     /**
  532.      * @ORM\ManyToOne(targetEntity="ProductSubscriptionType", inversedBy="productVariant")
  533.      * @ORM\JoinColumn()
  534.      */
  535.     private $productSubscriptionType;
  536.     /**
  537.      * @ORM\Column(type="text", nullable=true)
  538.      */
  539.     private $summaryUpsellingInfo;
  540.     /**
  541.      * @ORM\ManyToMany(targetEntity="App\Entity\Gos\ProductAssociation", mappedBy="productVariants")
  542.      */
  543.     private $productAssociation;
  544.     /**
  545.      * @ORM\ManyToMany(targetEntity="ProductVariantPack", mappedBy="productVariants")
  546.      */
  547.     private $productVariantPacks;
  548.     /**
  549.      * @ORM\Column(type="integer", nullable=true)
  550.      */
  551.     private $trialDuration;
  552.     /**
  553.      * @ORM\ManyToMany(targetEntity="App\Entity\Gos\Uniqskills\Course", inversedBy="productVariants")
  554.      * @ORM\JoinTable(
  555.      *     name="product_variant_course",
  556.      *     joinColumns={@ORM\JoinColumn(name="product_variant_id", referencedColumnName="id")},
  557.      *     inverseJoinColumns={@ORM\JoinColumn(name="course_id", referencedColumnName="id")}
  558.      * )
  559.      */
  560.     private $courses;
  561.     /**
  562.      * @ORM\ManyToMany(targetEntity="App\Entity\Gos\Uniqskills\Package", inversedBy="productVariants")
  563.      * @ORM\JoinTable(
  564.      *     name="product_variant_package",
  565.      *     joinColumns={@ORM\JoinColumn(name="product_variant_id", referencedColumnName="id")},
  566.      *     inverseJoinColumns={@ORM\JoinColumn(name="package_id", referencedColumnName="id")}
  567.      * )
  568.      */
  569.     private $packages;
  570.     /**
  571.      * @ORM\Column(type="boolean", nullable=true)
  572.      */
  573.     private $requiredPWZ;
  574.     /**
  575.      * @ORM\Column(type="string", length=255, nullable=true)
  576.      */
  577.     private $promoName;
  578.     /**
  579.      * @ORM\ManyToMany(targetEntity="App\Entity\Gos\File", inversedBy="productVariants")
  580.      * @ORM\JoinTable(
  581.      *     name="product_variant_file",
  582.      *     joinColumns={@ORM\JoinColumn(name="product_variant_id", referencedColumnName="id")},
  583.      *     inverseJoinColumns={@ORM\JoinColumn(name="file_id", referencedColumnName="id")}
  584.      * )
  585.      */
  586.     private $files;
  587.     /**
  588.      * @ORM\Column(type="boolean", nullable=true)
  589.      */
  590.     private $isDigital;
  591.     /**
  592.      * @ORM\Column(type="boolean", nullable=true)
  593.      */
  594.     private $blockAccess;
  595.     /**
  596.      * @var int
  597.      *
  598.      * @ORM\Column(type="integer", nullable=true)
  599.      */
  600.     private $mantisUserId;
  601.     /**
  602.      * @ORM\OneToOne(targetEntity="App\Entity\Gos\ProductVariant", inversedBy="originalProductVariant")
  603.      */
  604.     private $productVariantEuVat;
  605.     /**
  606.      * @ORM\OneToOne(targetEntity="App\Entity\Gos\ProductVariant", mappedBy="productVariantEuVat")
  607.      */
  608.     private $originalProductVariant;
  609.     /**
  610.      * @ORM\ManyToOne(targetEntity="App\Entity\Gos\GoogleMerchantFeed", inversedBy="associatedVariants", cascade={"persist"}, fetch="EAGER")
  611.      * @ORM\JoinColumn(name="feed_id", referencedColumnName="id")
  612.      */
  613.     private $googleMerchantFeed;
  614.     /**
  615.      * @ORM\Column(type="integer", nullable=true)
  616.      */
  617.     private $salesVariantBasedTrialDuration;
  618.     /**
  619.      * @ORM\Column(type="string", length=255, nullable=true)
  620.      */
  621.     private $salesVariantBasedTrialInfo;
  622.     /**
  623.      * @ORM\Column(type="boolean", nullable=true)
  624.      */
  625.     private $accessForPaidOnly;
  626.     /**
  627.      * @ORM\Column(type="text", nullable=true)
  628.      */
  629.     private $additionalTextInCart;
  630.     /**
  631.      * @ORM\Column(type="boolean", nullable=true)
  632.      */
  633.     private $isRecurringSubscription;
  634.     /**
  635.      * @ORM\Column(type="string", length=255, nullable=true)
  636.      */
  637.     private $documentDistributionChannel;
  638.     /**
  639.      * @ORM\Column(type="boolean", nullable=true)
  640.      */
  641.     private $hiddenInSBTillPaid;
  642.     /**
  643.      * @ORM\Column(type="boolean", nullable=true)
  644.      */
  645.     private $participantsAddress;
  646.     /**
  647.      * @ORM\Column(type="string", length=255, nullable=true)
  648.      */
  649.     private $participantsAnnouncement;
  650.     /**
  651.      * @ORM\Column(type="boolean", nullable=true, options={"default": 0})
  652.      */
  653.     private $mustHaveAllExclusiveVariants false;
  654.     /**
  655.      * @ORM\OneToOne(targetEntity=Events::class, inversedBy="productVariant", fetch="EAGER")
  656.      * @ORM\JoinColumn(name="events_id", referencedColumnName="id", onDelete="SET NULL")
  657.      */
  658.     private $event;
  659.     /**
  660.      * @ORM\OneToMany(targetEntity=LeadFormResponse::class, mappedBy="productVariant")
  661.      */
  662.     private $leadFormResponses;
  663.     /**
  664.      * @ORM\ManyToMany(targetEntity=LeadFormResponse::class, mappedBy="productVariantsValidation")
  665.      */
  666.     private $leadFormResponseValidations;
  667.     /**
  668.      * @ORM\ManyToMany(targetEntity=NewsletterTemplate::class, mappedBy="productVariantsValidation")
  669.      */
  670.     private $newsletterTemplateValidations;
  671.     /**
  672.      * @ORM\Column(type="string", length=255, nullable=true)
  673.      */
  674.     private $TradeNameSM;
  675.     /**
  676.      * @ORM\Column(type="string", length=255, nullable=true)
  677.      */
  678.     private $commentForMantis;
  679.     /**
  680.      * @ORM\OneToMany(targetEntity=CalendarEvent::class, mappedBy="productVariant")
  681.      */
  682.     private $calendarEvents;
  683.     /**
  684.      * GOS-1481 [only for US] The time (in days) after which the price to be paid returns to the initial
  685.      * @ORM\Column(type="integer", nullable=true)
  686.      */
  687.     private $couponLifetime;
  688.     /**
  689.      * @ORM\Column(type="boolean", nullable=true)
  690.      */
  691.     private $freshMailIntegration;
  692.     /**
  693.      * @ORM\Column(type="string", length=255, nullable=true)
  694.      */
  695.     private $freshMailRecipientListHash;
  696.     /**
  697.      * @ORM\Column(type="text", nullable=true)
  698.      */
  699.     private $orderOnSiteContent;
  700.     /**
  701.      * @ORM\Column(type="boolean", options={"default": 0})
  702.      */
  703.     private $manualUserVerification 0;
  704.     /**
  705.      * @ORM\OneToOne(targetEntity=ProductVariantOrderQuantity::class, mappedBy="productVariant", cascade={"persist", "remove"})
  706.      */
  707.     private $productVariantOrderQuantity;
  708.     /**
  709.      * @ORM\OneToOne(targetEntity=ProductVariantVirtualCurrencySettings::class, mappedBy="productVariant", cascade={"persist", "remove"})
  710.      */
  711.     private $productVariantVirtualCurrencySettings;
  712.     /**
  713.      * @ORM\ManyToMany(targetEntity=PaymentReminders::class, mappedBy="productVariant", orphanRemoval=true, cascade={"persist"})
  714.      */
  715.     private $paymentReminders;
  716.     /**
  717.      * @ORM\OneToMany(targetEntity=ProductVariantUpselling::class, mappedBy="productVariant", orphanRemoval=true, cascade={"persist"})
  718.      */
  719.     private $productVariantUpsellings;
  720.     /**
  721.      * @ORM\OneToMany(targetEntity=ProductVariantUpselling::class, mappedBy="promotedProduct", orphanRemoval=true, cascade={"persist"})
  722.      */
  723.     private $productVariantPromoted;
  724.     /**
  725.      * @ORM\OneToMany(targetEntity=FastLeadTemplate::class, mappedBy="productVariant")
  726.      */
  727.     private $fastLeadTemplates;
  728.     /**
  729.      * @ORM\Column(type="string", length=255, nullable=true)
  730.      */
  731.     private $imageUrlUpselling;
  732.     /**
  733.      * @ORM\Column(type="boolean", nullable=true)
  734.      */
  735.     private $useUploadedImageUpselling;
  736.     /**
  737.      * @ORM\Column(type="string", length=255, nullable=true)
  738.      * @var string
  739.      */
  740.     private $uploadedImageUpselling;
  741.     /**
  742.      * @Vich\UploadableField(mapping="upselling_image", fileNameProperty="uploadedImageUpselling")
  743.      */
  744.     private $imageFileUpselling;
  745.     /**
  746.      * @ORM\Column(type="text", nullable=true)
  747.      */
  748.     private $descriptionUpselling;
  749.     /**
  750.      * @ORM\Column(type="string", length=255, nullable=true)
  751.      */
  752.     private $linkToProductUpselling;
  753.     /**
  754.      * @ORM\ManyToMany(targetEntity=Certificate::class, inversedBy="productVariants")
  755.      */
  756.     private $certificates;
  757.     /**
  758.      * @ORM\Column(type="boolean", nullable=true)
  759.      */
  760.     private $showButtonAdditionalAddress;
  761.     /**
  762.      * @ORM\OneToMany(targetEntity="App\Entity\Gos\Omnibus", mappedBy="productVariant", orphanRemoval=true, cascade={"persist"})
  763.      */
  764.     private $omnibus;
  765.     /**
  766.      * @ORM\Column(type="integer", nullable=true)
  767.      */
  768.     private $maxQuantityInCart;
  769.     /**
  770.      * @ORM\ManyToMany(targetEntity=ShippingType::class, inversedBy="productVariants")
  771.      */
  772.     private $shippingTypes;
  773.     /**
  774.      * @ORM\OneToOne(targetEntity=ProductVariantSize::class, cascade={"persist", "remove"})
  775.      */
  776.     private $size;
  777.     /**
  778.      * @ORM\Column(type="boolean", options={"default": 0})
  779.      */
  780.     private $excludeDefaultShippingType false;
  781.     /**
  782.      * @ORM\Column(type="boolean", options={"default": 0})
  783.      */
  784.     private $isCompletelyDigital false;
  785.     /**
  786.      * @ORM\ManyToMany(targetEntity=CertificatePathElement::class, mappedBy="productVariants")
  787.      */
  788.     private $certificatePathElements;
  789.     /**
  790.      * @ORM\Column(type="boolean", nullable=true)
  791.      */
  792.     private $hasPaperRelease;
  793.     /**
  794.      * @ORM\Column(type="boolean", nullable=true)
  795.      */
  796.     private $isNPWZRequired;
  797.     /**
  798.      * @ORM\Column(type="boolean", options={"default": 0})
  799.      */
  800.     private $isSaleDisabled false;
  801.     /**
  802.      * @ORM\Column(type="text", nullable=true)
  803.      */
  804.     private $technicalInformationForMailTele;
  805.     /**
  806.      * @ORM\OneToMany(targetEntity=AdditionalFile::class, mappedBy="productVariant", orphanRemoval=true, cascade={"persist"}, fetch="EAGER")
  807.      */
  808.     private $additionalFiles;
  809.     /**
  810.      * @ORM\OneToOne(targetEntity=SalesManagoProductVariant::class, mappedBy="productVariant", cascade={"persist", "remove"})
  811.      */
  812.     private $salesManagoProductVariant;
  813.     /**
  814.      * @ORM\ManyToMany(targetEntity=UserFlag::class, mappedBy="productVariants")
  815.      */
  816.     private $userFlags;
  817.     /**
  818.      * @ORM\OneToMany(targetEntity="App\Entity\Gos\ProductVariantReviewLink", mappedBy="productVariant", orphanRemoval=true, cascade={"persist"})
  819.      */
  820.     private $productVariantReviewLinks;
  821.     /**
  822.      * @ORM\ManyToOne(targetEntity=ProductVariant::class, inversedBy="substitution")
  823.      */
  824.     private $original;
  825.     /**
  826.      * @ORM\OneToMany(targetEntity=ProductVariant::class, mappedBy="original")
  827.      */
  828.     private $substitution;
  829.     /**
  830.      * @ORM\OneToMany(targetEntity=AdditionalOptionsByClientType::class, mappedBy="productVariant", orphanRemoval=true, cascade={"persist"}, fetch="EAGER")
  831.      */
  832.     private $additionalOptionsByClientTypes;
  833.     /**
  834.      * @ORM\OneToOne(targetEntity=ProductVariant::class, inversedBy="givenProductVariantForAdditionalAccess", cascade={"persist", "remove"})
  835.      */
  836.     private $additionalAccessProductVariant;
  837.     /**
  838.      * @ORM\OneToOne(targetEntity=ProductVariant::class, mappedBy="additionalAccessProductVariant", cascade={"persist", "remove"})
  839.      */
  840.     private $givenProductVariantForAdditionalAccess;
  841.     /**
  842.      * @ORM\Column(type="text", nullable=true)
  843.      */
  844.     private $additionalInformationForMail;
  845.     /**
  846.      * @ORM\Column(type="integer", nullable=true)
  847.      */
  848.     private $descriptionUpsellingMaxHeight;
  849.     private bool $isPriceGrossCalculated false;
  850.     private int $vatRate 0;
  851.     public function setBCDefaultSettings(
  852.         ?PaymentMethod $paymentMethod,
  853.         ?PaymentType $paymentType
  854.     ): self
  855.     {
  856.         $this
  857.             ->setPriceGross(null//dynamically calculated from net price and VAT rate
  858.             ->setIsGross(false)
  859.             ->setIsDefault(true)
  860.             ->setShowGrossPrice(false)
  861.             ->setMaxUsers(1)
  862.             ->setBuyMaxOne(true)
  863.             ->setPostageType(null)
  864.             ->setDocumentDistributionChannel('E')
  865.             ->addPaymentMethod($paymentMethod)
  866.             ->setPaymentType($paymentType);
  867.         return $this;
  868.     }
  869.     /** @ORM\PrePersist() */
  870.     public function prePersist()
  871.     {
  872.         $this->createdAt = new \DateTime();
  873.         if (is_null($this->installmentAmount))
  874.         {
  875.             $this->installmentAmount 1;
  876.         }
  877.     }
  878.     /** @ORM\PreUpdate() */
  879.     public function preUpdate()
  880.     {
  881.         foreach ($this->paymentMethod as $paymentMethod)
  882.         {
  883.             if (!$this->isActive()
  884.                 || ((($this->getCourses()->isEmpty() && $this->stateIsForcedReservation)
  885.                         || $this->stateIsProductTest) && $paymentMethod->getSlug() !== 'invoice')
  886.             )
  887.             {
  888.                 $this->removePaymentMethod($paymentMethod);
  889.             }
  890.         }
  891.         $this->updatedAt = new \DateTime();
  892.     }
  893.     public function __toString()
  894.     {
  895.         if (empty($this->productVariantNoComplete))
  896.         {
  897.             return (string)$this->id ' ' $this->workingTitle;
  898.         }
  899.         else
  900.         {
  901.             return (string)$this->productVariantNoComplete ' ' $this->workingTitle;
  902.         }
  903.     }
  904.     public function checkIfIsDefaultChecked($isFirst false)
  905.     {
  906.         if ($this->getDefaultProductAssociation())
  907.         {
  908.             return true;
  909.         }
  910.         if ($this->getMasterProduct()->getProductAssociation() instanceof ProductAssociation)
  911.         {
  912.             /** @var ProductVariant $productVariant */
  913.             foreach ($this->getMasterProduct()->getProductAssociation()->getPublishedVariants() as $productVariant)
  914.             {
  915.                 if ($productVariant->getDefaultProductAssociation())
  916.                 {
  917.                     return false;
  918.                 }
  919.             }
  920.             if ($isFirst)
  921.             {
  922.                 return true;
  923.             }
  924.         }
  925.         return false;
  926.     }
  927.     public function getFullPrice($type 'gross'$useCommaSeparator false)
  928.     {
  929.         $price $type == 'gross' $this->getPriceGross() : $this->getPriceNet();
  930.         foreach ($this->getVirtualVariant() as $additional)
  931.         {
  932.             $price += $type == 'gross' $additional->getPriceGross() : $additional->getPriceNet();
  933.         }
  934.         if ($useCommaSeparator)
  935.         {
  936.             $price number_format($price2',''');
  937.         }
  938.         return $price;
  939.     }
  940.     public function getFullPriceAfterCoupon($type 'gross', ?Coupon $coupon$useCommaSeparator false)
  941.     {
  942.         $priceNet   $this->getFullPrice('net');
  943.         $priceGross $this->getFullPrice('gross');
  944.         if ($coupon && $coupon->getCouponType()->getId() == 1)
  945.         {
  946.             if ($coupon->getIsGross())
  947.             {
  948.                 $discount   = (($this->getFullPrice('gross') * $coupon->getDiscount()) / 100);
  949.                 $priceGross $this->getFullPrice('gross') - $discount;
  950.                 $priceNet   $priceGross - (($priceGross $this->getVatRate()) / 100);
  951.             }
  952.             else
  953.             {
  954.                 $discount   = (($this->getFullPrice('net') * $coupon->getDiscount()) / 100);
  955.                 $priceNet   $this->getFullPrice('net') - $discount;
  956.                 $priceGross = (($priceNet $this->getVatRate()) / 100) + $priceNet;
  957.             }
  958.         }
  959.         elseif ($coupon && $coupon->getCouponType()->getId() == 2)
  960.         {
  961.             if ($coupon->getIsGross())
  962.             {
  963.                 $priceGross $this->getFullPrice('gross') - $coupon->getDiscount();
  964.                 $priceNet   $priceGross - (($priceGross $this->getVatRate()) / 100);
  965.             }
  966.             else
  967.             {
  968.                 $priceNet   $this->getFullPrice('net') - $coupon->getDiscount();
  969.                 $priceGross = (($priceNet $this->getVatRate()) / 100) + $priceNet;
  970.             }
  971.         }
  972.         $price round(($type == 'gross') ? $priceGross $priceNet2);
  973.         if ($useCommaSeparator)
  974.         {
  975.             $price number_format($price2',''');
  976.         }
  977.         return $price;
  978.     }
  979.     public function isUniqskillsMultiUserCourse()
  980.     {
  981.         return $this->getIsUniqskillsProduct()
  982.             && $this->getMaxUsers() > 1
  983.             && $this->getBuyMaxOne() === false;
  984.     }
  985.     public function isEvent()
  986.     {
  987.         return $this->getMasterProduct() && $this->getMasterProduct()->getIsEvent();
  988.     }
  989.     /**
  990.      * Check productVariant and AdditionalProductVariants is stateIsAvailible
  991.      *
  992.      * @return bool
  993.      */
  994.     public function isActive()
  995.     {
  996.         // MT-948 - make partial payments work only with selected PVs
  997.         if ($this->hasPartialPayment() && !$this->getIsPartialPaymentActive())
  998.         {
  999.             return false;
  1000.         }
  1001.         if (!$this->checkPaymentMethod())
  1002.         {
  1003.             return false;
  1004.         }
  1005.         if (!$this->checkState())
  1006.         {
  1007.             return false;
  1008.         }
  1009.         if (!$this->checkQuantity())
  1010.         {
  1011.             return false;
  1012.         }
  1013.         if (!$this->checkQuantityVirtualVariant())
  1014.         {
  1015.             return false;
  1016.         }
  1017.         if ($this->isSaleDisabled())
  1018.         {
  1019.             return false;
  1020.         }
  1021.         return true;
  1022.     }
  1023.     public function checkState()
  1024.     {
  1025.         if (!$this->getStateIsAvailible())
  1026.         {
  1027.             return false;
  1028.         }
  1029.         foreach ($this->getVirtualVariant() as $virtualVariant)
  1030.         {
  1031.             if (!$virtualVariant->getStateIsAvailible())
  1032.             {
  1033.                 return false;
  1034.             }
  1035.         }
  1036.         return true;
  1037.     }
  1038.     public function hasPartialPayment(): bool
  1039.     {
  1040.         return ($this->getPaymentType() && $this->getPaymentType()->getSlug() === 'partial-payment');
  1041.     }
  1042.     public function checkPaymentMethod()
  1043.     {
  1044.         foreach ($this->getAdditionalOptionsByClientTypes() as $additionalOptionsByClientType)
  1045.         {
  1046.             if (count($additionalOptionsByClientType->getPaymentMethod()) > 0)
  1047.             {
  1048.                 return true;
  1049.             }
  1050.         }
  1051.         return false;
  1052.     }
  1053.     public function checkQuantity()
  1054.     {
  1055.         if ($this->getQuantity() == || empty($this->getQuantity()))
  1056.         {
  1057.             return true;
  1058.         }
  1059.         if ($this->getQuantity() > $this->getOrderQuantity())
  1060.         {
  1061.             return true;
  1062.         }
  1063.         return false;
  1064.     }
  1065.     public function checkQuantityVirtualVariant()
  1066.     {
  1067.         foreach ($this->getVirtualVariant() as $virtualVariant)
  1068.         {
  1069.             if (
  1070.                 $virtualVariant->getQuantity() != 0
  1071.                 && !empty($virtualVariant->getQuantity())
  1072.                 && $virtualVariant->getQuantity() < $virtualVariant->getOrderQuantity()
  1073.             )
  1074.             {
  1075.                 return false;
  1076.             }
  1077.         }
  1078.         return true;
  1079.     }
  1080.     public function incrementOrderQuantity(): self
  1081.     {
  1082.         $productVariantOrderQuantity $this->getProductVariantOrderQuantity();
  1083.         if (is_null($productVariantOrderQuantity))
  1084.         {
  1085.             $productVariantOrderQuantity = new ProductVariantOrderQuantity();
  1086.             $this->setProductVariantOrderQuantity($productVariantOrderQuantity);
  1087.         }
  1088.         $productVariantOrderQuantity->incrementOrderQuantity();
  1089.         return $this;
  1090.     }
  1091.     public function getQuantityProductsRemainingForSale()
  1092.     {
  1093.         if ($this->getQuantity() == || empty($this->getQuantity()))
  1094.         {
  1095.             return null;
  1096.         }
  1097.         $result $this->getQuantity() - $this->getOrderQuantity();
  1098.         return $result $result 0;
  1099.     }
  1100.     public function getPriceNetDiscountAmount($fullPriceGross$discount$isGross true$fullPriceNet 0)
  1101.     {
  1102.         if ($isGross)
  1103.         {
  1104.             if (empty($fullPriceGross))
  1105.             {
  1106.                 return 0;
  1107.             }
  1108.             $discountValue  = ($this->getPriceGross() / $fullPriceGross) * $discount;
  1109.             $priceGross     $this->getPriceGross() - $discountValue;
  1110.             $vatRate        $this->getVatRate();
  1111.             $vat            = ($priceGross $vatRate) / (100 $vatRate);
  1112.             $priceNet       $priceGross $vat;
  1113.         }
  1114.         else
  1115.         {
  1116.             if (empty($fullPriceNet))
  1117.             {
  1118.                 return 0;
  1119.             }
  1120.             $discountValue = ($this->getPriceNet() / $fullPriceNet) * $discount;
  1121.             $priceNet      $this->getPriceNet() - $discountValue;
  1122.         }
  1123.         return round($priceNet2);
  1124.     }
  1125.     public function getPriceGrossDiscountAmount($fullPriceNet$discount$isGross false$fullPriceGross 0)
  1126.     {
  1127.         if ($isGross)
  1128.         {
  1129.             if (empty($fullPriceGross))
  1130.             {
  1131.                 return 0;
  1132.             }
  1133.             $discountValue  = ($this->getPriceGross() / $fullPriceGross) * $discount;
  1134.             $priceGross     $this->getPriceGross() - $discountValue;
  1135.         }
  1136.         else
  1137.         {
  1138.             if (empty($fullPriceNet))
  1139.             {
  1140.                 return 0;
  1141.             }
  1142.             $discountValue = ($this->getPriceNet() / $fullPriceNet) * $discount;
  1143.             $priceNet      $this->getPriceNet() - $discountValue;
  1144.             $vat           = ($priceNet $this->getVatRate()) / 100;
  1145.             $priceGross    $priceNet $vat;
  1146.         }
  1147.         return round($priceGross2);
  1148.     }
  1149.     public function isPhysical(): bool
  1150.     {
  1151.         if ($this->isVirtual)
  1152.         {
  1153.             return false;
  1154.         }
  1155.         if ($this->totalWeight == 0)
  1156.         {
  1157.             return false;
  1158.         }
  1159.         return true;
  1160.     }
  1161.     public function getAdditionalOptionsByClientType(?ClientType $clientType null): ?AdditionalOptionsByClientType
  1162.     {
  1163.         if (is_null($clientType))
  1164.         {
  1165.             return null;
  1166.         }
  1167.         foreach ($this->getAdditionalOptionsByClientTypes() as $additionalOptionsByClientType)
  1168.         {
  1169.             if ($additionalOptionsByClientType->getClientType() === $clientType)
  1170.             {
  1171.                 return $additionalOptionsByClientType;
  1172.             }
  1173.         }
  1174.         return null;
  1175.     }
  1176.     public function getPaymentMethodsByClientType(?ClientType $clientType): array
  1177.     {
  1178.         $additionalOptionsByClientType $this->getAdditionalOptionsByClientType($clientType);
  1179.         return $additionalOptionsByClientType $additionalOptionsByClientType->getPaymentMethod()->toArray() : [];
  1180.     }
  1181.     public function checkIfProductVariantHavePaymentMethod(?ClientType $clientTypestring $paymentMethodSlug): bool
  1182.     {
  1183.         $paymentMethods $this->getPaymentMethodsByClientType($clientType);
  1184.         foreach ($paymentMethods as $paymentMethod)
  1185.         {
  1186.             if ($paymentMethod->getSlug() === $paymentMethodSlug)
  1187.             {
  1188.                 return true;
  1189.             }
  1190.         }
  1191.         return false;
  1192.     }
  1193.     //------------------------------ setters & getters
  1194.     /**
  1195.      * Constructor
  1196.      */
  1197.     public function __construct()
  1198.     {
  1199.         $this->product                       = new ArrayCollection();
  1200.         $this->coupon                        = new ArrayCollection();
  1201.         $this->applicationCoupon             = new ArrayCollection();
  1202.         $this->gratisCoupon                  = new ArrayCollection();
  1203.         $this->bundleCoupon                  = new ArrayCollection();
  1204.         $this->portalSettings                = new ArrayCollection();
  1205.         $this->virtualVariant                = new ArrayCollection();
  1206.         $this->physicalVariant               = new ArrayCollection();
  1207.         $this->productCart                   = new ArrayCollection();
  1208.         $this->paymentMethod                 = new ArrayCollection();
  1209.         $this->clientType                    = new ArrayCollection();
  1210.         $this->terms                         = new ArrayCollection();
  1211.         $this->accessLevel                   = new ArrayCollection();
  1212.         $this->salesManagoCoupons            = new ArrayCollection();
  1213.         $this->salesManagoCatalogs           = new ArrayCollection();
  1214.         $this->salesManagoGratisCoupons      = new ArrayCollection();
  1215.         $this->orderProductVariant           = new ArrayCollection();
  1216.         $this->couponPack                    = new ArrayCollection();
  1217.         $this->productPackItem               = new ArrayCollection();
  1218.         $this->productAssociation            = new ArrayCollection();
  1219.         $this->productVariantGroupItems      = new ArrayCollection();
  1220.         $this->productVariantGroups          = new ArrayCollection();
  1221.         $this->cartParticipantsPrimary       = new ArrayCollection();
  1222.         $this->participantsPrimary           = new ArrayCollection();
  1223.         $this->productVariantDescriptions    = new ArrayCollection();
  1224.         $this->alerts                        = new ArrayCollection();
  1225.         $this->multiDiscount                 = new ArrayCollection();
  1226.         $this->paymentSystem                 = new ArrayCollection();
  1227.         $this->productVariantPacks           = new ArrayCollection();
  1228.         $this->courses                       = new ArrayCollection();
  1229.         $this->packages                      = new ArrayCollection();
  1230.         $this->files                         = new ArrayCollection();
  1231.         $this->leadFormResponses             = new ArrayCollection();
  1232.         $this->leadFormResponseValidations   = new ArrayCollection();
  1233.         $this->newsletterTemplateValidations = new ArrayCollection();
  1234.         $this->calendarEvents                = new ArrayCollection();
  1235.         $this->paymentReminders              = new ArrayCollection();
  1236.         $this->productVariantUpsellings      = new ArrayCollection();
  1237.         $this->productVariantPromoted        = new ArrayCollection();
  1238.         $this->fastLeadTemplates             = new ArrayCollection();
  1239.         $this->omnibus                       = new ArrayCollection();
  1240.         $this->shippingTypes                 = new ArrayCollection();
  1241.         $this->certificates                  = new ArrayCollection();
  1242.         $this->certificatePathElements       = new ArrayCollection();
  1243.         $this->additionalFiles               = new ArrayCollection();
  1244.         $this->userFlags                     = new ArrayCollection();
  1245.         $this->productVariantReviewLinks     = new ArrayCollection();
  1246.         $this->substitution                  = new ArrayCollection();
  1247.         $this->additionalOptionsByClientTypes = new ArrayCollection();
  1248.     }
  1249.     public function __clone()
  1250.     {
  1251.         $this->certificates = new ArrayCollection();
  1252.     }
  1253.     /**
  1254.      * Add product
  1255.      *
  1256.      * @param \App\Entity\Gos\Product $product
  1257.      *
  1258.      * @return ProductVariant
  1259.      */
  1260.     public function addProduct(\App\Entity\Gos\Product $product)
  1261.     {
  1262.         if (!$this->product->contains($product))
  1263.         {
  1264.             $product->addProductVariant($this);
  1265.             $this->product[] = $product;
  1266.         }
  1267.         return $this;
  1268.     }
  1269.     /**
  1270.      * Add physicalVariant
  1271.      *
  1272.      * @param \App\Entity\Gos\ProductVariant $physicalVariant
  1273.      *
  1274.      * @return ProductVariant
  1275.      */
  1276.     public function addPhysicalVariant(\App\Entity\Gos\ProductVariant $physicalVariant)
  1277.     {
  1278.         if (!$physicalVariant->getVirtualVariant()->contains($this)) {
  1279.             $physicalVariant->addVirtualVariant($this);
  1280.             $this->physicalVariant[] = $physicalVariant;
  1281.         }
  1282.         return $this;
  1283.     }
  1284.     /**
  1285.      * Remove product
  1286.      *
  1287.      * @param \App\Entity\Gos\Product $product
  1288.      */
  1289.     public function removeProduct(\App\Entity\Gos\Product $product)
  1290.     {
  1291.         $this->product->removeElement($product);
  1292.     }
  1293.     /**
  1294.      * Get product
  1295.      *
  1296.      * @return \Doctrine\Common\Collections\Collection
  1297.      */
  1298.     public function getProduct()
  1299.     {
  1300.         return $this->product;
  1301.     }
  1302.     /**
  1303.      * Get id
  1304.      *
  1305.      * @return integer
  1306.      */
  1307.     public function getId()
  1308.     {
  1309.         return $this->id;
  1310.     }
  1311.     /**
  1312.      * Set isVirtual
  1313.      *
  1314.      * @param boolean $isVirtual
  1315.      *
  1316.      * @return ProductVariant
  1317.      */
  1318.     public function setIsVirtual($isVirtual)
  1319.     {
  1320.         $this->isVirtual $isVirtual;
  1321.         return $this;
  1322.     }
  1323.     /**
  1324.      * Get isVirtual
  1325.      *
  1326.      * @return boolean
  1327.      */
  1328.     public function getIsVirtual()
  1329.     {
  1330.         return $this->isVirtual;
  1331.     }
  1332.     /**
  1333.      * Set productVariantNo
  1334.      *
  1335.      * @param integer $productVariantNo
  1336.      *
  1337.      * @return ProductVariant
  1338.      */
  1339.     public function setProductVariantNo($productVariantNo)
  1340.     {
  1341.         $this->productVariantNo $productVariantNo;
  1342.         return $this;
  1343.     }
  1344.     /**
  1345.      * Get productVariantNo
  1346.      *
  1347.      * @return integer
  1348.      */
  1349.     public function getProductVariantNo()
  1350.     {
  1351.         return $this->productVariantNo;
  1352.     }
  1353.     /**
  1354.      * Set productVariantId
  1355.      *
  1356.      * @param integer $productVariantId
  1357.      *
  1358.      * @return ProductVariant
  1359.      */
  1360.     public function setProductVariantId($productVariantId)
  1361.     {
  1362.         $this->productVariantId $productVariantId;
  1363.         return $this;
  1364.     }
  1365.     /**
  1366.      * Get productVariantId
  1367.      *
  1368.      * @return integer
  1369.      */
  1370.     public function getProductVariantId()
  1371.     {
  1372.         return $this->productVariantId;
  1373.     }
  1374.     /**
  1375.      * Set productVariantNoComplete
  1376.      *
  1377.      * @param string $productVariantNoComplete
  1378.      *
  1379.      * @return ProductVariant
  1380.      */
  1381.     public function setProductVariantNoComplete($productVariantNoComplete)
  1382.     {
  1383.         $this->productVariantNoComplete $productVariantNoComplete;
  1384.         return $this;
  1385.     }
  1386.     /**
  1387.      * Get productVariantNoComplete
  1388.      *
  1389.      * @return string
  1390.      */
  1391.     public function getProductVariantNoComplete()
  1392.     {
  1393.         return $this->productVariantNoComplete;
  1394.     }
  1395.     /**
  1396.      * Set productVariantKey
  1397.      *
  1398.      * @param string $productVariantKey
  1399.      *
  1400.      * @return ProductVariant
  1401.      */
  1402.     public function setProductVariantKey($productVariantKey)
  1403.     {
  1404.         $this->productVariantKey $productVariantKey;
  1405.         return $this;
  1406.     }
  1407.     /**
  1408.      * Get productVariantKey
  1409.      *
  1410.      * @return string
  1411.      */
  1412.     public function getProductVariantKey()
  1413.     {
  1414.         return $this->productVariantKey;
  1415.     }
  1416.     /**
  1417.      * Set variantState
  1418.      *
  1419.      * @param string $variantState
  1420.      *
  1421.      * @return ProductVariant
  1422.      */
  1423.     public function setVariantState($variantState)
  1424.     {
  1425.         $this->variantState $variantState;
  1426.         return $this;
  1427.     }
  1428.     /**
  1429.      * Get variantState
  1430.      *
  1431.      * @return string
  1432.      */
  1433.     public function getVariantState()
  1434.     {
  1435.         return $this->variantState;
  1436.     }
  1437.     /**
  1438.      * Set tittleOnInvoice
  1439.      *
  1440.      * @param string $tittleOnInvoice
  1441.      *
  1442.      * @return ProductVariant
  1443.      */
  1444.     public function setTittleOnInvoice($tittleOnInvoice)
  1445.     {
  1446.         $this->tittleOnInvoice $tittleOnInvoice;
  1447.         return $this;
  1448.     }
  1449.     /**
  1450.      * Get tittleOnInvoice
  1451.      *
  1452.      * @return string
  1453.      */
  1454.     public function getTittleOnInvoice()
  1455.     {
  1456.         return $this->tittleOnInvoice;
  1457.     }
  1458.     /**
  1459.      * Set workingTitle
  1460.      *
  1461.      * @param string $workingTitle
  1462.      *
  1463.      * @return ProductVariant
  1464.      */
  1465.     public function setWorkingTitle($workingTitle)
  1466.     {
  1467.         $this->workingTitle $workingTitle;
  1468.         return $this;
  1469.     }
  1470.     /**
  1471.      * Get workingTitle
  1472.      *
  1473.      * @return string
  1474.      */
  1475.     public function getWorkingTitle()
  1476.     {
  1477.         return $this->workingTitle;
  1478.     }
  1479.     /**
  1480.      * Set priceNet
  1481.      *
  1482.      * @param float $priceNet
  1483.      *
  1484.      * @return ProductVariant
  1485.      */
  1486.     public function setPriceNet($priceNet)
  1487.     {
  1488.         $this->priceNet $priceNet;
  1489.         return $this;
  1490.     }
  1491.     /**
  1492.      * Get priceNet
  1493.      *
  1494.      * @return float
  1495.      */
  1496.     public function getPriceNet()
  1497.     {
  1498.         return $this->priceNet;
  1499.     }
  1500.     /**
  1501.      * Set priceGross
  1502.      *
  1503.      * @param float|null $priceGross
  1504.      *
  1505.      * @return ProductVariant
  1506.      */
  1507.     public function setPriceGross($priceGross)
  1508.     {
  1509.         $this->priceGross $priceGross;
  1510.         return $this;
  1511.     }
  1512.     /**
  1513.      * UWAGA! Cena brutto jest dynamicznie obliczana na podstawie typu klienta i kraju w ProductVariantPriceListener
  1514.      *
  1515.      * @return float
  1516.      */
  1517.     public function getPriceGross()
  1518.     {
  1519.         return $this->priceGross;
  1520.     }
  1521.     /**
  1522.      * Set isGross
  1523.      *
  1524.      * @param boolean $isGross
  1525.      *
  1526.      * @return ProductVariant
  1527.      */
  1528.     public function setIsGross($isGross)
  1529.     {
  1530.         $this->isGross $isGross;
  1531.         return $this;
  1532.     }
  1533.     /**
  1534.      * Get isGross
  1535.      *
  1536.      * @return boolean
  1537.      */
  1538.     public function getIsGross()
  1539.     {
  1540.         return $this->isGross;
  1541.     }
  1542.     /**
  1543.      * Set currencyCode
  1544.      *
  1545.      * @param string $currencyCode
  1546.      *
  1547.      * @return ProductVariant
  1548.      */
  1549.     public function setCurrencyCode($currencyCode)
  1550.     {
  1551.         $this->currencyCode $currencyCode;
  1552.         return $this;
  1553.     }
  1554.     /**
  1555.      * Get currencyCode
  1556.      *
  1557.      * @return string
  1558.      */
  1559.     public function getCurrencyCode()
  1560.     {
  1561.         return $this->currencyCode;
  1562.     }
  1563.     /**
  1564.      * Set postageType
  1565.      *
  1566.      * @param string $postageType
  1567.      *
  1568.      * @return ProductVariant
  1569.      */
  1570.     public function setPostageType($postageType)
  1571.     {
  1572.         $this->postageType $postageType;
  1573.         return $this;
  1574.     }
  1575.     /**
  1576.      * Get postageType
  1577.      *
  1578.      * @return string
  1579.      */
  1580.     public function getPostageType()
  1581.     {
  1582.         return $this->postageType;
  1583.     }
  1584.     /**
  1585.      * Set postageCost
  1586.      *
  1587.      * @param float $postageCost
  1588.      *
  1589.      * @return ProductVariant
  1590.      */
  1591.     public function setPostageCost($postageCost)
  1592.     {
  1593.         $this->postageCost $postageCost;
  1594.         return $this;
  1595.     }
  1596.     /**
  1597.      * Get postageCost
  1598.      *
  1599.      * @return float
  1600.      */
  1601.     public function getPostageCost()
  1602.     {
  1603.         return $this->postageCost;
  1604.     }
  1605.     /**
  1606.      * Set totalWeight
  1607.      *
  1608.      * @param integer $totalWeight
  1609.      *
  1610.      * @return ProductVariant
  1611.      */
  1612.     public function setTotalWeight($totalWeight)
  1613.     {
  1614.         $this->totalWeight $totalWeight;
  1615.         return $this;
  1616.     }
  1617.     /**
  1618.      * Get totalWeight
  1619.      *
  1620.      * @return integer
  1621.      */
  1622.     public function getTotalWeight()
  1623.     {
  1624.         return $this->totalWeight;
  1625.     }
  1626.     /**
  1627.      * Set seriesType
  1628.      *
  1629.      * @param integer $seriesType
  1630.      *
  1631.      * @return ProductVariant
  1632.      */
  1633.     public function setSeriesType($seriesType)
  1634.     {
  1635.         $this->seriesType $seriesType;
  1636.         return $this;
  1637.     }
  1638.     /**
  1639.      * Get seriesType
  1640.      *
  1641.      * @return integer
  1642.      */
  1643.     public function getSeriesType()
  1644.     {
  1645.         return $this->seriesType;
  1646.     }
  1647.     /**
  1648.      * Set createdAt
  1649.      *
  1650.      * @param \DateTime $createdAt
  1651.      *
  1652.      * @return ProductVariant
  1653.      */
  1654.     public function setCreatedAt($createdAt)
  1655.     {
  1656.         $this->createdAt $createdAt;
  1657.         return $this;
  1658.     }
  1659.     /**
  1660.      * Get createdAt
  1661.      *
  1662.      * @return \DateTime
  1663.      */
  1664.     public function getCreatedAt()
  1665.     {
  1666.         return $this->createdAt;
  1667.     }
  1668.     /**
  1669.      * Set updatedAt
  1670.      *
  1671.      * @param \DateTime $updatedAt
  1672.      *
  1673.      * @return ProductVariant
  1674.      */
  1675.     public function setUpdatedAt($updatedAt)
  1676.     {
  1677.         $this->updatedAt $updatedAt;
  1678.         return $this;
  1679.     }
  1680.     /**
  1681.      * Get updatedAt
  1682.      *
  1683.      * @return \DateTime
  1684.      */
  1685.     public function getUpdatedAt()
  1686.     {
  1687.         return $this->updatedAt;
  1688.     }
  1689.     /**
  1690.      * Add virtualVariant
  1691.      *
  1692.      * @param \App\Entity\Gos\ProductVariant $virtualVariant
  1693.      *
  1694.      * @return ProductVariant
  1695.      */
  1696.     public function addVirtualVariant(\App\Entity\Gos\ProductVariant $virtualVariant)
  1697.     {
  1698.         $this->virtualVariant[] = $virtualVariant;
  1699.         return $this;
  1700.     }
  1701.     public function resetVirtualVariants(): self
  1702.     {
  1703.         foreach ($this->virtualVariant as $virtualVariant) {
  1704.             $virtualVariant->removePhysicalVariant($this);
  1705.         }
  1706.         return $this;
  1707.     }
  1708.     /**
  1709.      * Remove virtualVariant
  1710.      *
  1711.      * @param \App\Entity\Gos\ProductVariant $virtualVariant
  1712.      */
  1713.     public function removeVirtualVariant(\App\Entity\Gos\ProductVariant $virtualVariant)
  1714.     {
  1715.         $this->virtualVariant->removeElement($virtualVariant);
  1716.         return $this;
  1717.     }
  1718.     /**
  1719.      * Get virtualVariant
  1720.      *
  1721.      * @return \Doctrine\Common\Collections\Collection
  1722.      */
  1723.     public function getVirtualVariant()
  1724.     {
  1725.         return $this->virtualVariant;
  1726.     }
  1727.     /**
  1728.      * Remove physicalVariant
  1729.      *
  1730.      * @param \App\Entity\Gos\ProductVariant $physicalVariant
  1731.      */
  1732.     public function removePhysicalVariant(\App\Entity\Gos\ProductVariant $physicalVariant)
  1733.     {
  1734.         $physicalVariant->removeVirtualVariant($this);
  1735.         $this->physicalVariant->removeElement($physicalVariant);
  1736.     }
  1737.     /**
  1738.      * Get physicalVariant
  1739.      *
  1740.      * @return \Doctrine\Common\Collections\Collection
  1741.      */
  1742.     public function getPhysicalVariant()
  1743.     {
  1744.         return $this->physicalVariant;
  1745.     }
  1746.     /**
  1747.      * Add productCart
  1748.      *
  1749.      * @param \App\Entity\Gos\ProductCart $productCart
  1750.      *
  1751.      * @return ProductVariant
  1752.      */
  1753.     public function addProductCart(\App\Entity\Gos\ProductCart $productCart)
  1754.     {
  1755.         $this->productCart[] = $productCart;
  1756.         return $this;
  1757.     }
  1758.     /**
  1759.      * Remove productCart
  1760.      *
  1761.      * @param \App\Entity\Gos\ProductCart $cart
  1762.      */
  1763.     public function removeProductCart(\App\Entity\Gos\ProductCart $productCart)
  1764.     {
  1765.         $this->productCart->removeElement($productCart);
  1766.     }
  1767.     /**
  1768.      * Get productCart
  1769.      *
  1770.      * @return \Doctrine\Common\Collections\Collection
  1771.      */
  1772.     public function getProductCart()
  1773.     {
  1774.         return $this->productCart;
  1775.     }
  1776.     /**
  1777.      * Set isDefault
  1778.      *
  1779.      * @param boolean $isDefault
  1780.      *
  1781.      * @return ProductVariant
  1782.      */
  1783.     public function setIsDefault($isDefault)
  1784.     {
  1785.         $this->isDefault $isDefault;
  1786.         return $this;
  1787.     }
  1788.     /**
  1789.      * Get isDefault
  1790.      *
  1791.      * @return boolean
  1792.      */
  1793.     public function getIsDefault()
  1794.     {
  1795.         return $this->isDefault;
  1796.     }
  1797.     /**
  1798.      * Set paymentMethod
  1799.      *
  1800.      * @param \App\Entity\Gos\PaymentMethod $paymentMethod
  1801.      *
  1802.      * @return ProductVariant
  1803.      */
  1804.     public function setPaymentMethod(\App\Entity\Gos\PaymentMethod $paymentMethod null)
  1805.     {
  1806.         $this->paymentMethod $paymentMethod;
  1807.         return $this;
  1808.     }
  1809.     /**
  1810.      * Get paymentMethod
  1811.      *
  1812.      * @return \Doctrine\Common\Collections\Collection
  1813.      */
  1814.     public function getPaymentMethod()
  1815.     {
  1816.         return $this->paymentMethod;
  1817.     }
  1818.     /**
  1819.      * Add paymentMethod
  1820.      *
  1821.      * @param \App\Entity\Gos\PaymentMethod $paymentMethod
  1822.      *
  1823.      * @return ProductVariant
  1824.      */
  1825.     public function addPaymentMethod(\App\Entity\Gos\PaymentMethod $paymentMethod)
  1826.     {
  1827.         if (!$this->paymentMethod->contains($paymentMethod))
  1828.         {
  1829.             $this->paymentMethod[] = $paymentMethod;
  1830.         }
  1831.         return $this;
  1832.     }
  1833.     /**
  1834.      * Remove paymentMethod
  1835.      *
  1836.      * @param \App\Entity\Gos\PaymentMethod $paymentMethod
  1837.      */
  1838.     public function removePaymentMethod(\App\Entity\Gos\PaymentMethod $paymentMethod)
  1839.     {
  1840.         $this->paymentMethod->removeElement($paymentMethod);
  1841.     }
  1842.     /**
  1843.      * Add clientType
  1844.      *
  1845.      * @param \App\Entity\Gos\ClientType $clientType
  1846.      *
  1847.      * @return ProductVariant
  1848.      */
  1849.     public function addClientType(\App\Entity\Gos\ClientType $clientType)
  1850.     {
  1851.         if (!$this->clientType->contains($clientType)) {
  1852.             $this->clientType[] = $clientType;
  1853.         }
  1854.         return $this;
  1855.     }
  1856.     /**
  1857.      * Remove clientType
  1858.      *
  1859.      * @param \App\Entity\Gos\ClientType $clientType
  1860.      */
  1861.     public function removeClientType(\App\Entity\Gos\ClientType $clientType)
  1862.     {
  1863.         $this->clientType->removeElement($clientType);
  1864.     }
  1865.     /**
  1866.      * Get clientType
  1867.      *
  1868.      * @return \Doctrine\Common\Collections\Collection
  1869.      */
  1870.     public function getClientType()
  1871.     {
  1872.         return $this->clientType;
  1873.     }
  1874.     /**
  1875.      * Set taxFreeForBudgetUnit
  1876.      *
  1877.      * @param boolean $taxFreeForBudgetUnit
  1878.      *
  1879.      * @return ProductVariant
  1880.      */
  1881.     public function setTaxFreeForBudgetUnit($taxFreeForBudgetUnit)
  1882.     {
  1883.         $this->taxFreeForBudgetUnit $taxFreeForBudgetUnit;
  1884.         return $this;
  1885.     }
  1886.     /**
  1887.      * Get taxFreeForBudgetUnit
  1888.      *
  1889.      * @return boolean
  1890.      */
  1891.     public function getTaxFreeForBudgetUnit()
  1892.     {
  1893.         return $this->taxFreeForBudgetUnit;
  1894.     }
  1895.     /**
  1896.      * Set productNumberForBudgetUnit
  1897.      *
  1898.      * @param string $productNumberForBudgetUnit
  1899.      *
  1900.      * @return ProductVariant
  1901.      */
  1902.     public function setProductNumberForBudgetUnit($productNumberForBudgetUnit)
  1903.     {
  1904.         $this->productNumberForBudgetUnit $productNumberForBudgetUnit;
  1905.         return $this;
  1906.     }
  1907.     /**
  1908.      * Get productNumberForBudgetUnit
  1909.      *
  1910.      * @return string
  1911.      */
  1912.     public function getProductNumberForBudgetUnit()
  1913.     {
  1914.         return $this->productNumberForBudgetUnit;
  1915.     }
  1916.     /**
  1917.      * Add coupon
  1918.      *
  1919.      * @param \App\Entity\Gos\Coupon $coupon
  1920.      *
  1921.      * @return ProductVariant
  1922.      */
  1923.     public function addCoupon(\App\Entity\Gos\Coupon $coupon)
  1924.     {
  1925.         if (!$this->coupon->contains($coupon)) {
  1926.             $this->coupon[] = $coupon;
  1927.         }
  1928.         return $this;
  1929.     }
  1930.     /**
  1931.      * Remove coupon
  1932.      *
  1933.      * @param \App\Entity\Gos\Coupon $coupon
  1934.      */
  1935.     public function removeCoupon(\App\Entity\Gos\Coupon $coupon)
  1936.     {
  1937.         $this->coupon->removeElement($coupon);
  1938.     }
  1939.     /**
  1940.      * Get coupon
  1941.      *
  1942.      * @return \Doctrine\Common\Collections\Collection
  1943.      */
  1944.     public function getCoupon()
  1945.     {
  1946.         return $this->coupon;
  1947.     }
  1948.     /**
  1949.      * Add coupon
  1950.      *
  1951.      * @param \App\Entity\Gos\ApplicationCoupon $applicationCoupon
  1952.      *
  1953.      * @return ProductVariant
  1954.      */
  1955.     public function addApplicationCoupon(ApplicationCoupon $applicationCoupon)
  1956.     {
  1957.         if (!$this->applicationCoupon->contains($applicationCoupon)) {
  1958.             $this->applicationCoupon[] = $applicationCoupon;
  1959.         }
  1960.         return $this;
  1961.     }
  1962.     /**
  1963.      * Remove coupon
  1964.      *
  1965.      * @param \App\Entity\Gos\ApplicationCoupon $applicationCoupon
  1966.      */
  1967.     public function removeApplicationCoupon(ApplicationCoupon $applicationCoupon)
  1968.     {
  1969.         $this->applicationCoupon->removeElement($applicationCoupon);
  1970.     }
  1971.     /**
  1972.      * Get coupon
  1973.      *
  1974.      * @return \Doctrine\Common\Collections\Collection
  1975.      */
  1976.     public function getApplicationCoupon()
  1977.     {
  1978.         return $this->applicationCoupon;
  1979.     }
  1980.     /**
  1981.      * Add salesManagoCoupon
  1982.      *
  1983.      * @param \App\Entity\Gos\SalesManagoCoupon $salesManagoCoupon
  1984.      *
  1985.      * @return ProductVariant
  1986.      */
  1987.     public function addSalesManagoCoupon(\App\Entity\Gos\SalesManagoCoupon $salesManagoCoupon)
  1988.     {
  1989.         if (!$this->salesManagoCoupons->contains($salesManagoCoupon)) {
  1990.             $this->salesManagoCoupons[] = $salesManagoCoupon;
  1991.         }
  1992.         return $this;
  1993.     }
  1994.     /**
  1995.      * Remove salesManagoCoupon
  1996.      *
  1997.      * @param \App\Entity\Gos\SalesManagoCoupon $salesManagoCoupon
  1998.      */
  1999.     public function removeSalesManagoCoupon(\App\Entity\Gos\SalesManagoCoupon $salesManagoCoupon)
  2000.     {
  2001.         $this->salesManagoCoupons->removeElement($salesManagoCoupon);
  2002.     }
  2003.     /**
  2004.      * Get salesManagoCoupons
  2005.      *
  2006.      * @return \Doctrine\Common\Collections\Collection
  2007.      */
  2008.     public function getSalesManagoCoupons()
  2009.     {
  2010.         return $this->salesManagoCoupons;
  2011.     }
  2012.     /**
  2013.      * Add salesManagoGratisCoupon
  2014.      *
  2015.      * @param \App\Entity\Gos\SalesManagoCoupon $salesManagoGratisCoupon
  2016.      *
  2017.      * @return ProductVariant
  2018.      */
  2019.     public function addSalesManagoGratisCoupon(\App\Entity\Gos\SalesManagoCoupon $salesManagoGratisCoupon)
  2020.     {
  2021.         if (!$this->salesManagoGratisCoupons->contains($salesManagoGratisCoupon)) {
  2022.             $this->salesManagoGratisCoupons[] = $salesManagoGratisCoupon;
  2023.         }
  2024.         return $this;
  2025.     }
  2026.     /**
  2027.      * Remove salesManagoGratisCoupon
  2028.      *
  2029.      * @param \App\Entity\Gos\SalesManagoCoupon $salesManagoGratisCoupon
  2030.      */
  2031.     public function removeSalesManagoGratisCoupon(\App\Entity\Gos\SalesManagoCoupon $salesManagoGratisCoupon)
  2032.     {
  2033.         $this->salesManagoGratisCoupons->removeElement($salesManagoGratisCoupon);
  2034.     }
  2035.     /**
  2036.      * Get salesManagoGratisCoupons
  2037.      *
  2038.      * @return \Doctrine\Common\Collections\Collection
  2039.      */
  2040.     public function getSalesManagoGratisCoupons()
  2041.     {
  2042.         return $this->salesManagoGratisCoupons;
  2043.     }
  2044.     /**
  2045.      * Set tradeName
  2046.      *
  2047.      * @param string $tradeName
  2048.      *
  2049.      * @return ProductVariant
  2050.      */
  2051.     public function setTradeName($tradeName)
  2052.     {
  2053.         $this->tradeName $tradeName;
  2054.         if(!$this->getTradeNameSM()){
  2055.             $this->setTradeNameSM($tradeName);
  2056.         }
  2057.         return $this;
  2058.     }
  2059.     /**
  2060.      * Get tradeName
  2061.      *
  2062.      * @return string
  2063.      */
  2064.     public function getTradeName()
  2065.     {
  2066.         return $this->tradeName;
  2067.     }
  2068.     /**
  2069.      * Set technicalInformations
  2070.      *
  2071.      * @param string $technicalInformations
  2072.      *
  2073.      * @return ProductVariant
  2074.      */
  2075.     public function setTechnicalInformations($technicalInformations)
  2076.     {
  2077.         $this->technicalInformations $technicalInformations;
  2078.         return $this;
  2079.     }
  2080.     /**
  2081.      * Get technicalInformations
  2082.      *
  2083.      * @return string
  2084.      */
  2085.     public function getTechnicalInformations()
  2086.     {
  2087.         return $this->technicalInformations;
  2088.     }
  2089.     /**
  2090.      * Set technicalInformationForMail
  2091.      *
  2092.      * @param string $technicalInformationForMail
  2093.      * @return ProductVariant
  2094.      */
  2095.     public function setTechnicalInformationForMail($technicalInformationForMail)
  2096.     {
  2097.         $this->technicalInformationForMail $technicalInformationForMail;
  2098.         return $this;
  2099.     }
  2100.     /**
  2101.      * Get technicalInformationForMail
  2102.      *
  2103.      * @return string
  2104.      */
  2105.     public function getTechnicalInformationForMail()
  2106.     {
  2107.         return $this->technicalInformationForMail;
  2108.     }
  2109.     /**
  2110.      * Set discountOnline
  2111.      *
  2112.      * @param boolean $discountOnline
  2113.      *
  2114.      * @return ProductVariant
  2115.      */
  2116.     public function setDiscountOnline($discountOnline)
  2117.     {
  2118.         $this->discountOnline $discountOnline;
  2119.         return $this;
  2120.     }
  2121.     /**
  2122.      * Get discountOnline
  2123.      *
  2124.      * @return boolean
  2125.      */
  2126.     public function getDiscountOnline()
  2127.     {
  2128.         return $this->discountOnline;
  2129.     }
  2130.     /**
  2131.      * Set discountValueOnline
  2132.      *
  2133.      * @param float $discountValueOnline
  2134.      *
  2135.      * @return ProductVariant
  2136.      */
  2137.     public function setDiscountValueOnline($discountValueOnline)
  2138.     {
  2139.         $this->discountValueOnline $discountValueOnline;
  2140.         return $this;
  2141.     }
  2142.     /**
  2143.      * Get discountValueOnline
  2144.      *
  2145.      * @return float
  2146.      */
  2147.     public function getDiscountValueOnline()
  2148.     {
  2149.         return $this->discountValueOnline;
  2150.     }
  2151.     /**
  2152.      * Set masterProduct
  2153.      *
  2154.      * @param \App\Entity\Gos\Product $masterProduct
  2155.      *
  2156.      * @return ProductVariant
  2157.      */
  2158.     public function setMasterProduct(\App\Entity\Gos\Product $masterProduct null)
  2159.     {
  2160.         //        $masterProduct->addMasterProductVariant($this);
  2161.         $this->masterProduct $masterProduct;
  2162.         return $this;
  2163.     }
  2164.     /**
  2165.      * Get masterProduct
  2166.      *
  2167.      * @return \App\Entity\Gos\Product
  2168.      */
  2169.     public function getMasterProduct()
  2170.     {
  2171.         return $this->masterProduct;
  2172.     }
  2173.     /**
  2174.      * Set showGrossPrice
  2175.      *
  2176.      * @param boolean $showGrossPrice
  2177.      *
  2178.      * @return ProductVariant
  2179.      */
  2180.     public function setShowGrossPrice($showGrossPrice)
  2181.     {
  2182.         $this->showGrossPrice $showGrossPrice;
  2183.         return $this;
  2184.     }
  2185.     /**
  2186.      * Get showGrossPrice
  2187.      *
  2188.      * @return boolean
  2189.      */
  2190.     public function getShowGrossPrice()
  2191.     {
  2192.         return $this->showGrossPrice;
  2193.     }
  2194.     /**
  2195.      * Add gratisCoupon
  2196.      *
  2197.      * @param \App\Entity\Gos\Coupon $gratisCoupon
  2198.      *
  2199.      * @return ProductVariant
  2200.      */
  2201.     public function addGratisCoupon(\App\Entity\Gos\Coupon $gratisCoupon)
  2202.     {
  2203.         if (!$this->gratisCoupon->contains($gratisCoupon)) {
  2204.             $this->gratisCoupon[] = $gratisCoupon;
  2205.         }
  2206.         return $this;
  2207.     }
  2208.     /**
  2209.      * Remove gratisCoupon
  2210.      *
  2211.      * @param \App\Entity\Gos\Coupon $gratisCoupon
  2212.      */
  2213.     public function removeGratisCoupon(\App\Entity\Gos\Coupon $gratisCoupon)
  2214.     {
  2215.         $this->gratisCoupon->removeElement($gratisCoupon);
  2216.     }
  2217.     /**
  2218.      * Get gratisCoupon
  2219.      *
  2220.      * @return \Doctrine\Common\Collections\Collection
  2221.      */
  2222.     public function getGratisCoupon()
  2223.     {
  2224.         return $this->gratisCoupon;
  2225.     }
  2226.     /**
  2227.      * Add bundleCoupon
  2228.      *
  2229.      * @param \App\Entity\Gos\Coupon $bundleCoupon
  2230.      * @return ProductVariant
  2231.      */
  2232.     public function addBundleCoupon(\App\Entity\Gos\Coupon $bundleCoupon)
  2233.     {
  2234.         if (!$this->bundleCoupon->contains($bundleCoupon)) {
  2235.             $this->bundleCoupon[] = $bundleCoupon;
  2236.         }
  2237.         return $this;
  2238.     }
  2239.     /**
  2240.      * Remove bundleCoupon
  2241.      *
  2242.      * @param \App\Entity\Gos\Coupon $bundleCoupon
  2243.      */
  2244.     public function removeBundleCoupon(\App\Entity\Gos\Coupon $bundleCoupon)
  2245.     {
  2246.         $this->bundleCoupon->removeElement($bundleCoupon);
  2247.     }
  2248.     /**
  2249.      * Get bundleCoupon
  2250.      *
  2251.      * @return \Doctrine\Common\Collections\Collection
  2252.      */
  2253.     public function getBundleCoupon()
  2254.     {
  2255.         return $this->bundleCoupon;
  2256.     }
  2257.     /**
  2258.      * Set couponPack
  2259.      *
  2260.      * @param CouponPackProduct $couponPack
  2261.      * @return ProductVariant
  2262.      */
  2263.     public function setCouponPack(\App\Entity\Gos\CouponPackProduct $couponPack)
  2264.     {
  2265.         $this->couponPack $couponPack;
  2266.         return $this;
  2267.     }
  2268.     /**
  2269.      * Get couponPack
  2270.      *
  2271.      * @return CouponPackProduct
  2272.      */
  2273.     public function getCouponPack()
  2274.     {
  2275.         return $this->couponPack;
  2276.     }
  2277.     /**
  2278.      * Add portalSetting
  2279.      *
  2280.      * @param \App\Entity\Gos\PortalSettings $portalSetting
  2281.      *
  2282.      * @return ProductVariant
  2283.      */
  2284.     public function addPortalSetting(\App\Entity\Gos\PortalSettings $portalSetting)
  2285.     {
  2286.         if (!$this->portalSettings->contains($portalSetting))
  2287.         {
  2288.             $this->portalSettings[] = $portalSetting;
  2289.             $portalSetting->addProductVariant($this);
  2290.         }
  2291.         return $this;
  2292.     }
  2293.     /**
  2294.      * Remove portalSetting
  2295.      *
  2296.      * @param \App\Entity\Gos\PortalSettings $portalSetting
  2297.      */
  2298.     public function removePortalSetting(\App\Entity\Gos\PortalSettings $portalSetting)
  2299.     {
  2300.         $this->portalSettings->removeElement($portalSetting);
  2301.         $portalSetting->removeProductVariant($this);
  2302.     }
  2303.     /**
  2304.      * Get portalSettings
  2305.      *
  2306.      * @return \Doctrine\Common\Collections\Collection
  2307.      */
  2308.     public function getPortalSettings()
  2309.     {
  2310.         return $this->portalSettings;
  2311.     }
  2312.     /**
  2313.      * Set stateIsAvailible
  2314.      *
  2315.      * @param boolean $stateIsAvailible
  2316.      *
  2317.      * @return ProductVariant
  2318.      */
  2319.     public function setStateIsAvailible($stateIsAvailible)
  2320.     {
  2321.         $this->stateIsAvailible $stateIsAvailible;
  2322.         return $this;
  2323.     }
  2324.     /**
  2325.      * Get stateIsAvailible
  2326.      *
  2327.      * @return boolean
  2328.      */
  2329.     public function getStateIsAvailible()
  2330.     {
  2331.         return $this->stateIsAvailible;
  2332.     }
  2333.     /**
  2334.      * Set stateIsForcedReservation
  2335.      *
  2336.      * @param boolean $stateIsForcedReservation
  2337.      *
  2338.      * @return ProductVariant
  2339.      */
  2340.     public function setStateIsForcedReservation($stateIsForcedReservation)
  2341.     {
  2342.         $this->stateIsForcedReservation $stateIsForcedReservation;
  2343.         return $this;
  2344.     }
  2345.     /**
  2346.      * Get stateIsForcedReservation
  2347.      *
  2348.      * @return boolean
  2349.      */
  2350.     public function getStateIsForcedReservation()
  2351.     {
  2352.         return $this->stateIsForcedReservation;
  2353.     }
  2354.     /**
  2355.      * Set stateIsProductTest
  2356.      *
  2357.      * @param boolean $stateIsProductTest
  2358.      *
  2359.      * @return ProductVariant
  2360.      */
  2361.     public function setStateIsProductTest($stateIsProductTest)
  2362.     {
  2363.         $this->stateIsProductTest $stateIsProductTest;
  2364.         return $this;
  2365.     }
  2366.     /**
  2367.      * Get stateIsProductTest
  2368.      *
  2369.      * @return boolean
  2370.      */
  2371.     public function getStateIsProductTest()
  2372.     {
  2373.         return $this->stateIsProductTest;
  2374.     }
  2375.     /**
  2376.      * Set stateIsTrialRecurring
  2377.      *
  2378.      * @param boolean $stateIsTrialRecurring
  2379.      *
  2380.      * @return ProductVariant
  2381.      */
  2382.     public function setStateIsTrialRecurring($stateIsTrialRecurring)
  2383.     {
  2384.         $this->stateIsTrialRecurring $stateIsTrialRecurring;
  2385.         return $this;
  2386.     }
  2387.     /**
  2388.      * Get stateIsTrialRecurring
  2389.      *
  2390.      * @return boolean|null
  2391.      */
  2392.     public function getStateIsTrialRecurring()
  2393.     {
  2394.         return $this->stateIsTrialRecurring;
  2395.     }
  2396.     /**
  2397.      * Set trialRecurringDuration
  2398.      *
  2399.      * @param int $trialRecurringDuration
  2400.      *
  2401.      * @return ProductVariant
  2402.      */
  2403.     public function setTrialRecurringDuration($trialRecurringDuration)
  2404.     {
  2405.         $this->trialRecurringDuration $trialRecurringDuration;
  2406.         return $this;
  2407.     }
  2408.     /**
  2409.      * Get trialRecurringDuration
  2410.      *
  2411.      * @return int|null
  2412.      */
  2413.     public function getTrialRecurringDuration()
  2414.     {
  2415.         return $this->trialRecurringDuration;
  2416.     }
  2417.     /**
  2418.      * Set productVariantAfterTrialRecurringEnd
  2419.      *
  2420.      * @param ProductVariant $productVariantAfterTrialRecurringEnd
  2421.      * @return ProductVariant
  2422.      */
  2423.     public function setProductVariantAfterTrialRecurringEnd($productVariantAfterTrialRecurringEnd)
  2424.     {
  2425.         $this->productVariantAfterTrialRecurringEnd $productVariantAfterTrialRecurringEnd;
  2426.         return $this;
  2427.     }
  2428.     /**
  2429.      * Get productVariantAfterTrialRecurringEnd
  2430.      *
  2431.      * @return ProductVariant|null
  2432.      */
  2433.     public function getProductVariantAfterTrialRecurringEnd()
  2434.     {
  2435.         return $this->productVariantAfterTrialRecurringEnd;
  2436.     }
  2437.     /**
  2438.      * Add term
  2439.      *
  2440.      * @param \App\Entity\Gos\Term $term
  2441.      *
  2442.      * @return ProductVariant
  2443.      */
  2444.     public function addTerm(Term $term)
  2445.     {
  2446.         if (!$this->terms->contains($term)) {
  2447.             $term->addProductVariant($this);
  2448.             $this->terms[] = $term;
  2449.         }
  2450.         return $this;
  2451.     }
  2452.     /**
  2453.      * Remove term
  2454.      *
  2455.      * @param \App\Entity\Gos\Term $term
  2456.      */
  2457.     public function removeTerm(Term $term)
  2458.     {
  2459.         $term->removeProductVariant($this);
  2460.         $this->terms->removeElement($term);
  2461.     }
  2462.     /**
  2463.      * Get terms
  2464.      *
  2465.      * @return \Doctrine\Common\Collections\Collection
  2466.      */
  2467.     public function getTerms()
  2468.     {
  2469.         return $this->terms;
  2470.     }
  2471.     /**
  2472.      * Add accessLevel
  2473.      *
  2474.      * @param \App\Entity\Gos\AccessLevel $accessLevel
  2475.      *
  2476.      * @return ProductVariant
  2477.      */
  2478.     public function addAccessLevel(\App\Entity\Gos\AccessLevel $accessLevel)
  2479.     {
  2480.         if (!$this->accessLevel->contains($accessLevel)) {
  2481.             $this->accessLevel[] = $accessLevel;
  2482.             $accessLevel->setProductVariant($this);
  2483.         }
  2484.         return $this;
  2485.     }
  2486.     /**
  2487.      * Remove accessLevel
  2488.      *
  2489.      * @param \App\Entity\Gos\AccessLevel $accessLevel
  2490.      */
  2491.     public function removeAccessLevel(\App\Entity\Gos\AccessLevel $accessLevel)
  2492.     {
  2493.         $this->accessLevel->removeElement($accessLevel);
  2494.     }
  2495.     /**
  2496.      * Get accessLevel
  2497.      *
  2498.      * @return \Doctrine\Common\Collections\Collection
  2499.      */
  2500.     public function getAccessLevel()
  2501.     {
  2502.         return $this->accessLevel;
  2503.     }
  2504.     /**
  2505.      * Set buyMaxOne
  2506.      *
  2507.      * @param boolean $buyMaxOne
  2508.      *
  2509.      * @return ProductVariant
  2510.      */
  2511.     public function setBuyMaxOne($buyMaxOne)
  2512.     {
  2513.         $this->buyMaxOne $buyMaxOne;
  2514.         return $this;
  2515.     }
  2516.     /**
  2517.      * Get buyMaxOne
  2518.      *
  2519.      * @return boolean
  2520.      */
  2521.     public function getBuyMaxOne()
  2522.     {
  2523.         return $this->buyMaxOne;
  2524.     }
  2525.     /**
  2526.      * Set maxUsers
  2527.      *
  2528.      * @param integer $maxUsers
  2529.      *
  2530.      * @return ProductVariant
  2531.      */
  2532.     public function setMaxUsers($maxUsers)
  2533.     {
  2534.         $this->maxUsers $maxUsers;
  2535.         return $this;
  2536.     }
  2537.     /**
  2538.      * Get maxUsers
  2539.      *
  2540.      * @return integer
  2541.      */
  2542.     public function getMaxUsers()
  2543.     {
  2544.         return $this->maxUsers;
  2545.     }
  2546.     /**
  2547.      * Add orderProductVariant
  2548.      *
  2549.      * @param \App\Entity\Gos\OrderProductVariant $orderProductVariant
  2550.      *
  2551.      * @return ProductVariant
  2552.      */
  2553.     public function addOrderProductVariant(\App\Entity\Gos\OrderProductVariant $orderProductVariant)
  2554.     {
  2555.         if (!$this->orderProductVariant->contains($orderProductVariant)) {
  2556.             $this->orderProductVariant[] = $orderProductVariant;
  2557.             $orderProductVariant->setProductVariant($this);
  2558.         }
  2559.         return $this;
  2560.     }
  2561.     /**
  2562.      * Remove orderProductVariant
  2563.      *
  2564.      * @param \App\Entity\Gos\OrderProductVariant $orderProductVariant
  2565.      */
  2566.     public function removeOrderProductVariant(\App\Entity\Gos\OrderProductVariant $orderProductVariant)
  2567.     {
  2568.         $this->orderProductVariant->removeElement($orderProductVariant);
  2569.     }
  2570.     /**
  2571.      * Get orderProductVariant
  2572.      *
  2573.      * @return \Doctrine\Common\Collections\Collection
  2574.      */
  2575.     public function getOrderProductVariant()
  2576.     {
  2577.         return $this->orderProductVariant;
  2578.     }
  2579.     /**
  2580.      * Set isAddition
  2581.      *
  2582.      * @param boolean $isAddition
  2583.      *
  2584.      * @return ProductVariant
  2585.      */
  2586.     public function setIsAddition($isAddition)
  2587.     {
  2588.         $this->isAddition $isAddition;
  2589.         return $this;
  2590.     }
  2591.     /**
  2592.      * Get isAddition
  2593.      *
  2594.      * @return boolean
  2595.      */
  2596.     public function getIsAddition()
  2597.     {
  2598.         return $this->isAddition;
  2599.     }
  2600.     public function addCouponPack(CouponPackProduct $couponPack): self
  2601.     {
  2602.         if (!$this->couponPack->contains($couponPack)) {
  2603.             $this->couponPack[] = $couponPack;
  2604.             $couponPack->setProductVariant($this);
  2605.         }
  2606.         return $this;
  2607.     }
  2608.     public function removeCouponPack(CouponPackProduct $couponPack): self
  2609.     {
  2610.         if ($this->couponPack->contains($couponPack)) {
  2611.             $this->couponPack->removeElement($couponPack);
  2612.             // set the owning side to null (unless already changed)
  2613.             if ($couponPack->getProductVariant() === $this) {
  2614.                 $couponPack->setProductVariant(null);
  2615.             }
  2616.         }
  2617.         return $this;
  2618.     }
  2619.     public function getQuantity(): ?int
  2620.     {
  2621.         return $this->quantity;
  2622.     }
  2623.     public function setQuantity(int $quantity): self
  2624.     {
  2625.         $this->quantity $quantity;
  2626.         return $this;
  2627.     }
  2628.     public function getOrderQuantity(): ?int
  2629.     {
  2630.         return $this->getProductVariantOrderQuantity() ? $this->getProductVariantOrderQuantity()->getOrderQuantity() : 0;
  2631.     }
  2632.     public function setOrderQuantity(int $orderQuantity): self
  2633.     {
  2634.         $this->orderQuantity $orderQuantity;
  2635.         return $this;
  2636.     }
  2637.     /**
  2638.      * @return Collection|ProductPackItem[]
  2639.      */
  2640.     public function getProductPackItem(): Collection
  2641.     {
  2642.         return $this->productPackItem;
  2643.     }
  2644.     public function addProductPackItem(ProductPackItem $productPackItem): self
  2645.     {
  2646.         if (!$this->productPackItem->contains($productPackItem)) {
  2647.             $this->productPackItem[] = $productPackItem;
  2648.             $productPackItem->setProductVariant($this);
  2649.         }
  2650.         return $this;
  2651.     }
  2652.     public function removeProductPackItem(ProductPackItem $productPackItem): self
  2653.     {
  2654.         if ($this->productPackItem->contains($productPackItem)) {
  2655.             $this->productPackItem->removeElement($productPackItem);
  2656.             // set the owning side to null (unless already changed)
  2657.             if ($productPackItem->getProductVariant() === $this) {
  2658.                 $productPackItem->setProductVariant(null);
  2659.             }
  2660.         }
  2661.         return $this;
  2662.     }
  2663.     /**
  2664.      * @return Collection|EventProductVariantGroupItem[]
  2665.      */
  2666.     public function getProductVariantGroupItems(): Collection
  2667.     {
  2668.         return $this->productVariantGroupItems;
  2669.     }
  2670.     public function addProductVariantGroupItem(EventProductVariantGroupItem $productVariantGroupItem): self
  2671.     {
  2672.         if (!$this->productVariantGroupItems->contains($productVariantGroupItem)) {
  2673.             $this->productVariantGroupItems[] = $productVariantGroupItem;
  2674.             $productVariantGroupItem->setProductVariant($this);
  2675.         }
  2676.         return $this;
  2677.     }
  2678.     public function removeProductVariantGroupItem(EventProductVariantGroupItem $productVariantGroupItem): self
  2679.     {
  2680.         if ($this->productVariantGroupItems->contains($productVariantGroupItem)) {
  2681.             $this->productVariantGroupItems->removeElement($productVariantGroupItem);
  2682.             // set the owning side to null (unless already changed)
  2683.             if ($productVariantGroupItem->getProductVariant() === $this) {
  2684.                 $productVariantGroupItem->setProductVariant(null);
  2685.             }
  2686.         }
  2687.         return $this;
  2688.     }
  2689.     /**
  2690.      * @return Collection|EventProductVariantGroup[]
  2691.      */
  2692.     public function getProductVariantGroups(): Collection
  2693.     {
  2694.         return $this->productVariantGroups;
  2695.     }
  2696.     public function addProductVariantGroup(EventProductVariantGroup $productVariantGroup): self
  2697.     {
  2698.         if (!$this->productVariantGroups->contains($productVariantGroup)) {
  2699.             $this->productVariantGroups[] = $productVariantGroup;
  2700.             $productVariantGroup->setProductVariant($this);
  2701.         }
  2702.         return $this;
  2703.     }
  2704.     public function removeProductVariantGroup(EventProductVariantGroup $productVariantGroup): self
  2705.     {
  2706.         if ($this->productVariantGroups->contains($productVariantGroup)) {
  2707.             $this->productVariantGroups->removeElement($productVariantGroup);
  2708.             // set the owning side to null (unless already changed)
  2709.             if ($productVariantGroup->getProductVariant() === $this) {
  2710.                 $productVariantGroup->setProductVariant(null);
  2711.             }
  2712.         }
  2713.         return $this;
  2714.     }
  2715.     public function getCartParticipantsPrimary(): Collection
  2716.     {
  2717.         return $this->cartParticipantsPrimary;
  2718.     }
  2719.     public function setCartParticipantsPrimary(?CartParticipant $cartParticipantsPrimary): self
  2720.     {
  2721.         $this->cartParticipantsPrimary $cartParticipantsPrimary;
  2722.         // set (or unset) the owning side of the relation if necessary
  2723.         $newPrimaryProductVariant $cartParticipantsPrimary === null null $this;
  2724.         if ($newPrimaryProductVariant !== $cartParticipantsPrimary->getPrimaryProductVariant()) {
  2725.             $cartParticipantsPrimary->setPrimaryProductVariant($newPrimaryProductVariant);
  2726.         }
  2727.         return $this;
  2728.     }
  2729.     public function addCartParticipantsPrimary(CartParticipant $cartParticipantsPrimary): self
  2730.     {
  2731.         if (!$this->cartParticipantsPrimary->contains($cartParticipantsPrimary)) {
  2732.             $this->cartParticipantsPrimary[] = $cartParticipantsPrimary;
  2733.             $cartParticipantsPrimary->setPrimaryProductVariant($this);
  2734.         }
  2735.         return $this;
  2736.     }
  2737.     public function removeCartParticipantsPrimary(CartParticipant $cartParticipantsPrimary): self
  2738.     {
  2739.         if ($this->cartParticipantsPrimary->contains($cartParticipantsPrimary)) {
  2740.             $this->cartParticipantsPrimary->removeElement($cartParticipantsPrimary);
  2741.             // set the owning side to null (unless already changed)
  2742.             if ($cartParticipantsPrimary->getPrimaryProductVariant() === $this) {
  2743.                 $cartParticipantsPrimary->setPrimaryProductVariant(null);
  2744.             }
  2745.         }
  2746.         return $this;
  2747.     }
  2748.     public function getParticipantsPrimary()
  2749.     {
  2750.         return $this->participantsPrimary;
  2751.     }
  2752.     public function setParticipantsPrimary(?Participants $participantsPrimary): self
  2753.     {
  2754.         $this->participantsPrimary $participantsPrimary;
  2755.         // set (or unset) the owning side of the relation if necessary
  2756.         $newPrimaryProductVariant $participantsPrimary === null null $this;
  2757.         if ($newPrimaryProductVariant !== $participantsPrimary->getPrimaryProductVariant()) {
  2758.             $participantsPrimary->setPrimaryProductVariant($newPrimaryProductVariant);
  2759.         }
  2760.         return $this;
  2761.     }
  2762.     public function addParticipantsPrimary(Participants $participantsPrimary): self
  2763.     {
  2764.         if (!$this->participantsPrimary->contains($participantsPrimary)) {
  2765.             $this->participantsPrimary[] = $participantsPrimary;
  2766.             $participantsPrimary->setPrimaryProductVariant($this);
  2767.         }
  2768.         return $this;
  2769.     }
  2770.     public function removeParticipantsPrimary(Participants $participantsPrimary): self
  2771.     {
  2772.         if ($this->participantsPrimary->contains($participantsPrimary)) {
  2773.             $this->participantsPrimary->removeElement($participantsPrimary);
  2774.             // set the owning side to null (unless already changed)
  2775.             if ($participantsPrimary->getPrimaryProductVariant() === $this) {
  2776.                 $participantsPrimary->setPrimaryProductVariant(null);
  2777.             }
  2778.         }
  2779.         return $this;
  2780.     }
  2781.     /**
  2782.      * @return Collection|ProductVariantDescription[]
  2783.      */
  2784.     public function getProductVariantDescriptions(): Collection
  2785.     {
  2786.         return $this->productVariantDescriptions;
  2787.     }
  2788.     public function addProductVariantDescription(ProductVariantDescription $productVariantDescription): self
  2789.     {
  2790.         if (!$this->productVariantDescriptions->contains($productVariantDescription)) {
  2791.             $this->productVariantDescriptions[] = $productVariantDescription;
  2792.             $productVariantDescription->setProductVariant($this);
  2793.         }
  2794.         return $this;
  2795.     }
  2796.     public function removeProductVariantDescription(ProductVariantDescription $productVariantDescription): self
  2797.     {
  2798.         if ($this->productVariantDescriptions->contains($productVariantDescription)) {
  2799.             $this->productVariantDescriptions->removeElement($productVariantDescription);
  2800.             // set the owning side to null (unless already changed)
  2801.             if ($productVariantDescription->getProductVariant() === $this) {
  2802.                 $productVariantDescription->setProductVariant(null);
  2803.             }
  2804.         }
  2805.         return $this;
  2806.     }
  2807.     public function getSubscriptionType(): ?string
  2808.     {
  2809.         return $this->subscriptionType;
  2810.     }
  2811.     public function setSubscriptionType(string $subscriptionType): self
  2812.     {
  2813.         $this->subscriptionType $subscriptionType;
  2814.         return $this;
  2815.     }
  2816.     public function getSubscriptionPlan(): ?string
  2817.     {
  2818.         return $this->subscriptionPlan;
  2819.     }
  2820.     public function setSubscriptionPlan(string $subscriptionPlan): self
  2821.     {
  2822.         $this->subscriptionPlan $subscriptionPlan;
  2823.         return $this;
  2824.     }
  2825.     public function setImageFile(File $imageFile null)
  2826.     {
  2827.         $this->imageFile $imageFile;
  2828.         // VERY IMPORTANT:
  2829.         // It is required that at least one field changes if you are using Doctrine,
  2830.         // otherwise the event listeners won't be called and the file is lost
  2831.         if ($imageFile)
  2832.         {
  2833.             // if 'updatedAt' is not defined in your entity, use another property
  2834.             $this->updatedAt = new \DateTime('now');
  2835.         }
  2836.     }
  2837.     public function getImageFile()
  2838.     {
  2839.         return $this->imageFile;
  2840.     }
  2841.     public function setImage($image)
  2842.     {
  2843.         $this->image $image;
  2844.     }
  2845.     public function getImage()
  2846.     {
  2847.         return $this->image;
  2848.     }
  2849.     public function getPromoted(): ?bool
  2850.     {
  2851.         return $this->promoted;
  2852.     }
  2853.     public function setPromoted(bool $promoted): self
  2854.     {
  2855.         $this->promoted $promoted;
  2856.         return $this;
  2857.     }
  2858.     public function getLabel(): ?string
  2859.     {
  2860.         return $this->label;
  2861.     }
  2862.     public function setLabel(?string $label): self
  2863.     {
  2864.         $this->label $label;
  2865.         return $this;
  2866.     }
  2867.     public function getEventDate(): ?\DateTimeInterface
  2868.     {
  2869.         return $this->eventDate;
  2870.     }
  2871.     public function setEventDate(?\DateTimeInterface $eventDate): self
  2872.     {
  2873.         $this->eventDate $eventDate;
  2874.         return $this;
  2875.     }
  2876.     public function getProductNumberNoTax(): ?string
  2877.     {
  2878.         return $this->productNumberNoTax;
  2879.     }
  2880.     public function setProductNumberNoTax(?string $productNumberNoTax): self
  2881.     {
  2882.         $this->productNumberNoTax $productNumberNoTax;
  2883.         return $this;
  2884.     }
  2885.     public function getProductNumberPartTax(): ?string
  2886.     {
  2887.         return $this->productNumberPartTax;
  2888.     }
  2889.     public function setProductNumberPartTax(?string $productNumberPartTax): self
  2890.     {
  2891.         $this->productNumberPartTax $productNumberPartTax;
  2892.         return $this;
  2893.     }
  2894.     public function getBurFundingProductVariant(): ?ProductVariant
  2895.     {
  2896.         return $this->burFundingProductVariant;
  2897.     }
  2898.     public function setBurFundingProductVariant(?ProductVariant $burFundingProductVariant): self
  2899.     {
  2900.         $this->burFundingProductVariant $burFundingProductVariant;
  2901.         return $this;
  2902.     }
  2903.     /**
  2904.      * @return Collection|Alert[]
  2905.      */
  2906.     public function getAlerts(): Collection
  2907.     {
  2908.         return $this->alerts;
  2909.     }
  2910.     public function addAlert(Alert $alert): self
  2911.     {
  2912.         if (!$this->alerts->contains($alert)) {
  2913.             $this->alerts[] = $alert;
  2914.             $alert->setProductVariant($this);
  2915.         }
  2916.         return $this;
  2917.     }
  2918.     public function removeAlert(Alert $alert): self
  2919.     {
  2920.         if ($this->alerts->contains($alert)) {
  2921.             $this->alerts->removeElement($alert);
  2922.             // set the owning side to null (unless already changed)
  2923.             if ($alert->getProductVariant() === $this) {
  2924.                 $alert->setProductVariant(null);
  2925.             }
  2926.         }
  2927.         return $this;
  2928.     }
  2929.     public function getQuantityLeft(): int
  2930.     {
  2931.         if ($this->quantity == 0)
  2932.         {
  2933.             return 999;
  2934.         }
  2935.         return $this->quantity $this->orderQuantity;
  2936.     }
  2937.     public function getIsPublished(): ?bool
  2938.     {
  2939.         return $this->isPublished;
  2940.     }
  2941.     public function setIsPublished(bool $isPublished): self
  2942.     {
  2943.         $this->isPublished $isPublished;
  2944.         return $this;
  2945.     }
  2946.     public function getIsTest(): ?bool
  2947.     {
  2948.         return $this->isTest;
  2949.     }
  2950.     public function setIsTest(?bool $isTest): self
  2951.     {
  2952.         $this->isTest $isTest;
  2953.         return $this;
  2954.     }
  2955.     public function getIsGiftable(): ?bool
  2956.     {
  2957.         return $this->isGiftable;
  2958.     }
  2959.     public function setIsGiftable(?bool $isGiftable): self
  2960.     {
  2961.         $this->isGiftable $isGiftable;
  2962.         return $this;
  2963.     }
  2964.     public function getIsHidden(): ?bool
  2965.     {
  2966.         return $this->isHidden;
  2967.     }
  2968.     public function setIsHidden(?bool $isHidden): self
  2969.     {
  2970.         $this->isHidden $isHidden;
  2971.         return $this;
  2972.     }
  2973.     public function getIsPartialPaymentActive(): ?bool
  2974.     {
  2975.         return $this->isPartialPaymentActive;
  2976.     }
  2977.     public function setIsPartialPaymentActive(bool $isPartialPaymentActive): self
  2978.     {
  2979.         $this->isPartialPaymentActive $isPartialPaymentActive;
  2980.         return $this;
  2981.     }
  2982.     public function getInstallmentAmount(): ?int
  2983.     {
  2984.         return $this->installmentAmount;
  2985.     }
  2986.     public function setInstallmentAmount(int $installmentAmount): self
  2987.     {
  2988.         $this->installmentAmount $installmentAmount;
  2989.         return $this;
  2990.     }
  2991.     public function getCountry(): ?Country
  2992.     {
  2993.         return $this->country;
  2994.     }
  2995.     public function setCountry(?Country $country): self
  2996.     {
  2997.         $this->country $country;
  2998.         return $this;
  2999.     }
  3000.     public function getPaymentType(): ?PaymentType
  3001.     {
  3002.         return $this->paymentType;
  3003.     }
  3004.     public function setPaymentType(?PaymentType $paymentType): self
  3005.     {
  3006.         $this->paymentType $paymentType;
  3007.         return $this;
  3008.     }
  3009.     public function getExtendedPaymentTime(): ?int
  3010.     {
  3011.         return $this->extendedPaymentTime;
  3012.     }
  3013.     public function setExtendedPaymentTime(int $extendedPaymentTime): self
  3014.     {
  3015.         $this->extendedPaymentTime $extendedPaymentTime;
  3016.         return $this;
  3017.     }
  3018.     public function getProductSubscriptionType(): ?ProductSubscriptionType
  3019.     {
  3020.         return $this->productSubscriptionType;
  3021.     }
  3022.     public function setProductSubscriptionType(?ProductSubscriptionType $productSubscriptionType): self
  3023.     {
  3024.         $this->productSubscriptionType $productSubscriptionType;
  3025.         return $this;
  3026.     }
  3027.     /**
  3028.      * @return Collection|ProductVariantMultiDiscount[]
  3029.      */
  3030.     public function getMultiDiscount(): Collection
  3031.     {
  3032.         return $this->multiDiscount;
  3033.     }
  3034.     public function addMultiDiscount(ProductVariantMultiDiscount $multiDiscount): self
  3035.     {
  3036.         if (!$this->multiDiscount->contains($multiDiscount)) {
  3037.             $this->multiDiscount[] = $multiDiscount;
  3038.             $multiDiscount->setProductVariant($this);
  3039.         }
  3040.         return $this;
  3041.     }
  3042.     public function removeMultiDiscount(ProductVariantMultiDiscount $multiDiscount): self
  3043.     {
  3044.         if ($this->multiDiscount->contains($multiDiscount)) {
  3045.             $this->multiDiscount->removeElement($multiDiscount);
  3046.             // set the owning side to null (unless already changed)
  3047.             if ($multiDiscount->getProductVariant() === $this) {
  3048.                 $multiDiscount->setProductVariant(null);
  3049.             }
  3050.         }
  3051.         return $this;
  3052.     }
  3053.     public function getDefaultProductAssociation(): ?bool
  3054.     {
  3055.         return $this->defaultProductAssociation;
  3056.     }
  3057.     public function setDefaultProductAssociation(bool $defaultProductAssociation): self
  3058.     {
  3059.         $this->defaultProductAssociation $defaultProductAssociation;
  3060.         return $this;
  3061.     }
  3062.     public function getIsUniqskillsProduct()
  3063.     {
  3064.         if ($this->getCourses()->isEmpty())
  3065.             return false;
  3066.         return true;
  3067.     }
  3068.     public function getCourseSubscriptions()
  3069.     {
  3070.         if ($this->getIsUniqskillsProduct() and !$this->getIsVirtual())
  3071.         {
  3072.             $country $this->getCountry();
  3073.             $product $this->getMasterProduct();
  3074.             $productVariants $product->getProductVariant()->toArray();
  3075.             return array_filter($productVariants, function($variant) use ($country) {
  3076.                 /** @var $variant ProductVariant */
  3077.                 return (
  3078.                     $variant->getCountry() === $country
  3079.                     && $variant->isActive()
  3080.                     && !$variant->getIsHidden()
  3081.                 );
  3082.             });
  3083.         }
  3084.         return [];
  3085.     }
  3086.     public function getSummaryUpsellingInfo(): ?string
  3087.     {
  3088.         return $this->summaryUpsellingInfo;
  3089.     }
  3090.     public function setSummaryUpsellingInfo(?string $summaryUpsellingInfo): self
  3091.     {
  3092.         $this->summaryUpsellingInfo $summaryUpsellingInfo;
  3093.         return $this;
  3094.     }
  3095.     public function getProductAssociation(): Collection
  3096.     {
  3097.         return $this->productAssociation;
  3098.     }
  3099.     public function getSingleProductAssociation()
  3100.     {
  3101.         if (!empty($this->productAssociation))
  3102.         {
  3103.             return $this->productAssociation->first();
  3104.         }
  3105.         return $this->getMasterProduct()->getProductAssociation()->first();
  3106.     }
  3107.     public function addProductAssociation(?ProductAssociation $productAssociation): self
  3108.     {
  3109.         if (!$this->productAssociation->contains($productAssociation)) {
  3110.             $this->productAssociation[] = $productAssociation;
  3111.         }
  3112.         return $this;
  3113.     }
  3114.     public function removeProductAssociation(?ProductAssociation $productAssociation): self
  3115.     {
  3116.         if($this->productAssociation->contains($productAssociation)) {
  3117.             $this->productAssociation->removeElement($productAssociation);
  3118.         }
  3119.         return $this;
  3120.     }
  3121.     /**
  3122.      * @return Collection|PaymentSystem[]
  3123.      */
  3124.     public function getPaymentSystem(): Collection
  3125.     {
  3126.         return $this->paymentSystem;
  3127.     }
  3128.     public function addPaymentSystem(PaymentSystem $paymentSystem): self
  3129.     {
  3130.         if (!$this->paymentSystem->contains($paymentSystem)) {
  3131.             $this->paymentSystem[] = $paymentSystem;
  3132.         }
  3133.         return $this;
  3134.     }
  3135.     public function removePaymentSystem(PaymentSystem $paymentSystem): self
  3136.     {
  3137.         if ($this->paymentSystem->contains($paymentSystem)) {
  3138.             $this->paymentSystem->removeElement($paymentSystem);
  3139.         }
  3140.         return $this;
  3141.     }
  3142.     public function getAltTradeName(): ?string
  3143.     {
  3144.         return $this->altTradeName;
  3145.     }
  3146.     public function setAltTradeName(?string $altTradeName): self
  3147.     {
  3148.         $this->altTradeName $altTradeName;
  3149.         return $this;
  3150.     }
  3151.     public function getSubscriptionCartDescription(): ?string
  3152.     {
  3153.         return $this->getAltTradeName() ?? $this->getTradeName();
  3154.     }
  3155.     /**
  3156.      * @return Collection|ProductVariantPack[]
  3157.      */
  3158.     public function getProductVariantPacks(): Collection
  3159.     {
  3160.         return $this->productVariantPacks;
  3161.     }
  3162.     public function addProductVariantPack(ProductVariantPack $productVariantPack): self
  3163.     {
  3164.         if (!$this->productVariantPacks->contains($productVariantPack)) {
  3165.             $this->productVariantPacks[] = $productVariantPack;
  3166.             $productVariantPack->addProductVariant($this);
  3167.         }
  3168.         return $this;
  3169.     }
  3170.     public function removeProductVariantPack(ProductVariantPack $productVariantPack): self
  3171.     {
  3172.         if ($this->productVariantPacks->contains($productVariantPack)) {
  3173.             $this->productVariantPacks->removeElement($productVariantPack);
  3174.             $productVariantPack->removeProductVariant($this);
  3175.         }
  3176.         return $this;
  3177.     }
  3178.     public function getTrialDuration(): ?int
  3179.     {
  3180.         return $this->trialDuration;
  3181.     }
  3182.     public function setTrialDuration(?int $trialDuration): self
  3183.     {
  3184.         $this->trialDuration $trialDuration;
  3185.         return $this;
  3186.     }
  3187.     /**
  3188.      * @return Collection|Course[]
  3189.      */
  3190.     public function getCourses(): Collection
  3191.     {
  3192.         return $this->courses;
  3193.     }
  3194.     public function addCourse(Course $course): self
  3195.     {
  3196.         if (!$this->courses->contains($course)) {
  3197.             $this->courses[] = $course;
  3198.         }
  3199.         return $this;
  3200.     }
  3201.     public function removeCourse(Course $course): self
  3202.     {
  3203.         if ($this->courses->contains($course)) {
  3204.             $this->courses->removeElement($course);
  3205.         }
  3206.         return $this;
  3207.     }
  3208.     /**
  3209.      * @return Collection|Package[]
  3210.      */
  3211.     public function getPackages(): Collection
  3212.     {
  3213.         return $this->packages;
  3214.     }
  3215.     public function addPackage(Package $package): self
  3216.     {
  3217.         if (!$this->packages->contains($package)) {
  3218.             $this->packages[] = $package;
  3219.         }
  3220.         return $this;
  3221.     }
  3222.     public function removePackage(Package $package): self
  3223.     {
  3224.         if ($this->packages->contains($package)) {
  3225.             $this->packages->removeElement($package);
  3226.         }
  3227.         return $this;
  3228.     }
  3229.     /**
  3230.      * @return Collection|\App\Entity\Gos\File[]
  3231.      */
  3232.     public function getFiles(): Collection
  3233.     {
  3234.         return $this->files;
  3235.     }
  3236.     public function addFile(\App\Entity\Gos\File $file): self
  3237.     {
  3238.         if (!$this->files->contains($file)) {
  3239.             $this->files[] = $file;
  3240.         }
  3241.         return $this;
  3242.     }
  3243.     public function removeFile(\App\Entity\Gos\File $file): self
  3244.     {
  3245.         if ($this->files->contains($file)) {
  3246.             $this->files->removeElement($file);
  3247.         }
  3248.         return $this;
  3249.     }
  3250.     public function getRequiredPWZ(): ?bool
  3251.     {
  3252.         return $this->requiredPWZ;
  3253.     }
  3254.     public function setRequiredPWZ(bool $requiredPWZ): self
  3255.     {
  3256.         $this->requiredPWZ $requiredPWZ;
  3257.         return $this;
  3258.     }
  3259.     public function getPromoName(): ?string
  3260.     {
  3261.         return $this->promoName;
  3262.     }
  3263.     public function setPromoName(?string $promoName): self
  3264.     {
  3265.         if (strpos($promoName'Dostęp do platformy z treƛciami szkoleniowymi:') !== false)
  3266.             $promoName str_replace("Dostęp do platformy z treƛciami szkoleniowymi:"""$promoName);
  3267.         elseif(strpos($promoName'Dostęp do platformy z treƛciami szkoleniowymi.') !== false)
  3268.             $promoName str_replace("Dostęp do platformy z treƛciami szkoleniowymi."""$promoName);
  3269.         elseif(strpos($promoName'Dostęp do platformy z treƛciami szkoleniowymi') !== false)
  3270.             $promoName str_replace("Dostęp do platformy z treƛciami szkoleniowymi."""$promoName);
  3271.         elseif(strpos($promoName'Acceso al curso certificado:') !== false)
  3272.             $promoName str_replace("Acceso al curso certificado:"""$promoName);
  3273.         elseif(strpos($promoName'Acceso al curso certificado.') !== false)
  3274.             $promoName str_replace("Acceso al curso certificado."""$promoName);
  3275.         elseif(strpos($promoName'Acceso al curso certificado') !== false)
  3276.             $promoName str_replace("Acceso al curso certificado"""$promoName);
  3277.         $promoName trim($promoName);
  3278.         $this->promoName $promoName;
  3279.         return $this;
  3280.     }
  3281.     public function getIsDigital(): ?bool
  3282.     {
  3283.         return $this->isDigital;
  3284.     }
  3285.     public function setIsDigital(?bool $isDigital): self
  3286.     {
  3287.         $this->isDigital $isDigital;
  3288.         return $this;
  3289.     }
  3290.     public function getBlockAccess(): ?bool
  3291.     {
  3292.         return $this->blockAccess;
  3293.     }
  3294.     public function setBlockAccess(?bool $blockAccess): self
  3295.     {
  3296.         $this->blockAccess $blockAccess;
  3297.         return $this;
  3298.     }
  3299.     public function getMantisUserId(): ?int
  3300.     {
  3301.         return $this->mantisUserId;
  3302.     }
  3303.     public function setMantisUserId(?int $mantisUserId): self
  3304.     {
  3305.         $this->mantisUserId $mantisUserId;
  3306.         return $this;
  3307.     }
  3308.     public function getGoogleMerchantFeed(): ?GoogleMerchantFeed
  3309.     {
  3310.         return $this->googleMerchantFeed;
  3311.     }
  3312.     public function setGoogleMerchantFeed(?GoogleMerchantFeed $googleMerchantFeed): self
  3313.     {
  3314.         $this->googleMerchantFeed $googleMerchantFeed;
  3315.         return $this;
  3316.     }
  3317.     public function getProductVariantEuVat(): ?ProductVariant
  3318.     {
  3319.         return $this->productVariantEuVat;
  3320.     }
  3321.     public function setProductVariantEuVat(?ProductVariant $productVariantEuVat): self
  3322.     {
  3323.         $this->productVariantEuVat $productVariantEuVat;
  3324.         return $this;
  3325.     }
  3326.     public function getOriginalProductVariant(): ?ProductVariant
  3327.     {
  3328.         return $this->originalProductVariant;
  3329.     }
  3330.     public function setOriginalProductVariant(?ProductVariant $originalProductVariant): self
  3331.     {
  3332.         $this->originalProductVariant $originalProductVariant;
  3333.         return $this;
  3334.     }
  3335.     public function isSalesVariantBasedTrial(): bool
  3336.     {
  3337.         return $this->salesVariantBasedTrialDuration !== null && $this->salesVariantBasedTrialDuration 0;
  3338.     }
  3339.     public function getSalesVariantBasedTrialDuration(): ?int
  3340.     {
  3341.         return $this->salesVariantBasedTrialDuration;
  3342.     }
  3343.     public function setSalesVariantBasedTrialDuration(?int $salesVariantBasedTrialDuration): self
  3344.     {
  3345.         $this->salesVariantBasedTrialDuration $salesVariantBasedTrialDuration;
  3346.         return $this;
  3347.     }
  3348.     public function getSalesVariantBasedTrialInfo(): ?string
  3349.     {
  3350.         return $this->salesVariantBasedTrialInfo;
  3351.     }
  3352.     public function setSalesVariantBasedTrialInfo(?string $salesVariantBasedTrialInfo): self
  3353.     {
  3354.         $this->salesVariantBasedTrialInfo $salesVariantBasedTrialInfo;
  3355.         return $this;
  3356.     }
  3357.     public function getAccessForPaidOnly(): ?bool
  3358.     {
  3359.         return $this->accessForPaidOnly;
  3360.     }
  3361.     public function setAccessForPaidOnly(?bool $accessForPaidOnly): self
  3362.     {
  3363.         $this->accessForPaidOnly $accessForPaidOnly;
  3364.         return $this;
  3365.     }
  3366.     public function getAdditionalTextInCart(): ?string
  3367.     {
  3368.         return $this->additionalTextInCart;
  3369.     }
  3370.     public function setAdditionalTextInCart(?string $additionalTextInCart): self
  3371.     {
  3372.         $this->additionalTextInCart $additionalTextInCart;
  3373.         return $this;
  3374.     }
  3375.     public function getIsRecurringSubscription(): ?bool
  3376.     {
  3377.         return $this->isRecurringSubscription;
  3378.     }
  3379.     public function setIsRecurringSubscription(?bool $isRecurringSubscription): self
  3380.     {
  3381.         $this->isRecurringSubscription $isRecurringSubscription;
  3382.         return $this;
  3383.     }
  3384.     public function getDocumentDistributionChannel(): ?string
  3385.     {
  3386.         return $this->documentDistributionChannel;
  3387.     }
  3388.     public function setDocumentDistributionChannel(?string $documentDistributionChannel): self
  3389.     {
  3390.         $this->documentDistributionChannel $documentDistributionChannel;
  3391.         return $this;
  3392.     }
  3393.     public function getHiddenInSBTillPaid(): ?bool
  3394.     {
  3395.         return $this->hiddenInSBTillPaid;
  3396.     }
  3397.     public function setHiddenInSBTillPaid(?bool $hiddenInSBTillPaid): self
  3398.     {
  3399.         $this->hiddenInSBTillPaid $hiddenInSBTillPaid;
  3400.         return $this;
  3401.     }
  3402.     public function getParticipantsAddress(): ?bool
  3403.     {
  3404.         return $this->participantsAddress;
  3405.     }
  3406.     public function setParticipantsAddress(?bool $participantsAddress): self
  3407.     {
  3408.         $this->participantsAddress $participantsAddress;
  3409.         return $this;
  3410.     }
  3411.     public function getParticipantsAnnouncement(): ?string
  3412.     {
  3413.         return $this->participantsAnnouncement;
  3414.     }
  3415.     public function setParticipantsAnnouncement(?string $participantsAnnouncement): self
  3416.     {
  3417.         $this->participantsAnnouncement $participantsAnnouncement;
  3418.         return $this;
  3419.     }
  3420.     /**
  3421.      * Add exclusiveVariant
  3422.      *
  3423.      * @param \App\Entity\Gos\ProductVariant $exclusiveVariant
  3424.      *
  3425.      * @return ProductVariant
  3426.      */
  3427.     public function addExclusiveVariant(\App\Entity\Gos\ProductVariant $exclusiveVariant)
  3428.     {
  3429.         $exclusiveVariant->addNormalVariant($this);
  3430.         $this->exclusiveVariant[] = $exclusiveVariant;
  3431.         return $this;
  3432.     }
  3433.     /**
  3434.      * Remove exclusiveVariant
  3435.      *
  3436.      * @param \App\Entity\Gos\ProductVariant $exclusiveVariant
  3437.      */
  3438.     public function removeExclusiveVariant(\App\Entity\Gos\ProductVariant $exclusiveVariant)
  3439.     {
  3440.         $exclusiveVariant->removeNormalVariant($this);
  3441.         $this->exclusiveVariant->removeElement($exclusiveVariant);
  3442.     }
  3443.     /**
  3444.      * Get exclusiveVariant
  3445.      *
  3446.      * @return \Doctrine\Common\Collections\Collection
  3447.      */
  3448.     public function getExclusiveVariant()
  3449.     {
  3450.         return $this->exclusiveVariant;
  3451.     }
  3452.     /**
  3453.      * Add normalVariant
  3454.      *
  3455.      * @param \App\Entity\Gos\ProductVariant $normalVariant
  3456.      *
  3457.      * @return ProductVariant
  3458.      */
  3459.     public function addNormalVariant(\App\Entity\Gos\ProductVariant $normalVariant)
  3460.     {
  3461.         $this->normalVariant[] = $normalVariant;
  3462.         return $this;
  3463.     }
  3464.     /**
  3465.      * Remove normalVariant
  3466.      *
  3467.      * @param \App\Entity\Gos\ProductVariant $normalVariant
  3468.      */
  3469.     public function removeNormalVariant(\App\Entity\Gos\ProductVariant $normalVariant)
  3470.     {
  3471.         $this->normalVariant->removeElement($normalVariant);
  3472.     }
  3473.     /**
  3474.      * Get normalVariant
  3475.      *
  3476.      * @return \Doctrine\Common\Collections\Collection
  3477.      */
  3478.     public function getNormalVariant()
  3479.     {
  3480.         return $this->normalVariant;
  3481.     }
  3482.     /**
  3483.      * Add additionalCartVariant
  3484.      *
  3485.      * @param ProductVariant $additionalCartVariant
  3486.      *
  3487.      * @return ProductVariant
  3488.      */
  3489.     public function addAdditionalCartVariant(ProductVariant $additionalCartVariant): ProductVariant
  3490.     {
  3491.         $additionalCartVariant->addBasicCartVariant($this);
  3492.         $this->additionalCartVariant[] = $additionalCartVariant;
  3493.         return $this;
  3494.     }
  3495.     /**
  3496.      * Remove additionalCartVariant
  3497.      *
  3498.      * @param ProductVariant $additionalCartVariant
  3499.      */
  3500.     public function removeAdditionalCartVariant(ProductVariant $additionalCartVariant)
  3501.     {
  3502.         $additionalCartVariant->removeBasicCartVariant($this);
  3503.         $this->additionalCartVariant->removeElement($additionalCartVariant);
  3504.     }
  3505.     /**
  3506.      * Get additionalCartVariant
  3507.      *
  3508.      * @return Collection
  3509.      */
  3510.     public function getAdditionalCartVariant(): ?Collection
  3511.     {
  3512.         return $this->additionalCartVariant;
  3513.     }
  3514.     /**
  3515.      * Add basicCartVariant
  3516.      *
  3517.      * @param ProductVariant $basicCartVariant
  3518.      *
  3519.      * @return ProductVariant
  3520.      */
  3521.     public function addBasicCartVariant(ProductVariant $basicCartVariant): ProductVariant
  3522.     {
  3523.         $this->basicCartVariant[] = $basicCartVariant;
  3524.         return $this;
  3525.     }
  3526.     /**
  3527.      * Remove basicCartVariant
  3528.      *
  3529.      * @param ProductVariant $basicCartVariant
  3530.      */
  3531.     public function removeBasicCartVariant(ProductVariant $basicCartVariant)
  3532.     {
  3533.         $this->basicCartVariant->removeElement($basicCartVariant);
  3534.     }
  3535.     /**
  3536.      * Get basicCartVariant
  3537.      *
  3538.      * @return Collection
  3539.      */
  3540.     public function getBasicCartVariant(): ?Collection
  3541.     {
  3542.         return $this->basicCartVariant;
  3543.     }
  3544.     /**
  3545.      * Add additionalCartVariantUpselling
  3546.      *
  3547.      * @param ProductVariant $additionalCartVariantUpselling
  3548.      *
  3549.      * @return ProductVariant
  3550.      */
  3551.     public function addAdditionalCartVariantUpselling(ProductVariant $additionalCartVariantUpselling): ProductVariant
  3552.     {
  3553.         $additionalCartVariantUpselling->addBasicCartVariantUpselling($this);
  3554.         $this->additionalCartVariantUpselling[] = $additionalCartVariantUpselling;
  3555.         return $this;
  3556.     }
  3557.     /**
  3558.      * Remove additionalCartVariantUpselling
  3559.      *
  3560.      * @param ProductVariant $additionalCartVariantUpselling
  3561.      */
  3562.     public function removeAdditionalCartVariantUpselling(ProductVariant $additionalCartVariantUpselling)
  3563.     {
  3564.         $additionalCartVariantUpselling->removeBasicCartVariantUpselling($this);
  3565.         $this->additionalCartVariantUpselling->removeElement($additionalCartVariantUpselling);
  3566.     }
  3567.     /**
  3568.      * Get additionalCartVariantUpselling
  3569.      *
  3570.      * @return Collection
  3571.      */
  3572.     public function getAdditionalCartVariantUpselling(): ?Collection
  3573.     {
  3574.         return $this->additionalCartVariantUpselling;
  3575.     }
  3576.     /**
  3577.      * Add basicCartVariantUpselling
  3578.      *
  3579.      * @param ProductVariant $basicCartVariantUpselling
  3580.      *
  3581.      * @return ProductVariant
  3582.      */
  3583.     public function addBasicCartVariantUpselling(ProductVariant $basicCartVariantUpselling): ProductVariant
  3584.     {
  3585.         $this->basicCartVariantUpselling[] = $basicCartVariantUpselling;
  3586.         return $this;
  3587.     }
  3588.     /**
  3589.      * Remove basicCartVariantUpselling
  3590.      *
  3591.      * @param ProductVariant $basicCartVariantUpselling
  3592.      */
  3593.     public function removeBasicCartVariantUpselling(ProductVariant $basicCartVariantUpselling)
  3594.     {
  3595.         $this->basicCartVariantUpselling->removeElement($basicCartVariantUpselling);
  3596.     }
  3597.     /**
  3598.      * Get basicCartVariantUpselling
  3599.      *
  3600.      * @return Collection
  3601.      */
  3602.     public function getBasicCartVariantUpselling(): ?Collection
  3603.     {
  3604.         return $this->basicCartVariantUpselling;
  3605.     }
  3606.     public function getMustHaveAllExclusiveVariants(): ?bool
  3607.     {
  3608.         return $this->mustHaveAllExclusiveVariants;
  3609.     }
  3610.     public function setMustHaveAllExclusiveVariants(?bool $mustHaveAllExclusiveVariants): self
  3611.     {
  3612.         $this->mustHaveAllExclusiveVariants $mustHaveAllExclusiveVariants;
  3613.         return $this;
  3614.     }
  3615.     public function getEvent(): ?Events
  3616.     {
  3617.         return $this->event;
  3618.     }
  3619.     public function setEvent(?Events $event): self
  3620.     {
  3621.         $this->event $event;
  3622.         return $this;
  3623.     }
  3624.     /**
  3625.      * @return Collection|LeadFormResponse[]
  3626.      */
  3627.     public function getLeadFormResponses(): Collection
  3628.     {
  3629.         return $this->leadFormResponses;
  3630.     }
  3631.     public function addLeadFormResponse(LeadFormResponse $leadFormResponse): self
  3632.     {
  3633.         if (!$this->leadFormResponses->contains($leadFormResponse)) {
  3634.             $this->leadFormResponses[] = $leadFormResponse;
  3635.             $leadFormResponse->setProductVariant($this);
  3636.         }
  3637.         return $this;
  3638.     }
  3639.     public function removeLeadFormResponse(LeadFormResponse $leadFormResponse): self
  3640.     {
  3641.         if ($this->leadFormResponses->contains($leadFormResponse)) {
  3642.             $this->leadFormResponses->removeElement($leadFormResponse);
  3643.             // set the owning side to null (unless already changed)
  3644.             if ($leadFormResponse->getProductVariant() === $this) {
  3645.                 $leadFormResponse->setProductVariant(null);
  3646.             }
  3647.         }
  3648.         return $this;
  3649.     }
  3650.     /**
  3651.      * @return Collection|LeadFormResponse[]
  3652.      */
  3653.     public function getLeadFormResponseValidations(): Collection
  3654.     {
  3655.         return $this->leadFormResponseValidations;
  3656.     }
  3657.     public function addLeadFormResponseValidation(LeadFormResponse $leadFormResponseValidation): self
  3658.     {
  3659.         if (!$this->leadFormResponseValidations->contains($leadFormResponseValidation)) {
  3660.             $this->leadFormResponseValidations[] = $leadFormResponseValidation;
  3661.             $leadFormResponseValidation->addProductVariantsValidation($this);
  3662.         }
  3663.         return $this;
  3664.     }
  3665.     public function removeLeadFormResponseValidation(LeadFormResponse $leadFormResponseValidation): self
  3666.     {
  3667.         if ($this->leadFormResponseValidations->contains($leadFormResponseValidation)) {
  3668.             $this->leadFormResponseValidations->removeElement($leadFormResponseValidation);
  3669.             // set the owning side to null (unless already changed)
  3670.             if ($leadFormResponseValidation->getProductVariantsValidation()->contains($this)) {
  3671.                 $leadFormResponseValidation->removeProductVariantsValidation($this);
  3672.             }
  3673.         }
  3674.         return $this;
  3675.     }
  3676.     /**
  3677.      * @return Collection|NewsletterTemplate[]
  3678.      */
  3679.     public function getNewsletterTemplateValidations(): Collection
  3680.     {
  3681.         return $this->newsletterTemplateValidations;
  3682.     }
  3683.     public function addNewsletterTemplateValidation(NewsletterTemplate $newsletterTemplateValidation): self
  3684.     {
  3685.         if (!$this->newsletterTemplateValidations->contains($newsletterTemplateValidation)) {
  3686.             $this->newsletterTemplateValidations[] = $newsletterTemplateValidation;
  3687.             $newsletterTemplateValidation->getProductVariantsValidation()->add($this);
  3688.         }
  3689.         return $this;
  3690.     }
  3691.     public function removeNewsletterTemplateValidation(NewsletterTemplate $newsletterTemplateValidation): self
  3692.     {
  3693.         if ($this->newsletterTemplateValidations->contains($newsletterTemplateValidation)) {
  3694.             $this->newsletterTemplateValidations->removeElement($newsletterTemplateValidation);
  3695.             // set the owning side to null (unless already changed)
  3696.             if ($newsletterTemplateValidation->getProductVariantsValidation()->contains($this)) {
  3697.                 $newsletterTemplateValidation->getProductVariantsValidation()->removeElement($this);
  3698.             }
  3699.         }
  3700.         return $this;
  3701.     }
  3702.     public function getTradeNameSM(): ?string
  3703.     {
  3704.         return $this->TradeNameSM;
  3705.     }
  3706.     public function setTradeNameSM(?string $TradeNameSM): self
  3707.     {
  3708.         $this->TradeNameSM $TradeNameSM;
  3709.         return $this;
  3710.     }
  3711.     public function getCommentForMantis(): ?string
  3712.     {
  3713.         return $this->commentForMantis;
  3714.     }
  3715.     public function setCommentForMantis(?string $commentForMantis): self
  3716.     {
  3717.         $this->commentForMantis $commentForMantis;
  3718.         return $this;
  3719.     }
  3720.     public function isNetflixVariant(): bool
  3721.     {
  3722.         foreach ($this->getPortalSettings() as $portalSetting)
  3723.         {
  3724.             if(!$portalSetting->getIsNetflixPortal()){
  3725.                 return false;
  3726.             }
  3727.         }
  3728.         return true;
  3729.     }
  3730.     /**
  3731.      * @return Collection|CalendarEvent[]
  3732.      */
  3733.     public function getCalendarEvents(): Collection
  3734.     {
  3735.         return $this->calendarEvents;
  3736.     }
  3737.     public function addCalendarEvent(CalendarEvent $calendarEvent): self
  3738.     {
  3739.         if (!$this->calendarEvents->contains($calendarEvent)) {
  3740.             $this->calendarEvents[] = $calendarEvent;
  3741.             $calendarEvent->setProductVariant($this);
  3742.         }
  3743.         return $this;
  3744.     }
  3745.     public function removeCalendarEvent(CalendarEvent $calendarEvent): self
  3746.     {
  3747.         if ($this->calendarEvents->contains($calendarEvent)) {
  3748.             $this->calendarEvents->removeElement($calendarEvent);
  3749.             // set the owning side to null (unless already changed)
  3750.             if ($calendarEvent->getProductVariant() === $this) {
  3751.                 $calendarEvent->setProductVariant(null);
  3752.             }
  3753.         }
  3754.         return $this;
  3755.     }
  3756.     public function getCouponLifetime(): ?int
  3757.     {
  3758.         return $this->couponLifetime;
  3759.     }
  3760.     public function setCouponLifetime(?int $couponLifetime): self
  3761.     {
  3762.         $this->couponLifetime $couponLifetime;
  3763.         return $this;
  3764.     }
  3765.     public function getFreshMailIntegration(): ?bool
  3766.     {
  3767.         return $this->freshMailIntegration;
  3768.     }
  3769.     public function setFreshMailIntegration(?bool $freshMailIntegration): self
  3770.     {
  3771.         $this->freshMailIntegration $freshMailIntegration;
  3772.         return $this;
  3773.     }
  3774.     public function getFreshMailRecipientListHash(): ?string
  3775.     {
  3776.         return $this->freshMailRecipientListHash;
  3777.     }
  3778.     public function setFreshMailRecipientListHash(?string $freshMailRecipientListHash): self
  3779.     {
  3780.         $this->freshMailRecipientListHash $freshMailRecipientListHash;
  3781.         return $this;
  3782.     }
  3783.     public function getOrderOnSiteContent(): ?string
  3784.     {
  3785.         return $this->orderOnSiteContent;
  3786.     }
  3787.     public function setOrderOnSiteContent(?string $orderOnSiteContent): self
  3788.     {
  3789.         $this->orderOnSiteContent $orderOnSiteContent;
  3790.         return $this;
  3791.     }
  3792.     public function getManualUserVerification(): ?bool
  3793.     {
  3794.         return $this->manualUserVerification;
  3795.     }
  3796.     public function setManualUserVerification(bool $manualUserVerification): self
  3797.     {
  3798.         $this->manualUserVerification $manualUserVerification;
  3799.         return $this;
  3800.     }
  3801.     public function getProductVariantOrderQuantity(): ?ProductVariantOrderQuantity
  3802.     {
  3803.         return $this->productVariantOrderQuantity;
  3804.     }
  3805.     public function setProductVariantOrderQuantity(ProductVariantOrderQuantity $productVariantOrderQuantity): self
  3806.     {
  3807.         $this->productVariantOrderQuantity $productVariantOrderQuantity;
  3808.         // set the owning side of the relation if necessary
  3809.         if ($productVariantOrderQuantity->getProductVariant() !== $this) {
  3810.             $productVariantOrderQuantity->setProductVariant($this);
  3811.         }
  3812.         return $this;
  3813.     }
  3814.     public function getProductVariantVirtualCurrencySettings(): ?ProductVariantVirtualCurrencySettings
  3815.     {
  3816.         return $this->productVariantVirtualCurrencySettings;
  3817.     }
  3818.     public function setProductVariantVirtualCurrencySettings(ProductVariantVirtualCurrencySettings $productVariantVirtualCurrencySettings): self
  3819.     {
  3820.         $this->productVariantVirtualCurrencySettings $productVariantVirtualCurrencySettings;
  3821.         // set the owning side of the relation if necessary
  3822.         if ($productVariantVirtualCurrencySettings->getProductVariant() !== $this) {
  3823.             $productVariantVirtualCurrencySettings->setProductVariant($this);
  3824.         }
  3825.         return $this;
  3826.     }
  3827.     /**
  3828.      * @return Collection|PaymentReminders[]
  3829.      */
  3830.     public function getPaymentReminders(): Collection
  3831.     {
  3832.         return $this->paymentReminders;
  3833.     }
  3834.     public function addPaymentReminder(PaymentReminders $paymentReminder): self
  3835.     {
  3836.         if (!$this->paymentReminders->contains($paymentReminder)) {
  3837.             $this->paymentReminders[] = $paymentReminder;
  3838.             $paymentReminder->addProductVariant($this);
  3839.         }
  3840.         return $this;
  3841.     }
  3842.     public function removePaymentReminder(PaymentReminders $paymentReminder): self
  3843.     {
  3844.         if ($this->paymentReminders->contains($paymentReminder)) {
  3845.             $this->paymentReminders->removeElement($paymentReminder);
  3846.             $paymentReminder->removeProductVariant($this);
  3847.         }
  3848.         return $this;
  3849.     }
  3850.     /**
  3851.      * @return Collection|ProductVariantUpselling[]
  3852.      */
  3853.     public function getProductVariantUpsellings(): Collection
  3854.     {
  3855.         return $this->productVariantUpsellings;
  3856.     }
  3857.     public function addProductVariantUpselling(ProductVariantUpselling $productVariantUpselling): self
  3858.     {
  3859.         if (!$this->productVariantUpsellings->contains($productVariantUpselling)) {
  3860.             $this->productVariantUpsellings[] = $productVariantUpselling;
  3861.             $productVariantUpselling->setProductVariant($this);
  3862.         }
  3863.         return $this;
  3864.     }
  3865.     public function removeProductVariantUpselling(ProductVariantUpselling $productVariantUpselling): self
  3866.     {
  3867.         if ($this->productVariantUpsellings->contains($productVariantUpselling)) {
  3868.             $this->productVariantUpsellings->removeElement($productVariantUpselling);
  3869.             // set the owning side to null (unless already changed)
  3870.             if ($productVariantUpselling->getProductVariant() === $this) {
  3871.                 $productVariantUpselling->setProductVariant(null);
  3872.             }
  3873.         }
  3874.         return $this;
  3875.     }
  3876.     /**
  3877.      * @return Collection|ProductVariantUpselling[]
  3878.      */
  3879.     public function getProductVariantPromoted(): Collection
  3880.     {
  3881.         return $this->productVariantPromoted;
  3882.     }
  3883.     public function addProductVariantPromoted(ProductVariantUpselling $productVariantUpselling): self
  3884.     {
  3885.         if (!$this->productVariantPromoted->contains($productVariantUpselling)) {
  3886.             $this->productVariantPromoted[] = $productVariantUpselling;
  3887.             $productVariantUpselling->setPromotedProduct($this);
  3888.         }
  3889.         return $this;
  3890.     }
  3891.     public function removeProductVariantPromoted(ProductVariantUpselling $productVariantUpselling): self
  3892.     {
  3893.         $this->productVariantPromoted->removeElement($productVariantUpselling);
  3894.         return $this;
  3895.     }
  3896.     /**
  3897.      * @return Collection|FastLeadTemplate[]
  3898.      */
  3899.     public function getFastLeadTemplates(): Collection
  3900.     {
  3901.         return $this->fastLeadTemplates;
  3902.     }
  3903.     public function addFastLeadTemplate(FastLeadTemplate $fastLeadTemplate): self
  3904.     {
  3905.         if (!$this->fastLeadTemplates->contains($fastLeadTemplate)) {
  3906.             $this->fastLeadTemplates[] = $fastLeadTemplate;
  3907.             $fastLeadTemplate->setProductVariant($this);
  3908.         }
  3909.         return $this;
  3910.     }
  3911.     public function removeFastLeadTemplate(FastLeadTemplate $fastLeadTemplate): self
  3912.     {
  3913.         if ($this->fastLeadTemplates->contains($fastLeadTemplate)) {
  3914.             $this->fastLeadTemplates->removeElement($fastLeadTemplate);
  3915.             // set the owning side to null (unless already changed)
  3916.             if ($fastLeadTemplate->getProductVariant() === $this) {
  3917.                 $fastLeadTemplate->setProductVariant(null);
  3918.             }
  3919.         }
  3920.         return $this;
  3921.     }
  3922.     public function getImageUrlUpselling(): ?string
  3923.     {
  3924.         return $this->imageUrlUpselling;
  3925.     }
  3926.     public function setImageUrlUpselling(?string $imageUrlUpselling): self
  3927.     {
  3928.         $this->imageUrlUpselling $imageUrlUpselling;
  3929.         return $this;
  3930.     }
  3931.     public function getUseUploadedImageUpselling(): ?bool
  3932.     {
  3933.         return $this->useUploadedImageUpselling;
  3934.     }
  3935.     public function setUseUploadedImageUpselling(bool $useUploadedImageUpselling): self
  3936.     {
  3937.         $this->useUploadedImageUpselling $useUploadedImageUpselling;
  3938.         return $this;
  3939.     }
  3940.     public function setImageFileUpselling(?File $imageFileUpselling null)
  3941.     {
  3942.         $this->imageFileUpselling $imageFileUpselling;
  3943.     }
  3944.     public function getImageFileUpselling(): ?File
  3945.     {
  3946.         return $this->imageFileUpselling;
  3947.     }
  3948.     public function setUploadedImageUpselling(?string $uploadedImageUpselling)
  3949.     {
  3950.         $this->uploadedImageUpselling $uploadedImageUpselling;
  3951.     }
  3952.     public function getUploadedImageUpselling()
  3953.     {
  3954.         return $this->uploadedImageUpselling;
  3955.     }
  3956.     public function getDescriptionUpselling(): ?string
  3957.     {
  3958.         return $this->descriptionUpselling;
  3959.     }
  3960.     public function setDescriptionUpselling(?string $descriptionUpselling): self
  3961.     {
  3962.         $this->descriptionUpselling $descriptionUpselling;
  3963.         return $this;
  3964.     }
  3965.     public function getLinkToProductUpselling()
  3966.     {
  3967.         return $this->linkToProductUpselling;
  3968.     }
  3969.     public function setLinkToProductUpselling($linkToProductUpselling): self
  3970.     {
  3971.         $this->linkToProductUpselling $linkToProductUpselling;
  3972.         return $this;
  3973.     }
  3974.     public function getCertificates(): Collection
  3975.     {
  3976.         return $this->certificates;
  3977.     }
  3978.     public function addCertificate(Certificate $certificate): self
  3979.     {
  3980.         if (!$this->certificates->contains($certificate)) {
  3981.             $this->certificates[] = $certificate;
  3982.             $certificate->getProductVariants()->add($this);
  3983.         }
  3984.         return $this;
  3985.     }
  3986.     public function removeCertificate(Certificate $certificate): self
  3987.     {
  3988.         if ($this->certificates->contains($certificate)) {
  3989.             $this->certificates->removeElement($certificate);
  3990.             if ($certificate->getProductVariants()->contains($this)) {
  3991.                 $certificate->getProductVariants()->removeElement($this);
  3992.             }
  3993.         }
  3994.         return $this;
  3995.     }
  3996.     public function getShowButtonAdditionalAddress(): ?bool
  3997.     {
  3998.         return $this->showButtonAdditionalAddress;
  3999.     }
  4000.     public function setShowButtonAdditionalAddress(?bool $showButtonAdditionalAddress): self
  4001.     {
  4002.         $this->showButtonAdditionalAddress $showButtonAdditionalAddress;
  4003.         return $this;
  4004.     }
  4005.     /**
  4006.      * @return Collection|Omnibus[]
  4007.      */
  4008.     public function getOmnibus(): Collection
  4009.     {
  4010.         return $this->omnibus;
  4011.     }
  4012.     /**
  4013.      * @return bool
  4014.      */
  4015.     public function getIsAccessWithoutPayment(): ?bool
  4016.     {
  4017.         return $this->isAccessWithoutPayment;
  4018.     }
  4019.     /**
  4020.      * @param bool $isAccessWithoutPayment
  4021.      */
  4022.     public function setIsAccessWithoutPayment(?bool $isAccessWithoutPayment): void
  4023.     {
  4024.         $this->isAccessWithoutPayment $isAccessWithoutPayment;
  4025.     }
  4026.     public function getMaxQuantityInCart(): ?int
  4027.     {
  4028.         return $this->maxQuantityInCart;
  4029.     }
  4030.     public function setMaxQuantityInCart(?int $maxQuantityInCart): self
  4031.     {
  4032.         $this->maxQuantityInCart $maxQuantityInCart;
  4033.         return $this;
  4034.     }
  4035.     /**
  4036.      * @return Collection|ShippingType[]
  4037.      */
  4038.     public function getShippingTypes(): Collection
  4039.     {
  4040.         return $this->shippingTypes;
  4041.     }
  4042.     public function addShippingType(ShippingType $shippingType): self
  4043.     {
  4044.         if (!$this->shippingTypes->contains($shippingType)) {
  4045.             $this->shippingTypes[] = $shippingType;
  4046.         }
  4047.         return $this;
  4048.     }
  4049.     public function removeShippingType(ShippingType $shippingType): self
  4050.     {
  4051.         if ($this->shippingTypes->contains($shippingType)) {
  4052.             $this->shippingTypes->removeElement($shippingType);
  4053.         }
  4054.         return $this;
  4055.     }
  4056.     public function getSize(): ?ProductVariantSize
  4057.     {
  4058.         return $this->size;
  4059.     }
  4060.     public function setSize(?ProductVariantSize $size): self
  4061.     {
  4062.         $this->size $size;
  4063.         return $this;
  4064.     }
  4065.     public function getExcludeDefaultShippingType(): ?bool
  4066.     {
  4067.         return $this->excludeDefaultShippingType;
  4068.     }
  4069.     public function setExcludeDefaultShippingType(bool $excludeDefaultShippingType): self
  4070.     {
  4071.         $this->excludeDefaultShippingType $excludeDefaultShippingType;
  4072.         return $this;
  4073.     }
  4074.     public function isShippingVariant(): bool
  4075.     {
  4076.         return
  4077.             !$this->getIsCompletelyDigital() &&
  4078.             !$this->getIsVirtual() &&
  4079.             !$this->isEvent() &&
  4080.             !$this->getIsUniqskillsProduct();
  4081.     }
  4082.     public function getIsCompletelyDigital(): ?bool
  4083.     {
  4084.         return $this->isCompletelyDigital;
  4085.     }
  4086.     public function setIsCompletelyDigital(bool $isCompletelyDigital): self
  4087.     {
  4088.         $this->isCompletelyDigital $isCompletelyDigital;
  4089.         return $this;
  4090.     }
  4091.     /**
  4092.      * @return Collection|CertificatePathElement[]
  4093.      */
  4094.     public function getCertificatePathElements(): Collection
  4095.     {
  4096.         return $this->certificatePathElements;
  4097.     }
  4098.     public function addCertificatePathElement(CertificatePathElement $certificatePathElement): self
  4099.     {
  4100.         if (!$this->certificatePathElements->contains($certificatePathElement)) {
  4101.             $this->certificatePathElements[] = $certificatePathElement;
  4102.             $certificatePathElement->addProductVariant($this);
  4103.         }
  4104.         return $this;
  4105.     }
  4106.     public function removeCertificatePathElement(CertificatePathElement $certificatePathElement): self
  4107.     {
  4108.         if ($this->certificatePathElements->contains($certificatePathElement)) {
  4109.             $this->certificatePathElements->removeElement($certificatePathElement);
  4110.             $certificatePathElement->removeProductVariant($this);
  4111.         }
  4112.         return $this;
  4113.     }
  4114.     public function hasPaperRelease(): ?bool
  4115.     {
  4116.         return $this->hasPaperRelease;
  4117.     }
  4118.     public function setHasPaperRelease(?bool $hasPaperRelease): self
  4119.     {
  4120.         $this->hasPaperRelease $hasPaperRelease;
  4121.         return $this;
  4122.     }
  4123.     public function getIsNPWZRequired(): ?bool
  4124.     {
  4125.         return $this->isNPWZRequired !== false;
  4126.     }
  4127.     public function setIsNPWZRequired(?bool $isNPWZRequired): self
  4128.     {
  4129.         $this->isNPWZRequired $isNPWZRequired;
  4130.         return $this;
  4131.     }
  4132.     public function isSaleDisabled(): ?bool
  4133.     {
  4134.         return $this->isSaleDisabled;
  4135.     }
  4136.     public function setIsSaleDisabled(bool $isSaleDisabled): self
  4137.     {
  4138.         $this->isSaleDisabled $isSaleDisabled;
  4139.         return $this;
  4140.     }
  4141.     public function getTechnicalInformationForMailTele(): ?string
  4142.     {
  4143.         return $this->technicalInformationForMailTele;
  4144.     }
  4145.     public function setTechnicalInformationForMailTele(?string $technicalInformationForMailTele): self
  4146.     {
  4147.         $this->technicalInformationForMailTele $technicalInformationForMailTele;
  4148.         return $this;
  4149.     }
  4150.     /**
  4151.      * @return Collection|AdditionalFile[]
  4152.      */
  4153.     public function getAdditionalFiles(): Collection
  4154.     {
  4155.         return $this->additionalFiles;
  4156.     }
  4157.     public function addAdditionalFile(AdditionalFile $additionalFile): self
  4158.     {
  4159.         if (!$this->additionalFiles->contains($additionalFile)) {
  4160.             $this->additionalFiles[] = $additionalFile;
  4161.             $additionalFile->setProductVariant($this);
  4162.         }
  4163.         return $this;
  4164.     }
  4165.     public function removeAdditionalFile(AdditionalFile $additionalFile): self
  4166.     {
  4167.         if ($this->additionalFiles->contains($additionalFile)) {
  4168.             $this->additionalFiles->removeElement($additionalFile);
  4169.             // set the owning side to null (unless already changed)
  4170.             if ($additionalFile->getProductVariant() === $this) {
  4171.                 $additionalFile->setProductVariant(null);
  4172.             }
  4173.         }
  4174.         return $this;
  4175.     }
  4176.     public function addSalesManagoCatalog(SalesManagoCatalog $salesManagoCatalog): self
  4177.     {
  4178.         if (!$this->salesManagoCatalogs->contains($salesManagoCatalog))
  4179.         {
  4180.             $this->salesManagoCatalogs[] = $salesManagoCatalog;
  4181.         }
  4182.         return $this;
  4183.     }
  4184.     public function removeSalesManagoCatalog(SalesManagoCatalog $salesManagoCatalog): self
  4185.     {
  4186.         if ($this->salesManagoCatalogs->contains($salesManagoCatalog))
  4187.         {
  4188.             $this->salesManagoCatalogs->removeElement($salesManagoCatalog);
  4189.         }
  4190.         return $this;
  4191.     }
  4192.     public function getSalesManagoCatalogs(): Collection
  4193.     {
  4194.         return $this->salesManagoCatalogs;
  4195.     }
  4196.     public function getSalesManagoProductVariant(): ?SalesManagoProductVariant
  4197.     {
  4198.         return $this->salesManagoProductVariant;
  4199.     }
  4200.     public function setSalesManagoProductVariant(SalesManagoProductVariant $salesManagoProductVariant): self
  4201.     {
  4202.         $this->salesManagoProductVariant $salesManagoProductVariant;
  4203.         // set the owning side of the relation if necessary
  4204.         if ($salesManagoProductVariant->getProductVariant() !== $this) {
  4205.             $salesManagoProductVariant->setProductVariant($this);
  4206.         }
  4207.         return $this;
  4208.     }
  4209.     /**
  4210.      * @return Collection|UserFlag[]
  4211.      */
  4212.     public function getUserFlags(): Collection
  4213.     {
  4214.         return $this->userFlags;
  4215.     }
  4216.     public function addUserFlag(UserFlag $userFlag): self
  4217.     {
  4218.         if (!$this->userFlags->contains($userFlag)) {
  4219.             $this->userFlags[] = $userFlag;
  4220.             $userFlag->addProductVariant($this);
  4221.         }
  4222.         return $this;
  4223.     }
  4224.     public function removeUserFlag(UserFlag $userFlag): self
  4225.     {
  4226.         if ($this->userFlags->contains($userFlag)) {
  4227.             $this->userFlags->removeElement($userFlag);
  4228.             $userFlag->removeProductVariant($this);
  4229.         }
  4230.         return $this;
  4231.     }
  4232.     public function getProductVariantReviewLinks(): Collection
  4233.     {
  4234.         return $this->productVariantReviewLinks;
  4235.     }
  4236.     public function addProductVariantReviewLink(ProductVariantReviewLink $productVariantReviewLink): self
  4237.     {
  4238.         if (!$this->productVariantReviewLinks->contains($productVariantReviewLink))
  4239.         {
  4240.             $this->productVariantReviewLinks[] = $productVariantReviewLink;
  4241.             $productVariantReviewLink->setProductVariant($this);
  4242.         }
  4243.         return $this;
  4244.     }
  4245.     public function removeProductVariantReviewLink(ProductVariantReviewLink $productVariantReviewLink): self
  4246.     {
  4247.         if ($this->productVariantReviewLinks->contains($productVariantReviewLink))
  4248.         {
  4249.             $this->productVariantReviewLinks->removeElement($productVariantReviewLink);
  4250.             // set the owning side to null (unless already changed)
  4251.             if ($productVariantReviewLink->getProductVariant() === $this)
  4252.             {
  4253.                 $productVariantReviewLink->setProductVariant(null);
  4254.             }
  4255.         }
  4256.         return $this;
  4257.     }
  4258.     public function getOriginal(): ?self
  4259.     {
  4260.         return $this->original;
  4261.     }
  4262.     public function setOriginal(?self $original): self
  4263.     {
  4264.         $this->original $original;
  4265.         return $this;
  4266.     }
  4267.     /**
  4268.      * @return Collection|self[]
  4269.      */
  4270.     public function getSubstitution(): Collection
  4271.     {
  4272.         return $this->substitution;
  4273.     }
  4274.     public function addSubstitution(self $substitution): self
  4275.     {
  4276.         if (!$this->substitution->contains($substitution)) {
  4277.             $this->substitution[] = $substitution;
  4278.             $substitution->setOriginal($this);
  4279.         }
  4280.         return $this;
  4281.     }
  4282.     public function removeSubstitution(self $substitution): self
  4283.     {
  4284.         if ($this->substitution->contains($substitution)) {
  4285.             $this->substitution->removeElement($substitution);
  4286.             // set the owning side to null (unless already changed)
  4287.             if ($substitution->getOriginal() === $this) {
  4288.                 $substitution->setOriginal(null);
  4289.             }
  4290.         }
  4291.         return $this;
  4292.     }
  4293.     public function isMagazine(): ?bool
  4294.     {
  4295.         if (
  4296.             $this->getMasterProduct()->getProductGosType()
  4297.             && $this->getMasterProduct()->getProductGosType()->getName() === 'czasopismo'
  4298.         )
  4299.         {
  4300.             return true;
  4301.         }
  4302.         if (
  4303.             $this->getMasterProduct()->getProductType()
  4304.             && $this->getMasterProduct()->getProductType()->getProductMainType()
  4305.             && $this->getMasterProduct()->getProductType()->getProductMainType()->getSlug() === 'czasopisma'
  4306.         )
  4307.         {
  4308.             return true;
  4309.         }
  4310.         if (
  4311.             $this->getMasterProduct()->getProductType()
  4312.             && stripos($this->getMasterProduct()->getProductType()->getName(), 'czasopism') !== false
  4313.         )
  4314.         {
  4315.             return true;
  4316.         }
  4317.         return null;
  4318.     }
  4319.     /**
  4320.      * @return Collection|AdditionalOptionsByClientType[]
  4321.      */
  4322.     public function getAdditionalOptionsByClientTypes(): Collection
  4323.     {
  4324.         return $this->additionalOptionsByClientTypes;
  4325.     }
  4326.     public function addAdditionalOptionsByClientType(AdditionalOptionsByClientType $additionalOptionsByClientType): self
  4327.     {
  4328.         if (!$this->additionalOptionsByClientTypes->contains($additionalOptionsByClientType)) {
  4329.             $this->additionalOptionsByClientTypes[] = $additionalOptionsByClientType;
  4330.             $additionalOptionsByClientType->setProductVariant($this);
  4331.         }
  4332.         return $this;
  4333.     }
  4334.     public function removeAdditionalOptionsByClientType(AdditionalOptionsByClientType $additionalOptionsByClientType): self
  4335.     {
  4336.         if ($this->additionalOptionsByClientTypes->contains($additionalOptionsByClientType)) {
  4337.             $this->additionalOptionsByClientTypes->removeElement($additionalOptionsByClientType);
  4338.             // set the owning side to null (unless already changed)
  4339.             if ($additionalOptionsByClientType->getProductVariant() === $this) {
  4340.                 $additionalOptionsByClientType->setProductVariant(null);
  4341.             }
  4342.         }
  4343.         return $this;
  4344.     }
  4345.     public function getAdditionalAccessProductVariant(): ?self
  4346.     {
  4347.         return $this->additionalAccessProductVariant;
  4348.     }
  4349.     public function setAdditionalAccessProductVariant(?self $additionalAccessProductVariant): self
  4350.     {
  4351.         $this->additionalAccessProductVariant $additionalAccessProductVariant;
  4352.         return $this;
  4353.     }
  4354.     public function getGivenProductVariantForAdditionalAccess(): ?self
  4355.     {
  4356.         return $this->givenProductVariantForAdditionalAccess;
  4357.     }
  4358.     public function setGivenProductVariantForAdditionalAccess(?self $givenProductVariantForAdditionalAccess): self
  4359.     {
  4360.         $this->givenProductVariantForAdditionalAccess $givenProductVariantForAdditionalAccess;
  4361.         // set (or unset) the owning side of the relation if necessary
  4362.         $newAdditionalAccessProductVariant null === $givenProductVariantForAdditionalAccess null $this;
  4363.         if ($givenProductVariantForAdditionalAccess->getAdditionalAccessProductVariant() !== $newAdditionalAccessProductVariant) {
  4364.             $givenProductVariantForAdditionalAccess->setAdditionalAccessProductVariant($newAdditionalAccessProductVariant);
  4365.         }
  4366.         return $this;
  4367.     }
  4368.     public function getAdditionalInformationForMail(): ?string
  4369.     {
  4370.         return $this->additionalInformationForMail;
  4371.     }
  4372.     public function setAdditionalInformationForMail(?string $additionalInformationForMail): self
  4373.     {
  4374.         $this->additionalInformationForMail $additionalInformationForMail;
  4375.         return $this;
  4376.     }
  4377.     public function findPortalSettings(): ?PortalSettings
  4378.     {
  4379.         $portalSettings = !$this->getPortalSettings()->isEmpty() ?
  4380.             $this->getPortalSettings()->first() :
  4381.             null;
  4382.         if ($portalSettings === null) {
  4383.             $masterProduct $this->getMasterProduct();
  4384.             /** @var ProductAssociation $productAssociation */
  4385.             foreach ($masterProduct->getProductAssociation() as $productAssociation) {
  4386.                 if ($productAssociation->getPortalSettings() !== null) {
  4387.                     return $productAssociation->getPortalSettings();
  4388.                 }
  4389.             }
  4390.         }
  4391.         return $portalSettings;
  4392.     }
  4393.     public function expandVariantNumberWithFundings(): array
  4394.     {
  4395.         if (!preg_match('#^(\d+)/(.*)$#'$this->getProductVariantNoComplete(), $matches)) {
  4396.             return [$this->getProductVariantNoComplete()];
  4397.         }
  4398.         $numeric $matches[1];
  4399.         $suffix  $matches[2];
  4400.         return [
  4401.             $this->getProductVariantNoComplete(), // bez dofinansowania
  4402.             $numeric '0/' $suffix,            // dofinansowanie 100%
  4403.             $numeric '3/' $suffix,            // dofinansowanie >= 70%
  4404.         ];
  4405.     }
  4406.     public function getDescriptionUpsellingMaxHeight(): ?int
  4407.     {
  4408.         return $this->descriptionUpsellingMaxHeight;
  4409.     }
  4410.     public function setDescriptionUpsellingMaxHeight(?int $descriptionUpsellingMaxHeight): self
  4411.     {
  4412.         $this->descriptionUpsellingMaxHeight $descriptionUpsellingMaxHeight;
  4413.         return $this;
  4414.     }
  4415.     public function isTestProduct(): bool
  4416.     {
  4417.         return $this->getVariantState() === 'Product test';
  4418.     }
  4419.     public function isPriceGrossCalculated(): bool
  4420.     {
  4421.         return $this->isPriceGrossCalculated;
  4422.     }
  4423.     /**
  4424.      * UWAGA! Stawka VAT jest dynamicznie ustawiana na podstawie typu klienta i kraju w ProductVariantPriceListener
  4425.      * @return int
  4426.      */
  4427.     public function getVatRate(): int
  4428.     {
  4429.         return $this->vatRate;
  4430.     }
  4431.     public function getSourceSystem(): ProductSourceSystem
  4432.     {
  4433.         return $this->getMasterProduct()->getSourceSystem();
  4434.     }
  4435. }