src/Entity/Gos/PortalSettings.php line 25

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos;
  3. use App\Entity\ContactSegmentationableInterface;
  4. use App\Entity\Gos\Tmpl\Template;
  5. use App\Entity\Gos\Uniqskills\Course;
  6. use App\Entity\Gos\Uniqskills\FmCompanySettings;
  7. use App\Entity\Gos\Uniqskills\PromoBox;
  8. use App\Entity\Gos\Uniqskills\Slider;
  9. use App\Entity\Gos\VirtualCurrency\VirtualCurrency;
  10. use App\Enum\PortalHashes;
  11. use Doctrine\Common\Collections\Collection;
  12. use Doctrine\ORM\Mapping as ORM;
  13. use Doctrine\Common\Collections\ArrayCollection;
  14. use JMS\Serializer\Annotation as JMS;
  15. /**
  16.  * portalSettings
  17.  *
  18.  * @ORM\Table()
  19.  * @ORM\Entity(repositoryClass="App\Repository\PortalSettingsRepository")
  20.  * @ORM\HasLifecycleCallbacks
  21.  */
  22. class PortalSettings implements ContactSegmentationableInterface
  23. {
  24.     /**
  25.      * @var int
  26.      *
  27.      * @ORM\Column(name="id", type="integer")
  28.      * @ORM\Id
  29.      * @ORM\GeneratedValue(strategy="AUTO")
  30.      * @JMS\Groups({"PortalSettings"})
  31.      */
  32.     private $id;
  33.     /**
  34.      * @var string
  35.      *
  36.      * @ORM\Column(type="string", length=255)
  37.      * @JMS\Groups({"PortalSettings"})
  38.      *
  39.      *
  40.      */
  41.     private $domain;
  42.     /**
  43.      * @var string
  44.      *
  45.      * @ORM\Column(name="hash", type="string", length=255, unique=true)
  46.      * @JMS\Groups({"PortalSettings"})
  47.      */
  48.     private $hash;
  49.     /**
  50.      * @var string
  51.      *
  52.      * @ORM\Column(type="string", length=255)
  53.      * @JMS\Groups({"PortalSettings"})
  54.      */
  55.     private $title;
  56.     /**
  57.      * @var bool
  58.      *
  59.      * @ORM\Column(type="boolean", nullable=true)
  60.      */
  61.     private $isActive;
  62.     /**
  63.      * @ORM\Column(type="string", length=8)
  64.      * @JMS\Groups({"PortalSettings"})
  65.      */
  66.     private $actionNumber;
  67.     /**
  68.      * @ORM\Column(type="string", length=100)
  69.      * @JMS\Groups({"PortalSettings"})
  70.      */
  71.     private $fromSource;
  72.     /**
  73.      * @ORM\Column(type="text", nullable=true)
  74.      * @JMS\Groups({"PortalSettings"})
  75.      */
  76.     private $portalCss;
  77.     /**
  78.      * @ORM\Column(type="text", nullable=true)
  79.      * @JMS\Groups({"PortalSettings"})
  80.      */
  81.     private $portalHeadScripts;
  82.     /**
  83.      * @ORM\Column(type="text", nullable=true)
  84.      * @JMS\Groups({"PortalSettings"})
  85.      */
  86.     private $portalStartBodyScripts;
  87.     /**
  88.      * @ORM\Column(type="text", nullable=true)
  89.      * @JMS\Groups({"PortalSettings"})
  90.      */
  91.     private $portalBodyScripts;
  92.     /**
  93.      * @ORM\Column(type="text", nullable=true)
  94.      */
  95.     private $robotsTxt;
  96.     /**
  97.      * @ORM\Column(type="string", length=100)
  98.      * @JMS\Groups({"PortalSettings"})
  99.      */
  100.     private $portalNumberSB;
  101.     /**
  102.      * @var string
  103.      *
  104.      * @ORM\Column(type="string", length=7, nullable=true, options={"default":null})
  105.      * @JMS\Groups({"PortalSettings"})
  106.      */
  107.     private $leadingColor1;
  108.     /**
  109.      * @var string
  110.      *
  111.      * @ORM\Column(type="string", length=7, nullable=true, options={"default":null})
  112.      * @JMS\Groups({"PortalSettings"})
  113.      */
  114.     private $leadingColor2;
  115.     /**
  116.      * @var string
  117.      *
  118.      * @ORM\Column(type="string", length=7, nullable=true, options={"default":null})
  119.      * @JMS\Groups({"PortalSettings"})
  120.      */
  121.     private $leadingColor3;
  122.     /**
  123.      * @ORM\Column(type="string", length=255, nullable=true)
  124.      */
  125.     private $logo;
  126.     /**
  127.      * @ORM\ManyToOne(targetEntity="App\Entity\Gos\EmailSettings", inversedBy="portalSettings")
  128.      * @ORM\JoinColumn()
  129.      */
  130.     private $emailSettings;
  131.     /**
  132.      * @ORM\Column(type="string", length=255, nullable=true)
  133.      */
  134.     private $contactMail;
  135.     /**
  136.      * @ORM\Column(type="text", nullable=true)
  137.      * @JMS\Groups({"PortalSettings"})
  138.      */
  139.     private $registrationAdditionalContent;
  140.     /**
  141.      * @ORM\Column(type="text", nullable=true)
  142.      * @JMS\Groups({"PortalSettings"})
  143.      */
  144.     private $loginAdditionalContent;
  145.     /**
  146.      * @ORM\OneToMany(targetEntity="App\Entity\Gos\Orders", mappedBy="portalSettings")
  147.      */
  148.     private $orders;
  149.     /**
  150.      * @ORM\ManyToOne(targetEntity="OrderType", inversedBy="portalSettings")
  151.      * @ORM\JoinColumn(nullable=false)
  152.      */
  153.     private $orderType;
  154.     /**
  155.      * @ORM\ManyToMany(targetEntity="App\Entity\Gos\ProductVariant", inversedBy="portalSettings")
  156.      * @ORM\JoinTable()
  157.      */
  158.     private $productVariant;
  159.     /**
  160.      * @ORM\ManyToMany(targetEntity="App\Entity\Gos\PaymentSystem", inversedBy="portalSettings")
  161.      * @ORM\JoinColumn()
  162.      */
  163.     private $paymentSystem;
  164.     /**
  165.      * @ORM\OneToMany(targetEntity="App\Entity\Gos\EmailTemplate", mappedBy="portalSettings")
  166.      */
  167.     private $emailTemplate;
  168.     /**
  169.      * @ORM\OneToMany(targetEntity="App\Entity\Gos\AccessLevel", mappedBy="portalSettings")
  170.      */
  171.     private $accessLevels;
  172.     /**
  173.      * @ORM\ManyToMany(targetEntity="App\Entity\Gos\Term", mappedBy="portalSettings")
  174.      */
  175.     private $terms;
  176.     /**
  177.      * @ORM\OneToMany(targetEntity="App\Entity\Gos\PasswordFromImport", mappedBy="portalSettings")
  178.      */
  179.     private $passwordFromImport;
  180.     /**
  181.      * @ORM\OneToMany(targetEntity="App\Entity\Gos\OrdersDataTemp", mappedBy="portalSettings")
  182.      */
  183.     private $ordersDataTemp;
  184.     /**
  185.      * @ORM\OneToMany(targetEntity="App\Entity\Gos\StaticPage", mappedBy="portalSettings")
  186.      */
  187.     private $staticPage;
  188.     /**
  189.      * @ORM\Column(type="datetime")
  190.      */
  191.     private $createdAt;
  192.     /**
  193.      * @ORM\Column(type="datetime", nullable=true)
  194.      */
  195.     private $updatedAt;
  196.     /**
  197.      * @ORM\OneToMany(targetEntity="App\Entity\Gos\Tmpl\Template", mappedBy="portalSettings")
  198.      */
  199.     private $templates;
  200.     /**
  201.      * @ORM\OneToMany(targetEntity="App\Entity\Gos\ProductAssociation", mappedBy="portalSettings")
  202.      */
  203.     private $productAssociations;
  204.     /**
  205.      * @ORM\OneToMany(targetEntity="App\Entity\Gos\TouchPoint", mappedBy="portalSettings")
  206.      */
  207.     private $touchPoint;
  208.     /**
  209.      * @ORM\OneToMany(targetEntity="App\Entity\Gos\TouchPointAll", mappedBy="portalSettings")
  210.      */
  211.     private $touchPointAll;
  212.     /**
  213.      * @ORM\OneToMany(targetEntity="App\Entity\Gos\Category", mappedBy="portalSettings")
  214.      */
  215.     private $categories;
  216.     /**
  217.      * @ORM\OneToMany(targetEntity="App\Entity\Gos\Uniqskills\Course", mappedBy="portalSettings")
  218.      */
  219.     private $course;
  220.     /**
  221.      * @ORM\Column(type="boolean", nullable=true)
  222.      */
  223.     private $isUniqskillsPortal;
  224.     /**
  225.      * @ORM\OneToOne(targetEntity="App\Entity\Gos\Uniqskills\FmCompanySettings", mappedBy="portalSettings")
  226.      */
  227.     private $fmCompanySettings;
  228.     /**
  229.      * @ORM\ManyToMany(targetEntity="User", mappedBy="accessToPortalSettings")
  230.      */
  231.     private $accessUser;
  232.     /**
  233.      * @ORM\OneToMany(targetEntity="User", mappedBy="registeredFrom")
  234.      */
  235.     private $registeredUser;
  236.     /**
  237.      * @ORM\OneToMany(targetEntity="App\Entity\Gos\Uniqskills\PromoBox", mappedBy="portalSettings")
  238.      */
  239.     private $promoBox;
  240.     /**
  241.      * @ORM\OneToMany(targetEntity="App\Entity\Gos\Uniqskills\Slider", mappedBy="portalSettings")
  242.      */
  243.     private $slider;
  244.     /**
  245.      * @ORM\OneToMany(targetEntity="App\Entity\Gos\SalesManagoEvent", mappedBy="portalSettings")
  246.      */
  247.     private $salesManagoEvents;
  248.     /**
  249.      * @ORM\ManyToMany(targetEntity="App\Entity\Gos\ProductVariantPack", mappedBy="portalSettings")
  250.      */
  251.     private $productVariantPacks;
  252.     /**
  253.      * @ORM\ManyToMany(targetEntity="UserPosition", mappedBy="portalSettings")
  254.      */
  255.     private $positions;
  256.     /**
  257.      * @ORM\Column(type="boolean", nullable=true)
  258.      */
  259.     private $isNetflixPortal;
  260.     /**
  261.      * @ORM\Column(type="boolean")
  262.      */
  263.     private $isPresale;
  264.     /**
  265.      * @ORM\Column(type="boolean")
  266.      * @JMS\Groups({"PortalSettings"})
  267.      */
  268.     private $isSimplePrice;
  269.     /**
  270.      * @ORM\OneToMany(targetEntity=Newsletter::class, mappedBy="portalSettings")
  271.      */
  272.     private $newsletters;
  273.     /**
  274.      * @ORM\Column(type="string", length=255, nullable=true)
  275.      * @JMS\Groups({"PortalSettings"})
  276.      */
  277.     private $redirectAfterLogin;
  278.     /**
  279.      * @ORM\Column(type="text", nullable=true)
  280.      */
  281.     private $messageAfterLogin;
  282.     /**
  283.      * @ORM\Column(type="integer", nullable=true)
  284.      */
  285.     private $messageTimeAfterLogin;
  286.     /**
  287.      * @ORM\OneToMany(targetEntity=UserFirstLoginInfo::class, mappedBy="portal")
  288.      */
  289.     private $userFirstLoginInfos;
  290.     /**
  291.      * @ORM\Column(type="boolean", nullable=true)
  292.      */
  293.     private $deviceAuthNeeded;
  294.     /**
  295.      * @ORM\Column(type="string", length=255, nullable=true)
  296.      */
  297.     private $sender;
  298.     /**
  299.      * @ORM\Column(type="boolean", nullable=true)
  300.      */
  301.     private $isCmsPortal;
  302.     /**
  303.      * @ORM\ManyToOne(targetEntity=VirtualCurrency::class, inversedBy="portalSettings")
  304.      */
  305.     private $virtualCurrency;
  306.     /**
  307.      * @ORM\Column(type="boolean", nullable=true)
  308.      */
  309.     private $multiAccessFromMaxUser;
  310.     /**
  311.      * @ORM\Column(type="boolean", nullable=true)
  312.      */
  313.     private $enableNewBasket;
  314.     /**
  315.      * @ORM\OneToMany(targetEntity=Cart::class, mappedBy="portalSettings")
  316.      */
  317.     private $carts;
  318.     /**
  319.      * @ORM\Column(type="float", nullable=true)
  320.      * @JMS\Groups({"PortalSettings"})
  321.      */
  322.     private $priceAfterFreePostageCost;
  323.     /**
  324.      * also default price type in new cart
  325.      * @ORM\Column(type="string", length=255, nullable=true)
  326.      */
  327.     private $priceAfterFreePostageCostType;
  328.     /**
  329.      * @ORM\Column(type="string", length=255, nullable=true)
  330.      */
  331.     private $gtm;
  332.     /**
  333.      * @ORM\Column(type="text", nullable=true)
  334.      * @JMS\Groups({"PortalSettings"})
  335.      */
  336.     private $passwordAdditionalContent;
  337.     /**
  338.      * @ORM\Column(type="string", length=7, nullable=true, options={"default":null})
  339.      * @JMS\Groups({"PortalSettings"})
  340.      */
  341.     private $leadingColor4;
  342.     /**
  343.      * @ORM\Column(type="string", length=7, nullable=true, options={"default":null})
  344.      * @JMS\Groups({"PortalSettings"})
  345.      */
  346.     private $userbarColor;
  347.     /**
  348.      * @ORM\Column(type="boolean", options={"default":0})
  349.      */
  350.     private $isBookcaseVisibleInUserbar false;
  351.     /**
  352.      * @ORM\Column(type="boolean", options={"default":0})
  353.      */
  354.     private $isShelfVisibleInUserbar false;
  355.     /**
  356.      * @ORM\Column(type="text", nullable=true)
  357.      */
  358.     private $userbarHtml;
  359.     /**
  360.      * @ORM\Column(type="boolean", options={"default":0})
  361.      */
  362.     private $displayUserbar2 false;
  363.     // TESTS A/B
  364.     /**
  365.      * @ORM\Column(type="float", nullable=true)
  366.      */
  367.     private $testPriceAfterFreePostageCost;
  368.     /**
  369.      * @ORM\Column(type="text", nullable=true)
  370.      */
  371.     private $testUserbarHtml;
  372.     /**
  373.      * @ORM\Column(type="boolean", nullable=true)
  374.      */
  375.     private $lifetimeAccess;
  376.     /**
  377.      * @ORM\Column(type="string", length=20, nullable=true)
  378.      */
  379.     private $fbPixelId;
  380.     /**
  381.      * @ORM\Column(type="string", length=255, nullable=true)
  382.      */
  383.     private $fbPixelAccessToken;
  384.     /**
  385.      * @ORM\Column(type="boolean", nullable=true)
  386.      * @JMS\Groups({"PortalSettings"})
  387.      */
  388.     private $hideFieldPosition;
  389.     /**
  390.      * @ORM\Column(type="boolean", options={"default":0})
  391.      * @JMS\Groups({"PortalSettings"})
  392.      */
  393.     private $redirectingToFocus false;
  394.     /**
  395.      * @ORM\Column(type="boolean", options={"default":0})
  396.      */
  397.     private $showGrossPrice false;
  398.     /**
  399.      * @ORM\Column(type="string", length=255, nullable=true)
  400.      */
  401.     private $csMail;
  402.     /**
  403.      * @ORM\Column(type="boolean", options={"default":1})
  404.      * @JMS\Groups({"PortalSettings"})
  405.      */
  406.     private $isPhoneRequired true;
  407.     /**
  408.      * @ORM\Column(type="integer", nullable=true)
  409.      */
  410.     private $webeMidNumber;
  411.     /**
  412.      * @ORM\ManyToOne(targetEntity=PaymentSystem::class)
  413.      */
  414.     private $defaultPaymentSystem;
  415.     /**
  416.      * @ORM\Column(type="boolean", nullable=true)
  417.      */
  418.     private $useFbPixelInIframe;
  419.     /**
  420.      * @ORM\ManyToOne(targetEntity=ClientType::class)
  421.      * @ORM\JoinColumn(nullable=false)
  422.      */
  423.     private $defaultCartClientType;
  424.     /**
  425.      * @ORM\Column(type="boolean", options={"default":0})
  426.      */
  427.     private $isPaymentBeforeConfirmation;
  428.     /**
  429.      * @ORM\ManyToMany(targetEntity=Honorifics::class, mappedBy="portalSettings")
  430.      */
  431.     private $honorifics;
  432.     /**
  433.      * @ORM\Column(type="boolean")
  434.      */
  435.     private $paymentReward;
  436.     /**
  437.      * @ORM\Column(type="text", nullable=true)
  438.      */
  439.     private $paymentRewardContent;
  440.     /**
  441.      * @ORM\Column(type="integer", nullable=true)
  442.      */
  443.     private $paymentRewardDeadline;
  444.     /**
  445.      * @ORM\Column(type="integer", nullable=true)
  446.      * @JMS\Groups({"PortalSettings"})
  447.      */
  448.     private $cartTemplate;
  449.     /**
  450.      * @ORM\ManyToMany(targetEntity=User::class, mappedBy="usingPortals")
  451.      * @ORM\JoinTable(name="user_uses_portal")
  452.      */
  453.     private $users;
  454.     /**
  455.      * @ORM\Column(type="boolean", nullable=true, options={"default": 1})
  456.      */
  457.     private $useCacheInAccess true;
  458.     /**
  459.      * @ORM\Column(type="text", nullable=true)
  460.      */
  461.     private $orderConfirmationAdditionalContent;
  462.     /**
  463.      * @ORM\Column(type="text", nullable=true)
  464.      */
  465.     private $additionalContentForMail;
  466.     /**
  467.      * @ORM\Column(type="text", nullable=true)
  468.      */
  469.     private $matomoSiteId;
  470.     /**
  471.      * @ORM\Column(type="json", nullable=true)
  472.      */
  473.     private $positionsOrder = [];
  474.     /**
  475.      * @ORM\ManyToMany(targetEntity=ContactSegmentation::class)
  476.      */
  477.     private $contactSegmentations;
  478.     /**
  479.      * @ORM\OneToOne(targetEntity=OnboardingSettings::class, mappedBy="portalSettings", cascade={"persist", "remove"})
  480.      */
  481.     private $onboardingSettings;
  482.     // END OF TESTS A/B
  483.     /**
  484.      * @JMS\VirtualProperty
  485.      * @JMS\Type("boolean")
  486.      * @JMS\Groups({"PortalSettings"})
  487.      */
  488.     public function isVirtualCurrencyEnabled(): bool
  489.     {
  490.         return (bool)$this->virtualCurrency;
  491.     }
  492.     /** @ORM\PrePersist() */
  493.     public function prePersist()
  494.     {
  495.         $this->createdAt = new \DateTime();
  496.     }
  497.     /** @ORM\PreUpdate() */
  498.     public function preUpdate()
  499.     {
  500.         foreach ($this->productVariant as $productVariant)
  501.         {
  502.             if (!$productVariant->isActive())
  503.             {
  504.                 $this->removeProductVariant($productVariant);
  505.             }
  506.         }
  507.         $this->updatedAt = new \DateTime();
  508.     }
  509.     public function hasPaymentSystem(String $paymentSystemName)
  510.     {
  511.         /** @var PaymentSystem $paymentSystem */
  512.         foreach ($this->getPaymentSystem() as $paymentSystem)
  513.         {
  514.             if ($paymentSystem->getSlug() == $paymentSystemName)
  515.             {
  516.                 return true;
  517.             }
  518.         }
  519.         return false;
  520.     }
  521.     public function checkIsCmsLiterkaPortal() : bool
  522.     {
  523.         // literka.pl, fizmedio.pl
  524.         if (in_array($this->getHash(), ['12b95121caa23e69201ce170e2ba62''80d05fe8bdee4ce587d6d0e0bdb7a9']))
  525.         {
  526.             return true;
  527.         }
  528.         return false;
  529.     }
  530.     public function isEforumPortal(): bool
  531.     {
  532.         return $this->hash === $_ENV['EF_PORTAL_SETTINGS'];
  533.     }
  534.     public function __toString()
  535.     {
  536.         return (string)$this->title;
  537.     }
  538.     /**
  539.      * Constructor
  540.      */
  541.     public function __construct()
  542.     {
  543.         $this->orders               = new ArrayCollection();
  544.         $this->productVariant       = new ArrayCollection();
  545.         $this->paymentSystem        = new ArrayCollection();
  546.         $this->emailTemplate        = new ArrayCollection();
  547.         $this->accessLevels         = new ArrayCollection();
  548.         $this->terms                = new ArrayCollection();
  549.         $this->passwordFromImport   = new ArrayCollection();
  550.         $this->ordersDataTemp       = new ArrayCollection();
  551.         $this->templates            = new ArrayCollection();
  552.         $this->staticPage           = new ArrayCollection();
  553.         $this->touchPoint           = new ArrayCollection();
  554.         $this->touchPointAll        = new ArrayCollection();
  555.         $this->productAssociations  = new ArrayCollection();
  556.         $this->categories           = new ArrayCollection();
  557.         $this->course               = new ArrayCollection();
  558.         $this->accessUser           = new ArrayCollection();
  559.         $this->registeredUser       = new ArrayCollection();
  560.         $this->promoBox             = new ArrayCollection();
  561.         $this->slider               = new ArrayCollection();
  562.         $this->salesManagoEvents    = new ArrayCollection();
  563.         $this->productVariantPacks  = new ArrayCollection();
  564.         $this->positions            = new ArrayCollection();
  565.         $this->newsletters          = new ArrayCollection();
  566.         $this->userFirstLoginInfos  = new ArrayCollection();
  567.         $this->carts                = new ArrayCollection();
  568.         $this->honorifics           = new ArrayCollection();
  569.         $this->users                = new ArrayCollection();
  570.         $this->contactSegmentations = new ArrayCollection();
  571.     }
  572.     /**
  573.      * Add accessLevel
  574.      *
  575.      * @param AccessLevel $accessLevel
  576.      *
  577.      * @return PortalSettings
  578.      */
  579.     public function addAccessLevel(AccessLevel $accessLevel)
  580.     {
  581.         $accessLevel->setPortalSettings($this);
  582.         $this->accessLevels[] = $accessLevel;
  583.         return $this;
  584.     }
  585.     /**
  586.      * Remove accessLevel
  587.      *
  588.      * @param AccessLevel $accessLevel
  589.      */
  590.     public function removeAccessLevel(AccessLevel $accessLevel)
  591.     {
  592.         $accessLevel->setPortalSettings(null);
  593.         $this->accessLevels->removeElement($accessLevel);
  594.     }  /**
  595.  * Get leadingColor1
  596.  *
  597.  * @return string
  598.  */
  599.     public function getLeadingColor1()
  600.     {
  601.         return $this->checkColor($this->leadingColor1);
  602.     }
  603.     /**
  604.      * Get leadingColor2
  605.      *
  606.      * @return string
  607.      */
  608.     public function getLeadingColor2()
  609.     {
  610.         return $this->checkColor($this->leadingColor2);
  611.     }
  612.     /**
  613.      * Get leadingColor3
  614.      *
  615.      * @return string
  616.      */
  617.     public function getLeadingColor3()
  618.     {
  619.         return $this->checkColor($this->leadingColor3);
  620.     }
  621.     private function checkColor($color)
  622.     {
  623.         if (empty($color))
  624.         {
  625.             return null;
  626.         }
  627.         if ($color[0] != '#')
  628.         {
  629.             $color '#' $color;
  630.         }
  631.         if (strlen($color) < 7)
  632.         {
  633.             return null;
  634.         }
  635.         return $color;
  636.     }
  637.     /**
  638.      * Get accessLevels
  639.      *
  640.      * @return \Doctrine\Common\Collections\Collection
  641.      */
  642.     public function getAccessLevels()
  643.     {
  644.         return $this->accessLevels;
  645.     }
  646.     /**
  647.      *
  648.      * Getters and setters
  649.      *
  650.      */
  651.     /**
  652.      * Get id
  653.      *
  654.      * @return integer
  655.      */
  656.     public function getId()
  657.     {
  658.         return $this->id;
  659.     }
  660.     /**
  661.      * Set domain
  662.      *
  663.      * @param string $domain
  664.      *
  665.      * @return PortalSettings
  666.      */
  667.     public function setDomain($domain)
  668.     {
  669.         $this->domain $domain;
  670.         return $this;
  671.     }
  672.     /**
  673.      * Get domain
  674.      *
  675.      * @return string
  676.      */
  677.     public function getDomain()
  678.     {
  679.         return $this->domain;
  680.     }
  681.     /**
  682.      * Set hash
  683.      *
  684.      * @param string $hash
  685.      *
  686.      * @return PortalSettings
  687.      */
  688.     public function setHash($hash)
  689.     {
  690.         $this->hash $hash;
  691.         return $this;
  692.     }
  693.     /**
  694.      * Get hash
  695.      *
  696.      * @return string
  697.      */
  698.     public function getHash()
  699.     {
  700.         return $this->hash;
  701.     }
  702.     /**
  703.      * Set title
  704.      *
  705.      * @param string $title
  706.      *
  707.      * @return PortalSettings
  708.      */
  709.     public function setTitle($title)
  710.     {
  711.         $this->title $title;
  712.         return $this;
  713.     }
  714.     /**
  715.      * Get title
  716.      *
  717.      * @return string
  718.      */
  719.     public function getTitle()
  720.     {
  721.         return $this->title;
  722.     }
  723.     /**
  724.      * Set isActive
  725.      *
  726.      * @param boolean $isActive
  727.      *
  728.      * @return PortalSettings
  729.      */
  730.     public function setIsActive($isActive)
  731.     {
  732.         $this->isActive $isActive;
  733.         return $this;
  734.     }
  735.     /**
  736.      * Get isActive
  737.      *
  738.      * @return boolean
  739.      */
  740.     public function getIsActive()
  741.     {
  742.         return $this->isActive;
  743.     }
  744.     /**
  745.      * Set actionNumber
  746.      *
  747.      * @param string $actionNumber
  748.      *
  749.      * @return PortalSettings
  750.      */
  751.     public function setActionNumber($actionNumber)
  752.     {
  753.         $this->actionNumber $actionNumber;
  754.         return $this;
  755.     }
  756.     /**
  757.      * Get actionNumber
  758.      *
  759.      * @return string
  760.      */
  761.     public function getActionNumber()
  762.     {
  763.         return $this->actionNumber;
  764.     }
  765.     /**
  766.      * Set fromSource
  767.      *
  768.      * @param string $fromSource
  769.      *
  770.      * @return PortalSettings
  771.      */
  772.     public function setFromSource($fromSource)
  773.     {
  774.         $this->fromSource $fromSource;
  775.         return $this;
  776.     }
  777.     /**
  778.      * Get fromSource
  779.      *
  780.      * @return string
  781.      */
  782.     public function getFromSource()
  783.     {
  784.         return $this->fromSource;
  785.     }
  786.     /**
  787.      * Set portalCss
  788.      *
  789.      * @param string $portalCss
  790.      *
  791.      * @return PortalSettings
  792.      */
  793.     public function setPortalCss($portalCss)
  794.     {
  795.         $this->portalCss $portalCss;
  796.         return $this;
  797.     }
  798.     /**
  799.      * Get portalCss
  800.      *
  801.      * @return string
  802.      */
  803.     public function getPortalCss()
  804.     {
  805.         return $this->portalCss;
  806.     }
  807.     /**
  808.      * Set createdAt
  809.      *
  810.      * @param \DateTime $createdAt
  811.      *
  812.      * @return PortalSettings
  813.      */
  814.     public function setCreatedAt($createdAt)
  815.     {
  816.         $this->createdAt $createdAt;
  817.         return $this;
  818.     }
  819.     /**
  820.      * Get createdAt
  821.      *
  822.      * @return \DateTime
  823.      */
  824.     public function getCreatedAt()
  825.     {
  826.         return $this->createdAt;
  827.     }
  828.     /**
  829.      * Set updatedAt
  830.      *
  831.      * @param \DateTime $updatedAt
  832.      *
  833.      * @return PortalSettings
  834.      */
  835.     public function setUpdatedAt($updatedAt)
  836.     {
  837.         $this->updatedAt $updatedAt;
  838.         return $this;
  839.     }
  840.     /**
  841.      * Get updatedAt
  842.      *
  843.      * @return \DateTime
  844.      */
  845.     public function getUpdatedAt()
  846.     {
  847.         return $this->updatedAt;
  848.     }
  849.     /**
  850.      * Add order
  851.      *
  852.      * @param \App\Entity\Gos\Orders $order
  853.      *
  854.      * @return PortalSettings
  855.      */
  856.     public function addOrder(\App\Entity\Gos\Orders $order)
  857.     {
  858.         $this->orders[] = $order;
  859.         return $this;
  860.     }
  861.     /**
  862.      * Remove order
  863.      *
  864.      * @param \App\Entity\Gos\Orders $order
  865.      */
  866.     public function removeOrder(\App\Entity\Gos\Orders $order)
  867.     {
  868.         $this->orders->removeElement($order);
  869.     }
  870.     /**
  871.      * Get orders
  872.      *
  873.      * @return \Doctrine\Common\Collections\Collection
  874.      */
  875.     public function getOrders()
  876.     {
  877.         return $this->orders;
  878.     }
  879.     /**
  880.      * Set orderType
  881.      *
  882.      * @param \App\Entity\Gos\OrderType $orderType
  883.      *
  884.      * @return PortalSettings
  885.      */
  886.     public function setOrderType(\App\Entity\Gos\OrderType $orderType null)
  887.     {
  888.         $this->orderType $orderType;
  889.         return $this;
  890.     }
  891.     /**
  892.      * Get orderType
  893.      *
  894.      * @return \App\Entity\Gos\OrderType
  895.      */
  896.     public function getOrderType()
  897.     {
  898.         return $this->orderType;
  899.     }
  900.     /**
  901.      * Add productVariant
  902.      *
  903.      * @param \App\Entity\Gos\ProductVariant $productVariant
  904.      *
  905.      * @return PortalSettings
  906.      */
  907.     public function addProductVariant(\App\Entity\Gos\ProductVariant $productVariant)
  908.     {
  909.         $this->productVariant[] = $productVariant;
  910.         return $this;
  911.     }
  912.     /**
  913.      * Remove productVariant
  914.      *
  915.      * @param \App\Entity\Gos\ProductVariant $productVariant
  916.      */
  917.     public function removeProductVariant(\App\Entity\Gos\ProductVariant $productVariant)
  918.     {
  919.         $this->productVariant->removeElement($productVariant);
  920.     }
  921.     /**
  922.      * Get productVariant
  923.      *
  924.      * @return \Doctrine\Common\Collections\Collection
  925.      */
  926.     public function getProductVariant()
  927.     {
  928.         return $this->productVariant;
  929.     }
  930.     /**
  931.      * Add paymentSystem
  932.      *
  933.      * @param \App\Entity\Gos\PaymentSystem $paymentSystem
  934.      *
  935.      * @return PortalSettings
  936.      */
  937.     public function addPaymentSystem(\App\Entity\Gos\PaymentSystem $paymentSystem)
  938.     {
  939.         $this->paymentSystem[] = $paymentSystem;
  940.         return $this;
  941.     }
  942.     /**
  943.      * Remove paymentSystem
  944.      *
  945.      * @param \App\Entity\Gos\PaymentSystem $paymentSystem
  946.      */
  947.     public function removePaymentSystem(\App\Entity\Gos\PaymentSystem $paymentSystem)
  948.     {
  949.         $this->paymentSystem->removeElement($paymentSystem);
  950.     }
  951.     /**
  952.      * Get paymentSystem
  953.      *
  954.      * @return \Doctrine\Common\Collections\Collection
  955.      */
  956.     public function getPaymentSystem()
  957.     {
  958.         return $this->paymentSystem;
  959.     }
  960.     /**
  961.      * Add emailTemplate
  962.      *
  963.      * @param \App\Entity\Gos\EmailTemplate $emailTemplate
  964.      *
  965.      * @return PortalSettings
  966.      */
  967.     public function addEmailTemplate(\App\Entity\Gos\EmailTemplate $emailTemplate)
  968.     {
  969.         $this->emailTemplate[] = $emailTemplate;
  970.         return $this;
  971.     }
  972.     /**
  973.      * Remove emailTemplate
  974.      *
  975.      * @param \App\Entity\Gos\EmailTemplate $emailTemplate
  976.      */
  977.     public function removeEmailTemplate(\App\Entity\Gos\EmailTemplate $emailTemplate)
  978.     {
  979.         $this->emailTemplate->removeElement($emailTemplate);
  980.     }
  981.     /**
  982.      * Get emailTemplate
  983.      *
  984.      * @return \Doctrine\Common\Collections\Collection
  985.      */
  986.     public function getEmailTemplate()
  987.     {
  988.         return $this->emailTemplate;
  989.     }
  990.     /**
  991.      * Add term
  992.      *
  993.      * @param \App\Entity\Gos\Term $term
  994.      *
  995.      * @return PortalSettings
  996.      */
  997.     public function addTerm(\App\Entity\Gos\Term $term)
  998.     {
  999.         $term->addPortalSetting($this);
  1000.         $this->terms[] = $term;
  1001.         return $this;
  1002.     }
  1003.     /**
  1004.      * Remove term
  1005.      *
  1006.      * @param \App\Entity\Gos\Term $term
  1007.      */
  1008.     public function removeTerm(\App\Entity\Gos\Term $term)
  1009.     {
  1010.         $term->removePortalSetting($this);
  1011.         $this->terms->removeElement($term);
  1012.     }
  1013.     /**
  1014.      * Get terms
  1015.      *
  1016.      * @return \Doctrine\Common\Collections\Collection
  1017.      */
  1018.     public function getTerms()
  1019.     {
  1020.         return $this->terms;
  1021.     }
  1022.     /**
  1023.      * Add passwordFromImport
  1024.      *
  1025.      * @param \App\Entity\Gos\PasswordFromImport $passwordFromImport
  1026.      *
  1027.      * @return PortalSettings
  1028.      */
  1029.     public function addPasswordFromImport(\App\Entity\Gos\PasswordFromImport $passwordFromImport)
  1030.     {
  1031.         $this->passwordFromImport[] = $passwordFromImport;
  1032.         return $this;
  1033.     }
  1034.     /**
  1035.      * Remove passwordFromImport
  1036.      *
  1037.      * @param \App\Entity\Gos\PasswordFromImport $passwordFromImport
  1038.      */
  1039.     public function removePasswordFromImport(\App\Entity\Gos\PasswordFromImport $passwordFromImport)
  1040.     {
  1041.         $this->passwordFromImport->removeElement($passwordFromImport);
  1042.     }
  1043.     /**
  1044.      * Get passwordFromImport
  1045.      *
  1046.      * @return \Doctrine\Common\Collections\Collection
  1047.      */
  1048.     public function getPasswordFromImport()
  1049.     {
  1050.         return $this->passwordFromImport;
  1051.     }
  1052.     /**
  1053.      * Add ordersDataTemp
  1054.      *
  1055.      * @param \App\Entity\Gos\OrdersDataTemp $ordersDataTemp
  1056.      *
  1057.      * @return PortalSettings
  1058.      */
  1059.     public function addOrdersDataTemp(\App\Entity\Gos\OrdersDataTemp $ordersDataTemp)
  1060.     {
  1061.         $this->ordersDataTemp[] = $ordersDataTemp;
  1062.         return $this;
  1063.     }
  1064.     /**
  1065.      * Remove ordersDataTemp
  1066.      *
  1067.      * @param \App\Entity\Gos\OrdersDataTemp $ordersDataTemp
  1068.      */
  1069.     public function removeOrdersDataTemp(\App\Entity\Gos\OrdersDataTemp $ordersDataTemp)
  1070.     {
  1071.         $this->ordersDataTemp->removeElement($ordersDataTemp);
  1072.     }
  1073.     /**
  1074.      * Get ordersDataTemp
  1075.      *
  1076.      * @return \Doctrine\Common\Collections\Collection
  1077.      */
  1078.     public function getOrdersDataTemp()
  1079.     {
  1080.         return $this->ordersDataTemp;
  1081.     }
  1082.     /**
  1083.      * Set portalNumberSB
  1084.      *
  1085.      * @param string $portalNumberSB
  1086.      *
  1087.      * @return PortalSettings
  1088.      */
  1089.     public function setPortalNumberSB($portalNumberSB)
  1090.     {
  1091.         $this->portalNumberSB $portalNumberSB;
  1092.         return $this;
  1093.     }
  1094.     /**
  1095.      * Get portalNumberSB
  1096.      *
  1097.      * @return string
  1098.      */
  1099.     public function getPortalNumberSB()
  1100.     {
  1101.         return $this->portalNumberSB;
  1102.     }
  1103.     /**
  1104.      * Set leadingColor1
  1105.      *
  1106.      * @param string $leadingColor1
  1107.      *
  1108.      * @return PortalSettings
  1109.      */
  1110.     public function setLeadingColor1($leadingColor1)
  1111.     {
  1112.         $this->leadingColor1 $leadingColor1;
  1113.         return $this;
  1114.     }
  1115.     /**
  1116.      * Set leadingColor2
  1117.      *
  1118.      * @param string $leadingColor2
  1119.      *
  1120.      * @return PortalSettings
  1121.      */
  1122.     public function setLeadingColor2($leadingColor2)
  1123.     {
  1124.         $this->leadingColor2 $leadingColor2;
  1125.         return $this;
  1126.     }
  1127.     /**
  1128.      * Set leadingColor3
  1129.      *
  1130.      * @param string $leadingColor3
  1131.      *
  1132.      * @return PortalSettings
  1133.      */
  1134.     public function setLeadingColor3($leadingColor3)
  1135.     {
  1136.         $this->leadingColor3 $leadingColor3;
  1137.         return $this;
  1138.     }
  1139.     /**
  1140.      * Set logo
  1141.      *
  1142.      * @param string $logo
  1143.      * @return PortalSettings
  1144.      */
  1145.     public function setLogo($logo)
  1146.     {
  1147.         $this->logo $logo;
  1148.         return $this;
  1149.     }
  1150.     /**
  1151.      * Get logo
  1152.      *
  1153.      * @return string
  1154.      */
  1155.     public function getLogo()
  1156.     {
  1157.         return $this->logo;
  1158.     }
  1159.     /**
  1160.      * Set emailSettings
  1161.      *
  1162.      * @param \App\Entity\Gos\EmailSettings|null $emailSettings
  1163.      * @return PortalSettings
  1164.      */
  1165.     public function setEmailSettings($emailSettings)
  1166.     {
  1167.         $this->emailSettings $emailSettings;
  1168.         return $this;
  1169.     }
  1170.     /**
  1171.      * Get emailSettings
  1172.      *
  1173.      * @return \App\Entity\Gos\EmailSettings
  1174.      */
  1175.     public function getEmailSettings()
  1176.     {
  1177.         return $this->emailSettings;
  1178.     }
  1179.     /**
  1180.      * Set contactMail
  1181.      *
  1182.      * @param string $contactMail
  1183.      * @return PortalSettings
  1184.      */
  1185.     public function setContactMail($contactMail)
  1186.     {
  1187.         $this->contactMail $contactMail;
  1188.         return $this;
  1189.     }
  1190.     /**
  1191.      * Get contactMail
  1192.      *
  1193.      * @return string
  1194.      */
  1195.     public function getContactMail()
  1196.     {
  1197.         return $this->contactMail;
  1198.     }
  1199.     /**
  1200.      * Set registrationAdditionalContent
  1201.      *
  1202.      * @param string $registrationAdditionalContent
  1203.      *
  1204.      * @return PortalSettings
  1205.      */
  1206.     public function setRegistrationAdditionalContent($registrationAdditionalContent)
  1207.     {
  1208.         $this->registrationAdditionalContent $registrationAdditionalContent;
  1209.         return $this;
  1210.     }
  1211.     /**
  1212.      * Get registrationAdditionalContent
  1213.      *
  1214.      * @return string
  1215.      */
  1216.     public function getRegistrationAdditionalContent()
  1217.     {
  1218.         return $this->registrationAdditionalContent;
  1219.     }
  1220.     /**
  1221.      * Set loginAdditionalContent
  1222.      *
  1223.      * @param string $loginAdditionalContent
  1224.      * @return PortalSettings
  1225.      */
  1226.     public function setLoginAdditionalContent($loginAdditionalContent)
  1227.     {
  1228.         $this->loginAdditionalContent $loginAdditionalContent;
  1229.         return $this;
  1230.     }
  1231.     /**
  1232.      * Get loginAdditionalContent
  1233.      *
  1234.      * @return string
  1235.      */
  1236.     public function getLoginAdditionalContent()
  1237.     {
  1238.         return $this->loginAdditionalContent;
  1239.     }
  1240.     /**
  1241.      * @return Collection|StaticPage[]
  1242.      */
  1243.     public function getStaticPage(): Collection
  1244.     {
  1245.         return $this->staticPage;
  1246.     }
  1247.     public function addStaticPage(StaticPage $staticPage): self
  1248.     {
  1249.         if (!$this->staticPage->contains($staticPage)) {
  1250.             $this->staticPage[] = $staticPage;
  1251.             $staticPage->setPortalSettings($this);
  1252.         }
  1253.         return $this;
  1254.     }
  1255.     public function removeStaticPage(StaticPage $staticPage): self
  1256.     {
  1257.         if ($this->staticPage->contains($staticPage)) {
  1258.             $this->staticPage->removeElement($staticPage);
  1259.             // set the owning side to null (unless already changed)
  1260.             if ($staticPage->getPortalSettings() === $this) {
  1261.                 $staticPage->setPortalSettings(null);
  1262.             }
  1263.         }
  1264.         return $this;
  1265.     }
  1266.     /**
  1267.      * @return Collection|Template[]
  1268.      */
  1269.     public function getTemplates(): Collection
  1270.     {
  1271.         return $this->templates;
  1272.     }
  1273.     public function addTemplate(Template $template): self
  1274.     {
  1275.         if (!$this->templates->contains($template))
  1276.         {
  1277.             $this->templates[] = $template;
  1278.             $template->setPortalSettings($this);
  1279.         }
  1280.         return $this;
  1281.     }
  1282.     public function removeTemplate(Template $template): self
  1283.     {
  1284.         if ($this->templates->contains($template))
  1285.         {
  1286.             $this->templates->removeElement($template);
  1287.             // set the owning side to null (unless already changed)
  1288.             if ($template->getPortalSettings() === $this)
  1289.             {
  1290.                 $template->setPortalSettings(null);
  1291.             }
  1292.         }
  1293.         return $this;
  1294.     }
  1295.     /**
  1296.      * @return Collection|TouchPoint[]
  1297.      */
  1298.     public function getTouchPoint(): Collection
  1299.     {
  1300.         return $this->touchPoint;
  1301.     }
  1302.     public function addTouchPoint(TouchPoint $touchPoint): self
  1303.     {
  1304.         if (!$this->touchPoint->contains($touchPoint)) {
  1305.             $this->touchPoint[] = $touchPoint;
  1306.             $touchPoint->setPortalSettings($this);
  1307.         }
  1308.         return $this;
  1309.     }
  1310.     public function removeTouchPoint(TouchPoint $touchPoint): self
  1311.     {
  1312.         if ($this->touchPoint->contains($touchPoint)) {
  1313.             $this->touchPoint->removeElement($touchPoint);
  1314.             // set the owning side to null (unless already changed)
  1315.             if ($touchPoint->getPortalSettings() === $this) {
  1316.                 $touchPoint->setPortalSettings(null);
  1317.             }
  1318.         }
  1319.         return $this;
  1320.     }
  1321.     public function getPortalHeadScripts(): ?string
  1322.     {
  1323.         return $this->portalHeadScripts;
  1324.     }
  1325.     public function setPortalHeadScripts(?string $portalHeadScripts): self
  1326.     {
  1327.         $this->portalHeadScripts $portalHeadScripts;
  1328.         return $this;
  1329.     }
  1330.     public function getPortalBodyScripts(): ?string
  1331.     {
  1332.         return $this->portalBodyScripts;
  1333.     }
  1334.     public function setPortalBodyScripts(?string $portalBodyScripts): self
  1335.     {
  1336.         $this->portalBodyScripts $portalBodyScripts;
  1337.         return $this;
  1338.     }
  1339.     /**
  1340.      * @return Collection|ProductAssociation[]
  1341.      */
  1342.     public function getProductAssociations(): Collection
  1343.     {
  1344.         return $this->productAssociations;
  1345.     }
  1346.     public function addProductAssociation(ProductAssociation $productAssociation): self
  1347.     {
  1348.         if (!$this->productAssociations->contains($productAssociation)) {
  1349.             $this->productAssociations[] = $productAssociation;
  1350.             $productAssociation->setPortalSettings($this);
  1351.         }
  1352.         return $this;
  1353.     }
  1354.     public function removeProductAssociation(ProductAssociation $productAssociation): self
  1355.     {
  1356.         if ($this->productAssociations->contains($productAssociation)) {
  1357.             $this->productAssociations->removeElement($productAssociation);
  1358.             // set the owning side to null (unless already changed)
  1359.             if ($productAssociation->getPortalSettings() === $this) {
  1360.                 $productAssociation->setPortalSettings(null);
  1361.             }
  1362.         }
  1363.         return $this;
  1364.     }
  1365.     /**
  1366.      * @return Collection|Category[]
  1367.      */
  1368.     public function getCategories(): Collection
  1369.     {
  1370.         return $this->categories;
  1371.     }
  1372.     public function addCategory(Category $category): self
  1373.     {
  1374.         if (!$this->categories->contains($category)) {
  1375.             $this->categories[] = $category;
  1376.             $category->setPortalSettings($this);
  1377.         }
  1378.         return $this;
  1379.     }
  1380.     public function removeCategory(Category $category): self
  1381.     {
  1382.         if ($this->categories->contains($category)) {
  1383.             $this->categories->removeElement($category);
  1384.             // set the owning side to null (unless already changed)
  1385.             if ($category->getPortalSettings() === $this) {
  1386.                 $category->setPortalSettings(null);
  1387.             }
  1388.         }
  1389.         return $this;
  1390.     }
  1391.     /**
  1392.      * @return Collection|Course[]
  1393.      */
  1394.     public function getCourse(): Collection
  1395.     {
  1396.         return $this->course;
  1397.     }
  1398.     public function addCourse(Course $course): self
  1399.     {
  1400.         if (!$this->course->contains($course)) {
  1401.             $this->course[] = $course;
  1402.             $course->setPortalSettings($this);
  1403.         }
  1404.         return $this;
  1405.     }
  1406.     public function removeCourse(Course $course): self
  1407.     {
  1408.         if ($this->course->contains($course)) {
  1409.             $this->course->removeElement($course);
  1410.             // set the owning side to null (unless already changed)
  1411.             if ($course->getPortalSettings() === $this) {
  1412.                 $course->setPortalSettings(null);
  1413.             }
  1414.         }
  1415.         return $this;
  1416.     }
  1417.     public function getRobotsTxt(): ?string
  1418.     {
  1419.         return $this->robotsTxt;
  1420.     }
  1421.     public function setRobotsTxt(?string $robotsTxt): self
  1422.     {
  1423.         $this->robotsTxt $robotsTxt;
  1424.         return $this;
  1425.     }
  1426.     /**
  1427.      * @return Collection|TouchPointAll[]
  1428.      */
  1429.     public function getTouchPointAll(): Collection
  1430.     {
  1431.         return $this->touchPointAll;
  1432.     }
  1433.     public function addTouchPointAll(TouchPointAll $touchPointAll): self
  1434.     {
  1435.         if (!$this->touchPointAll->contains($touchPointAll)) {
  1436.             $this->touchPointAll[] = $touchPointAll;
  1437.             $touchPointAll->setPortalSettings($this);
  1438.         }
  1439.         return $this;
  1440.     }
  1441.     public function removeTouchPointAll(TouchPointAll $touchPointAll): self
  1442.     {
  1443.         if ($this->touchPointAll->contains($touchPointAll)) {
  1444.             $this->touchPointAll->removeElement($touchPointAll);
  1445.             // set the owning side to null (unless already changed)
  1446.             if ($touchPointAll->getPortalSettings() === $this) {
  1447.                 $touchPointAll->setPortalSettings(null);
  1448.             }
  1449.         }
  1450.         return $this;
  1451.     }
  1452.     public function getIsUniqskillsPortal(): ?bool
  1453.     {
  1454.         return $this->isUniqskillsPortal;
  1455.     }
  1456.     public function setIsUniqskillsPortal(?bool $isUniqskillsPortal): self
  1457.     {
  1458.         $this->isUniqskillsPortal $isUniqskillsPortal;
  1459.         return $this;
  1460.     }
  1461.     public function getFmCompanySettings(): ?FmCompanySettings
  1462.     {
  1463.         return $this->fmCompanySettings;
  1464.     }
  1465.     public function setFmCompanySettings(?FmCompanySettings $fmCompanySettings): self
  1466.     {
  1467.         $this->fmCompanySettings $fmCompanySettings;
  1468.         // set (or unset) the owning side of the relation if necessary
  1469.         $newPortalSettings $fmCompanySettings === null null $this;
  1470.         if ($newPortalSettings !== $fmCompanySettings->getPortalSettings()) {
  1471.             $fmCompanySettings->setPortalSettings($newPortalSettings);
  1472.         }
  1473.         return $this;
  1474.     }
  1475.     /**
  1476.      * @return Collection|User[]
  1477.      */
  1478.     public function getAccessUser(): Collection
  1479.     {
  1480.         return $this->accessUser;
  1481.     }
  1482.     public function addAccessUser(User $accessUser): self
  1483.     {
  1484.         if (!$this->accessUser->contains($accessUser)) {
  1485.             $this->accessUser[] = $accessUser;
  1486.             $accessUser->addAccessToPortalSetting($this);
  1487.         }
  1488.         return $this;
  1489.     }
  1490.     public function removeAccessUser(User $accessUser): self
  1491.     {
  1492.         if ($this->accessUser->contains($accessUser)) {
  1493.             $this->accessUser->removeElement($accessUser);
  1494.             $accessUser->removeAccessToPortalSetting($this);
  1495.         }
  1496.         return $this;
  1497.     }
  1498.     /**
  1499.      * @return Collection|User[]
  1500.      */
  1501.     public function getRegisteredUser(): Collection
  1502.     {
  1503.         return $this->registeredUser;
  1504.     }
  1505.     public function addRegisteredUser(User $registeredUser): self
  1506.     {
  1507.         if (!$this->registeredUser->contains($registeredUser)) {
  1508.             $this->registeredUser[] = $registeredUser;
  1509.             $registeredUser->setRegisteredFrom($this);
  1510.         }
  1511.         return $this;
  1512.     }
  1513.     public function removeRegisteredUser(User $registeredUser): self
  1514.     {
  1515.         if ($this->registeredUser->contains($registeredUser)) {
  1516.             $this->registeredUser->removeElement($registeredUser);
  1517.             // set the owning side to null (unless already changed)
  1518.             if ($registeredUser->getRegisteredFrom() === $this) {
  1519.                 $registeredUser->setRegisteredFrom(null);
  1520.             }
  1521.         }
  1522.         return $this;
  1523.     }
  1524.     public function getPortalStartBodyScripts(): ?string
  1525.     {
  1526.         return $this->portalStartBodyScripts;
  1527.     }
  1528.     public function setPortalStartBodyScripts(?string $portalStartBodyScripts): self
  1529.     {
  1530.         $this->portalStartBodyScripts $portalStartBodyScripts;
  1531.         return $this;
  1532.     }
  1533.     /**
  1534.      * @return Collection|PromoBox[]
  1535.      */
  1536.     public function getPromoBox(): Collection
  1537.     {
  1538.         return $this->promoBox;
  1539.     }
  1540.     public function addPromoBox(PromoBox $promoBox): self
  1541.     {
  1542.         if (!$this->promoBox->contains($promoBox)) {
  1543.             $this->promoBox[] = $promoBox;
  1544.             $promoBox->setPortalSettings($this);
  1545.         }
  1546.         return $this;
  1547.     }
  1548.     public function removePromoBox(PromoBox $promoBox): self
  1549.     {
  1550.         if ($this->promoBox->contains($promoBox)) {
  1551.             $this->promoBox->removeElement($promoBox);
  1552.             // set the owning side to null (unless already changed)
  1553.             if ($promoBox->getPortalSettings() === $this) {
  1554.                 $promoBox->setPortalSettings(null);
  1555.             }
  1556.         }
  1557.         return $this;
  1558.     }
  1559.     /**
  1560.      * @return Collection|Slider[]
  1561.      */
  1562.     public function getSlider(): Collection
  1563.     {
  1564.         return $this->slider;
  1565.     }
  1566.     public function addSlider(Slider $slider): self
  1567.     {
  1568.         if (!$this->slider->contains($slider)) {
  1569.             $this->slider[] = $slider;
  1570.             $slider->setPortalSettings($this);
  1571.         }
  1572.         return $this;
  1573.     }
  1574.     public function removeSlider(Slider $slider): self
  1575.     {
  1576.         if ($this->slider->contains($slider)) {
  1577.             $this->slider->removeElement($slider);
  1578.             // set the owning side to null (unless already changed)
  1579.             if ($slider->getPortalSettings() === $this) {
  1580.                 $slider->setPortalSettings(null);
  1581.             }
  1582.         }
  1583.         return $this;
  1584.     }
  1585.     /**
  1586.      * Add salesManagoEvents
  1587.      *
  1588.      * @param \App\Entity\Gos\SalesManagoEvent $salesManagoEvent
  1589.      *
  1590.      * @return PortalSettings
  1591.      */
  1592.     public function addSalesManagoEvent(\App\Entity\Gos\SalesManagoEvent $salesManagoEvent)
  1593.     {
  1594.         $this->salesManagoEvents[] = $salesManagoEvent;
  1595.         return $this;
  1596.     }
  1597.     /**
  1598.      * Remove salesManagoEvents
  1599.      *
  1600.      * @param \App\Entity\Gos\SalesManagoEvent $salesManagoEvent
  1601.      */
  1602.     public function removeSalesManagoEvent(\App\Entity\Gos\SalesManagoEvent $salesManagoEvent)
  1603.     {
  1604.         $this->salesManagoEvents->removeElement($salesManagoEvent);
  1605.     }
  1606.     /**
  1607.      * Get salesManagoEvents
  1608.      *
  1609.      * @return \Doctrine\Common\Collections\Collection
  1610.      */
  1611.     public function getSalesManagoEvents()
  1612.     {
  1613.         return $this->salesManagoEvents;
  1614.     }
  1615.     public function getResetPasswordUrl($confirmationToken$locale 'pl')
  1616.     {
  1617.         if ($this->getHash() === $_ENV['EF_PORTAL_SETTINGS'])
  1618.         {
  1619.             return $this->getDomain() . '/reset/haslo/' $confirmationToken;
  1620.         }
  1621.         if ($this->isNetflixPortal)
  1622.         {
  1623.             switch ($locale)
  1624.             {
  1625.                 case 'en':
  1626.                     $routeTranslation 'activation';
  1627.                     break;
  1628.                 case 'es':
  1629.                     $routeTranslation 'activacion';
  1630.                     break;
  1631.                 default:
  1632.                     $routeTranslation 'aktywacja';
  1633.             }
  1634.             return $this->getDomain() . '/'$routeTranslation'/' $confirmationToken;
  1635.         }
  1636.         if ($this->getIsUniqskillsPortal())
  1637.         {
  1638.             return 'https://' $this->getDomain() . '/' $locale '/reset/password/' $confirmationToken;
  1639.         }
  1640.         if ($this->getOrderType()->getName() === 'focus')
  1641.         {
  1642.             return $this->getDomain() . '/ustaw-haslo/' $confirmationToken;
  1643.         }
  1644.         if ($this->getHash() === PortalHashes::ZAUFANY_TERAPEUTA)
  1645.         {
  1646.             return $this->getDomain() . '/reset-password/' $confirmationToken;
  1647.         }
  1648.         return $this->getDomain() . '/gos/resetting/password/' $confirmationToken;
  1649.     }
  1650.     /**
  1651.      * @return Collection|ProductVariantPack[]
  1652.      */
  1653.     public function getProductVariantPacks(): Collection
  1654.     {
  1655.         return $this->productVariantPacks;
  1656.     }
  1657.     public function addProductVariantPack(ProductVariantPack $productVariantPack): self
  1658.     {
  1659.         if (!$this->productVariantPacks->contains($productVariantPack)) {
  1660.             $this->productVariantPacks[] = $productVariantPack;
  1661.             $productVariantPack->addPortalSetting($this);
  1662.         }
  1663.         return $this;
  1664.     }
  1665.     public function removeProductVariantPack(ProductVariantPack $productVariantPack): self
  1666.     {
  1667.         if ($this->productVariantPacks->contains($productVariantPack)) {
  1668.             $this->productVariantPacks->removeElement($productVariantPack);
  1669.             $productVariantPack->removePortalSetting($this);
  1670.         }
  1671.         return $this;
  1672.     }
  1673.     /**
  1674.      * @return Collection|UserPosition[]
  1675.      */
  1676.     public function getPositions(): Collection
  1677.     {
  1678.         return $this->positions;
  1679.     }
  1680.     public function addPosition(UserPosition $position): self
  1681.     {
  1682.         if (!$this->positions->contains($position)) {
  1683.             $this->positions[] = $position;
  1684.             $position->addPortalSetting($this);
  1685.         }
  1686.         return $this;
  1687.     }
  1688.     public function removePosition(UserPosition $position): self
  1689.     {
  1690.         if ($this->positions->contains($position)) {
  1691.             $this->positions->removeElement($position);
  1692.             $position->removePortalSetting($this);
  1693.         }
  1694.         return $this;
  1695.     }
  1696.     public function hasPositions(): bool
  1697.     {
  1698.         return !$this->getPositions()->isEmpty();
  1699.     }
  1700.     public function getSortedPositions(): ArrayCollection
  1701.     {
  1702.         $positions $this->getPositions()->toArray();
  1703.         $positionsOrder $this->getPositionsOrder();
  1704.         if ($positionsOrder !== null) {
  1705.             usort($positions, static function($a$b) use ($positionsOrder) {
  1706.                 $posA array_search($a->getId(), $positionsOrderfalse);
  1707.                 $posB array_search($b->getId(), $positionsOrderfalse);
  1708.                 return $posA $posB;
  1709.             });
  1710.         }
  1711.         return new ArrayCollection($positions);
  1712.     }
  1713.     public function getIsNetflixPortal(): ?bool
  1714.     {
  1715.         return $this->isNetflixPortal;
  1716.     }
  1717.     public function setIsNetflixPortal(?bool $isNetflixPortal): self
  1718.     {
  1719.         $this->isNetflixPortal $isNetflixPortal;
  1720.         return $this;
  1721.     }
  1722.     public function getIsPresale(): ?bool
  1723.     {
  1724.         return $this->isPresale;
  1725.     }
  1726.     public function setIsPresale(bool $isPresale): self
  1727.     {
  1728.         $this->isPresale $isPresale;
  1729.         return $this;
  1730.     }
  1731.     public function getIsSimplePrice(): ?bool
  1732.     {
  1733.         return $this->isSimplePrice;
  1734.     }
  1735.     public function setIsSimplePrice(bool $isSimplePrice): self
  1736.     {
  1737.         $this->isSimplePrice $isSimplePrice;
  1738.         return $this;
  1739.     }
  1740.     /**
  1741.      * @return Collection|Newsletter[]
  1742.      */
  1743.     public function getNewsletters(): Collection
  1744.     {
  1745.         return $this->newsletters;
  1746.     }
  1747.     public function addNewsletter(Newsletter $newsletter): self
  1748.     {
  1749.         if (!$this->newsletters->contains($newsletter)) {
  1750.             $this->newsletters[] = $newsletter;
  1751.             $newsletter->setPortalSettings($this);
  1752.         }
  1753.         return $this;
  1754.     }
  1755.     public function removeNewsletter(Newsletter $newsletter): self
  1756.     {
  1757.         if ($this->newsletters->contains($newsletter)) {
  1758.             $this->newsletters->removeElement($newsletter);
  1759.             // set the owning side to null (unless already changed)
  1760.             if ($newsletter->getPortalSettings() === $this) {
  1761.                 $newsletter->setPortalSettings(null);
  1762.             }
  1763.         }
  1764.         return $this;
  1765.     }
  1766.     public function getRedirectAfterLogin(): ?string
  1767.     {
  1768.         return $this->redirectAfterLogin;
  1769.     }
  1770.     public function setRedirectAfterLogin(?string $redirectAfterLogin): self
  1771.     {
  1772.         $this->redirectAfterLogin $redirectAfterLogin;
  1773.         return $this;
  1774.     }
  1775.     public function getMessageAfterLogin(): ?string
  1776.     {
  1777.         return $this->messageAfterLogin;
  1778.     }
  1779.     public function setMessageAfterLogin(?string $messageAfterLogin): self
  1780.     {
  1781.         $this->messageAfterLogin $messageAfterLogin;
  1782.         return $this;
  1783.     }
  1784.     public function getMessageTimeAfterLogin(): ?int
  1785.     {
  1786.         return $this->messageTimeAfterLogin;
  1787.     }
  1788.     public function setMessageTimeAfterLogin(?int $messageTimeAfterLogin): self
  1789.     {
  1790.         $this->messageTimeAfterLogin $messageTimeAfterLogin;
  1791.         return $this;
  1792.     }
  1793.     /**
  1794.      * @return Collection|UserFirstLoginInfo[]
  1795.      */
  1796.     public function getUserFirstLoginInfos(): Collection
  1797.     {
  1798.         return $this->userFirstLoginInfos;
  1799.     }
  1800.     public function addUserFirstLoginInfo(UserFirstLoginInfo $userFirstLoginInfo): self
  1801.     {
  1802.         if (!$this->userFirstLoginInfos->contains($userFirstLoginInfo)) {
  1803.             $this->userFirstLoginInfos[] = $userFirstLoginInfo;
  1804.             $userFirstLoginInfo->setPortal($this);
  1805.         }
  1806.         return $this;
  1807.     }
  1808.     public function removeUserFirstLoginInfo(UserFirstLoginInfo $userFirstLoginInfo): self
  1809.     {
  1810.         if ($this->userFirstLoginInfos->contains($userFirstLoginInfo)) {
  1811.             $this->userFirstLoginInfos->removeElement($userFirstLoginInfo);
  1812.             // set the owning side to null (unless already changed)
  1813.             if ($userFirstLoginInfo->getPortal() === $this) {
  1814.                 $userFirstLoginInfo->setPortal(null);
  1815.             }
  1816.         }
  1817.         return $this;
  1818.     }
  1819.     public function getDeviceAuthNeeded(): ?bool
  1820.     {
  1821.         return $this->deviceAuthNeeded;
  1822.     }
  1823.     public function setDeviceAuthNeeded(?bool $deviceAuthNeeded): self
  1824.     {
  1825.         $this->deviceAuthNeeded $deviceAuthNeeded;
  1826.         return $this;
  1827.     }
  1828.     public function getSender(): ?string
  1829.     {
  1830.         return $this->sender;
  1831.     }
  1832.     public function setSender(?string $sender): self
  1833.     {
  1834.         $this->sender $sender;
  1835.         return $this;
  1836.     }
  1837.     public function getIsCmsPortal(): ?bool
  1838.     {
  1839.         return $this->isCmsPortal;
  1840.     }
  1841.     public function setIsCmsPortal(?bool $isCmsPortal): self
  1842.     {
  1843.         $this->isCmsPortal $isCmsPortal;
  1844.         return $this;
  1845.     }
  1846.     public function getVirtualCurrency(): ?VirtualCurrency
  1847.     {
  1848.         return $this->virtualCurrency;
  1849.     }
  1850.     public function setVirtualCurrency(?VirtualCurrency $virtualCurrency): self
  1851.     {
  1852.         $this->virtualCurrency $virtualCurrency;
  1853.         return $this;
  1854.     }
  1855.     public function getMultiAccessFromMaxUser(): ?bool
  1856.     {
  1857.         return $this->multiAccessFromMaxUser;
  1858.     }
  1859.     public function setMultiAccessFromMaxUser(?bool $multiAccessFromMaxUser): self
  1860.     {
  1861.         $this->multiAccessFromMaxUser $multiAccessFromMaxUser;
  1862.         return $this;
  1863.     }
  1864.     public function getEnableNewBasket(): ?bool
  1865.     {
  1866.         return $this->enableNewBasket;
  1867.     }
  1868.     public function setEnableNewBasket(?bool $enableNewBasket): self
  1869.     {
  1870.         $this->enableNewBasket $enableNewBasket;
  1871.         return $this;
  1872.     }
  1873.     /**
  1874.      * @return Collection|Cart[]
  1875.      */
  1876.     public function getCarts(): Collection
  1877.     {
  1878.         return $this->carts;
  1879.     }
  1880.     public function addCart(Cart $cart): self
  1881.     {
  1882.         if (!$this->carts->contains($cart)) {
  1883.             $this->carts[] = $cart;
  1884.             $cart->setPortalSettings($this);
  1885.         }
  1886.         return $this;
  1887.     }
  1888.     public function removeCart(Cart $cart): self
  1889.     {
  1890.         if ($this->carts->contains($cart)) {
  1891.             $this->carts->removeElement($cart);
  1892.             // set the owning side to null (unless already changed)
  1893.             if ($cart->getPortalSettings() === $this) {
  1894.                 $cart->setPortalSettings(null);
  1895.             }
  1896.         }
  1897.         return $this;
  1898.     }
  1899.     public function getPriceAfterFreePostageCost(): ?float
  1900.     {
  1901.         return $this->priceAfterFreePostageCost;
  1902.     }
  1903.     public function setPriceAfterFreePostageCost(?float $priceAfterFreePostageCost): self
  1904.     {
  1905.         $this->priceAfterFreePostageCost $priceAfterFreePostageCost;
  1906.         return $this;
  1907.     }
  1908.     public function getPriceAfterFreePostageCostType(): ?string
  1909.     {
  1910.         return $this->priceAfterFreePostageCostType;
  1911.     }
  1912.     public function setPriceAfterFreePostageCostType(?string $priceAfterFreePostageCostType): self
  1913.     {
  1914.         $this->priceAfterFreePostageCostType $priceAfterFreePostageCostType;
  1915.         return $this;
  1916.     }
  1917.     public function showGrossPriceInOrderConfirmation(): bool
  1918.     {
  1919.         return $this->showGrossPrice;
  1920.     }
  1921.     public function getGtm(): ?string
  1922.     {
  1923.         return $this->gtm;
  1924.     }
  1925.     public function setGtm(?string $gtm): self
  1926.     {
  1927.         $this->gtm $gtm;
  1928.         return $this;
  1929.     }
  1930.     public function getPasswordAdditionalContent(): ?string
  1931.     {
  1932.         return $this->passwordAdditionalContent;
  1933.     }
  1934.     public function setPasswordAdditionalContent(?string $passwordAdditionalContent): self
  1935.     {
  1936.         $this->passwordAdditionalContent $passwordAdditionalContent;
  1937.         return $this;
  1938.     }
  1939.     public function getLeadingColor4(): ?string
  1940.     {
  1941.         return $this->leadingColor4;
  1942.     }
  1943.     public function setLeadingColor4(?string $leadingColor4): self
  1944.     {
  1945.         $this->leadingColor4 $leadingColor4;
  1946.         return $this;
  1947.     }
  1948.     public function getUserbarColor(): ?string
  1949.     {
  1950.         return $this->checkColor($this->userbarColor);
  1951.     }
  1952.     public function setUserbarColor(?string $userbarColor): self
  1953.     {
  1954.         $this->userbarColor $userbarColor;
  1955.         return $this;
  1956.     }
  1957.     public function getIsBookcaseVisibleInUserbar(): ?bool
  1958.     {
  1959.         return $this->isBookcaseVisibleInUserbar;
  1960.     }
  1961.     public function setIsBookcaseVisibleInUserbar(bool $isBookcaseVisibleInUserbar): self
  1962.     {
  1963.         $this->isBookcaseVisibleInUserbar $isBookcaseVisibleInUserbar;
  1964.         return $this;
  1965.     }
  1966.     public function getIsShelfVisibleInUserbar(): ?bool
  1967.     {
  1968.         return $this->isShelfVisibleInUserbar;
  1969.     }
  1970.     public function setIsShelfVisibleInUserbar(bool $isShelfVisibleInUserbar): self
  1971.     {
  1972.         $this->isShelfVisibleInUserbar $isShelfVisibleInUserbar;
  1973.         return $this;
  1974.     }
  1975.     public function getUserbarHtml(): ?string
  1976.     {
  1977.         return $this->userbarHtml;
  1978.     }
  1979.     public function setUserbarHtml(?string $userbarHtml): self
  1980.     {
  1981.         $this->userbarHtml $userbarHtml;
  1982.         return $this;
  1983.     }
  1984.     public function getDisplayUserbar2(): ?bool
  1985.     {
  1986.         return $this->displayUserbar2;
  1987.     }
  1988.     public function setDisplayUserbar2(bool $displayUserbar2): self
  1989.     {
  1990.         $this->displayUserbar2 $displayUserbar2;
  1991.         return $this;
  1992.     }
  1993.     // TESTS A/B
  1994.     public function getTestPriceAfterFreePostageCost(): ?float
  1995.     {
  1996.         return $this->testPriceAfterFreePostageCost;
  1997.     }
  1998.     public function setTestPriceAfterFreePostageCost(?float $testPriceAfterFreePostageCost): self
  1999.     {
  2000.         $this->testPriceAfterFreePostageCost $testPriceAfterFreePostageCost;
  2001.         return $this;
  2002.     }
  2003.     public function getTestUserbarHtml(): ?string
  2004.     {
  2005.         return $this->testUserbarHtml;
  2006.     }
  2007.     public function setTestUserbarHtml(?string $testUserbarHtml): self
  2008.     {
  2009.         $this->testUserbarHtml $testUserbarHtml;
  2010.         return $this;
  2011.     }
  2012.     // END OF TESTS A/B
  2013.     public function getLifetimeAccess(): ?bool
  2014.     {
  2015.         return $this->lifetimeAccess;
  2016.     }
  2017.     public function setLifetimeAccess(?bool $lifetimeAccess): self
  2018.     {
  2019.         $this->lifetimeAccess $lifetimeAccess;
  2020.         return $this;
  2021.     }
  2022.     public function getFbPixelId(): ?string
  2023.     {
  2024.         return $this->fbPixelId;
  2025.     }
  2026.     public function setFbPixelId(?string $fbPixelId): self
  2027.     {
  2028.         $this->fbPixelId $fbPixelId;
  2029.         return $this;
  2030.     }
  2031.     public function getFbPixelAccessToken(): ?string
  2032.     {
  2033.         return $this->fbPixelAccessToken;
  2034.     }
  2035.     public function setFbPixelAccessToken(?string $fbPixelAccessToken): self
  2036.     {
  2037.         $this->fbPixelAccessToken $fbPixelAccessToken;
  2038.         return $this;
  2039.     }
  2040.     public function getHideFieldPosition(): ?bool
  2041.     {
  2042.         return $this->hideFieldPosition;
  2043.     }
  2044.     public function setHideFieldPosition(?bool $hideFieldPosition): self
  2045.     {
  2046.         $this->hideFieldPosition $hideFieldPosition;
  2047.         return $this;
  2048.     }
  2049.     public function isRedirectingToFocus(): ?bool
  2050.     {
  2051.         return $this->redirectingToFocus;
  2052.     }
  2053.     public function setRedirectingToFocus(bool $redirectingToFocus): self
  2054.     {
  2055.         $this->redirectingToFocus $redirectingToFocus;
  2056.         return $this;
  2057.     }
  2058.     public function getShowGrossPrice(): ?bool
  2059.     {
  2060.         return $this->showGrossPrice;
  2061.     }
  2062.     public function setShowGrossPrice(bool $showGrossPrice): self
  2063.     {
  2064.         $this->showGrossPrice $showGrossPrice;
  2065.         return $this;
  2066.     }
  2067.     /**
  2068.      * Set csMail
  2069.      *
  2070.      * @param string $csMail
  2071.      * @return PortalSettings
  2072.      */
  2073.     public function setCsMail(string $csMail): self
  2074.     {
  2075.         $this->csMail $csMail;
  2076.         return $this;
  2077.     }
  2078.     /**
  2079.      * Get csMail
  2080.      *
  2081.      * @return string|null
  2082.      */
  2083.     public function getCsMail(): ?string
  2084.     {
  2085.         return $this->csMail;
  2086.     }
  2087.     public function getIsPhoneRequired(): bool
  2088.     {
  2089.         return $this->isPhoneRequired;
  2090.     }
  2091.     public function setIsPhoneRequired(bool $isPhoneRequired): self
  2092.     {
  2093.         $this->isPhoneRequired $isPhoneRequired;
  2094.         return $this;
  2095.     }
  2096.     public function getWebeMidNumber(): ?int
  2097.     {
  2098.         return $this->webeMidNumber;
  2099.     }
  2100.     public function setWebeMidNumber(?int $webeMidNumber): self
  2101.     {
  2102.         $this->webeMidNumber $webeMidNumber;
  2103.         return $this;
  2104.     }
  2105.     public function getDefaultPaymentSystem(): ?PaymentSystem
  2106.     {
  2107.         return $this->defaultPaymentSystem;
  2108.     }
  2109.     public function setDefaultPaymentSystem(?PaymentSystem $defaultPaymentSystem): self
  2110.     {
  2111.         $this->defaultPaymentSystem $defaultPaymentSystem;
  2112.         return $this;
  2113.     }
  2114.     public function getUseFbPixelInIframe(): ?bool
  2115.     {
  2116.         return $this->useFbPixelInIframe;
  2117.     }
  2118.     public function setUseFbPixelInIframe(?bool $useFbPixelInIframe): self
  2119.     {
  2120.         $this->useFbPixelInIframe $useFbPixelInIframe;
  2121.         return $this;
  2122.     }
  2123.     public function getDefaultCartClientType(): ?ClientType
  2124.     {
  2125.         return $this->defaultCartClientType;
  2126.     }
  2127.     public function setDefaultCartClientType(?ClientType $defaultCartClientType): self
  2128.     {
  2129.         $this->defaultCartClientType $defaultCartClientType;
  2130.         return $this;
  2131.     }
  2132.     /**
  2133.      * @JMS\VirtualProperty("defaultCartClientTypeSlug")
  2134.      * @JMS\Type("string")
  2135.      * @JMS\Groups({"PortalSettings"})
  2136.      */
  2137.     public function getDefaultCartClientTypeSlug(): string
  2138.     {
  2139.         return (string)$this->defaultCartClientType->getSlug();
  2140.     }
  2141.     public function getIsPaymentBeforeConfirmation(): ?bool
  2142.     {
  2143.         return $this->isPaymentBeforeConfirmation;
  2144.     }
  2145.     public function setIsPaymentBeforeConfirmation(bool $isPaymentBeforeConfirmation): self
  2146.     {
  2147.         $this->isPaymentBeforeConfirmation $isPaymentBeforeConfirmation;
  2148.         return $this;
  2149.     }
  2150.     /**
  2151.      * @return Collection|Honorifics[]
  2152.      */
  2153.     public function getHonorifics(): Collection
  2154.     {
  2155.         return $this->honorifics;
  2156.     }
  2157.     public function addHonorific(Honorifics $honorific): self
  2158.     {
  2159.         if (!$this->honorifics->contains($honorific)) {
  2160.             $this->honorifics[] = $honorific;
  2161.             $honorific->addPortalSetting($this);
  2162.         }
  2163.         return $this;
  2164.     }
  2165.     public function removeHonorific(Honorifics $honorific): self
  2166.     {
  2167.         if ($this->honorifics->contains($honorific)) {
  2168.             $this->honorifics->removeElement($honorific);
  2169.             $honorific->removePortalSetting($this);
  2170.         }
  2171.         return $this;
  2172.     }
  2173.     public function getPaymentReward(): ?bool
  2174.     {
  2175.         return $this->paymentReward;
  2176.     }
  2177.     public function setPaymentReward(bool $paymentReward): self
  2178.     {
  2179.         $this->paymentReward $paymentReward;
  2180.         return $this;
  2181.     }
  2182.     public function getPaymentRewardContent(): ?string
  2183.     {
  2184.         return $this->paymentRewardContent;
  2185.     }
  2186.     public function setPaymentRewardContent(?string $paymentRewardContent): self
  2187.     {
  2188.         $this->paymentRewardContent $paymentRewardContent;
  2189.         return $this;
  2190.     }
  2191.     public function getPaymentRewardDeadline(): ?int
  2192.     {
  2193.         return $this->paymentRewardDeadline;
  2194.     }
  2195.     public function setPaymentRewardDeadline(?int $paymentRewardDeadline): self
  2196.     {
  2197.         $this->paymentRewardDeadline $paymentRewardDeadline;
  2198.         return $this;
  2199.     }
  2200.     public function getCartTemplate(): ?int
  2201.     {
  2202.         return $this->cartTemplate;
  2203.     }
  2204.     public function setCartTemplate(?int $cartTemplate): self
  2205.     {
  2206.         $this->cartTemplate $cartTemplate;
  2207.         return $this;
  2208.     }
  2209.     /**
  2210.      * @return Collection|User[]
  2211.      */
  2212.     public function getUsers(): Collection
  2213.     {
  2214.         return $this->users;
  2215.     }
  2216.     public function addUser(User $user): self
  2217.     {
  2218.         if (!$this->users->contains($user)) {
  2219.             $this->users[] = $user;
  2220.             $user->addUsingPortal($this);
  2221.         }
  2222.         return $this;
  2223.     }
  2224.     public function removeUser(User $user): self
  2225.     {
  2226.         if ($this->users->contains($user)) {
  2227.             $this->users->removeElement($user);
  2228.             $user->removeUsingPortal($this);
  2229.         }
  2230.         return $this;
  2231.     }
  2232.     public function getUseCacheInAccess(): ?bool
  2233.     {
  2234.         return $this->useCacheInAccess;
  2235.     }
  2236.     public function setUseCacheInAccess(?bool $useCacheInAccess): self
  2237.     {
  2238.         $this->useCacheInAccess $useCacheInAccess;
  2239.         return $this;
  2240.     }
  2241.     public function getOrderConfirmationAdditionalContent(): ?string
  2242.     {
  2243.         return $this->orderConfirmationAdditionalContent;
  2244.     }
  2245.     public function setOrderConfirmationAdditionalContent(?string $orderConfirmationAdditionalContent): self
  2246.     {
  2247.         $this->orderConfirmationAdditionalContent $orderConfirmationAdditionalContent;
  2248.         return $this;
  2249.     }
  2250.     public function getAdditionalContentForMail(): ?string
  2251.     {
  2252.         return $this->additionalContentForMail;
  2253.     }
  2254.     public function setAdditionalContentForMail(?string $additionalContentForMail): self
  2255.     {
  2256.         $this->additionalContentForMail $additionalContentForMail;
  2257.         return $this;
  2258.     }
  2259.     public function getMatomoSiteId(): ?string
  2260.     {
  2261.         return $this->matomoSiteId;
  2262.     }
  2263.     public function setMatomoSiteId(?string $matomoSiteId): self
  2264.     {
  2265.         $this->matomoSiteId $matomoSiteId;
  2266.         return $this;
  2267.     }
  2268.     public function getPositionsOrder(): ?array
  2269.     {
  2270.         return $this->positionsOrder;
  2271.     }
  2272.     public function setPositionsOrder(?array $positionsOrder): self
  2273.     {
  2274.         $this->positionsOrder $positionsOrder;
  2275.         return $this;
  2276.     }
  2277.     /**
  2278.      * @return Collection|ContactSegmentation[]
  2279.      */
  2280.     public function getContactSegmentations(): Collection
  2281.     {
  2282.         return $this->contactSegmentations;
  2283.     }
  2284.     public function addContactSegmentation(ContactSegmentation $contactSegmentation): self
  2285.     {
  2286.         if (!$this->contactSegmentations->contains($contactSegmentation)) {
  2287.             $this->contactSegmentations[] = $contactSegmentation;
  2288.         }
  2289.         return $this;
  2290.     }
  2291.     public function removeContactSegmentation(ContactSegmentation $contactSegmentation): self
  2292.     {
  2293.         if ($this->contactSegmentations->contains($contactSegmentation)) {
  2294.             $this->contactSegmentations->removeElement($contactSegmentation);
  2295.         }
  2296.         return $this;
  2297.     }
  2298.     public function getSalesmanagoTags(): array
  2299.     {
  2300.         return array_values(
  2301.             $this->contactSegmentations
  2302.                 ->map(function (ContactSegmentation $seg) {
  2303.                     return $seg->getSalesmanagoTag();
  2304.                 })
  2305.                 ->filter(function (?string $tag) {
  2306.                     return $tag !== null && $tag !== '';
  2307.                 })
  2308.                 ->toArray()
  2309.         );
  2310.     }
  2311.     public function getSalesManagoSourceTag(): ?string
  2312.     {
  2313.         return null;
  2314.     }
  2315.     public function isEventPortal(): bool
  2316.     {
  2317.         return $this->getEmailSettings() && $this->getEmailSettings()->getName() === 'Event';
  2318.     }
  2319.     public function getOnboardingSettings(): ?OnboardingSettings
  2320.     {
  2321.         return $this->onboardingSettings;
  2322.     }
  2323.     public function setOnboardingSettings(OnboardingSettings $onboardingSettings): self
  2324.     {
  2325.         $this->onboardingSettings $onboardingSettings;
  2326.         // set the owning side of the relation if necessary
  2327.         if ($onboardingSettings->getPortalSettings() !== $this) {
  2328.             $onboardingSettings->setPortalSettings($this);
  2329.         }
  2330.         return $this;
  2331.     }
  2332.     public function isOnboardingNotificationsEnabled(): bool
  2333.     {
  2334.         return $this->getOnboardingSettings() && $this->getOnboardingSettings()->getIsActive();
  2335.     }
  2336.     public function getOnboardingPollLink(): ?string
  2337.     {
  2338.         return $this->getOnboardingSettings() ? $this->getOnboardingSettings()->getPollLink() : null;
  2339.     }
  2340.     public function getOnboardingEditorialEmail(): ?string
  2341.     {
  2342.         return $this->getOnboardingSettings() ? $this->getOnboardingSettings()->getEditorialEmail() : null;
  2343.     }
  2344. }