src/Entity/Gos/ProductVariant.php line 1134

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