src/CmsBundle/Entity/Settings.php line 2329

Open in your IDE?
  1. <?php
  2. namespace App\CmsBundle\Entity;
  3. use Doctrine\Common\Collections\Collection;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. /**
  7.  * Settings
  8.  *
  9.  * @ORM\Table(name="settings", options={"collate"="utf8mb4_unicode_ci", "charset"="utf8mb4"})
  10.  * @ORM\Entity(repositoryClass="App\CmsBundle\Repository\SettingsRepository")
  11.  */
  12. class Settings
  13. {
  14.     /**
  15.      * @var string
  16.      *
  17.      * @ORM\Column(name="label", type="string", length=150, nullable=true)
  18.      */
  19.     private $label;
  20.     /**
  21.      * @var string
  22.      *
  23.      * @ORM\Column(type="string", length=40, nullable=true)
  24.      */
  25.     private $host;
  26.     /**
  27.      * @var string
  28.      *
  29.      * @ORM\Column(type="string", length=30, nullable=true)
  30.      */
  31.     private $override_key;
  32.     /**
  33.      * @var string
  34.      *
  35.      * @ORM\Column(type="string", nullable=true)
  36.      */
  37.     private $site_key;
  38.     /**
  39.      * @var string
  40.      *
  41.      * @ORM\Column(type="string", length=15, nullable=true)
  42.      */
  43.     private $base_uri;
  44.     /**
  45.      * @var string
  46.      *
  47.      * @ORM\Column(name="tagline", type="string", length=150, nullable=true)
  48.      */
  49.     private $tagline;
  50.     /**
  51.      * @var \App\CmsBundle\Entity\Media
  52.      *
  53.      * @ORM\ManyToOne(targetEntity="App\CmsBundle\Entity\Media")
  54.      * @ORM\JoinColumns({
  55.      *   @ORM\JoinColumn(name="logo", referencedColumnName="id", onDelete="SET NULL")
  56.      * })
  57.      */
  58.     private $logo;
  59.     /**
  60.      * @var \App\CmsBundle\Entity\Media
  61.      *
  62.      * @ORM\ManyToOne(targetEntity="App\CmsBundle\Entity\Media")
  63.      * @ORM\JoinColumns({
  64.      *   @ORM\JoinColumn(name="logo_alt", referencedColumnName="id", onDelete="SET NULL")
  65.      * })
  66.      */
  67.     private $logo_alt;
  68.     /**
  69.      * @var \App\CmsBundle\Entity\Media
  70.      *
  71.      * @ORM\ManyToOne(targetEntity="App\CmsBundle\Entity\Media")
  72.      * @ORM\JoinColumns({
  73.      *   @ORM\JoinColumn(name="background", referencedColumnName="id", onDelete="SET NULL")
  74.      * })
  75.      */
  76.     private $background;
  77.     /**
  78.      * @var \App\CmsBundle\Entity\Media
  79.      *
  80.      * @ORM\ManyToOne(targetEntity="App\CmsBundle\Entity\Media")
  81.      * @ORM\JoinColumns({
  82.      *   @ORM\JoinColumn(name="service_background", referencedColumnName="id", onDelete="SET NULL")
  83.      * })
  84.      */
  85.     private $service_background;
  86.     /**
  87.      * @var \App\CmsBundle\Entity\Media
  88.      *
  89.      * @ORM\ManyToOne(targetEntity="App\CmsBundle\Entity\Media")
  90.      * @ORM\JoinColumns({
  91.      *   @ORM\JoinColumn(name="mail_header", referencedColumnName="id", onDelete="SET NULL")
  92.      * })
  93.      */
  94.     private $mail_header;
  95.     /**
  96.      * @var string
  97.      *
  98.      * @ORM\Column(name="admin_email", type="string", length=50, nullable=true)
  99.      */
  100.     private $adminEmail;
  101.     /**
  102.      * @var string
  103.      *
  104.      * @ORM\Column(name="admin_email_from", type="string", length=80, nullable=true)
  105.      */
  106.     private $adminEmailFrom;
  107.     /**
  108.      * @var string
  109.      *
  110.      * @ORM\Column(name="system_email", type="string", length=45, nullable=true)
  111.      */
  112.     private $systemEmail;
  113.     /**
  114.      * @var string
  115.      *
  116.      * @ORM\Column(name="system_email_from", type="string", length=45, nullable=true)
  117.      */
  118.     private $systemEmailFrom;
  119.     /**
  120.      * @var string
  121.      *
  122.      * @ORM\Column(name="maintenance", type="string", nullable=true)
  123.      */
  124.     private $maintenance;
  125.     /**
  126.      * @var string
  127.      *
  128.      * @ORM\Column(name="inline_edit", type="string", nullable=true)
  129.      */
  130.     private $inlineEdit;
  131.     /**
  132.      * @var string
  133.      *
  134.      * @ORM\Column(name="maintenance_message", type="text", nullable=true)
  135.      */
  136.     private $maintenance_message;
  137.     /**
  138.      * @var string
  139.      *
  140.      * @ORM\Column(name="price_include_tax", type="string", nullable=true)
  141.      */
  142.     private $priceIncludeTax;
  143.     /**
  144.      * @var string
  145.      *
  146.      * @ORM\Column(type="string", length=255, nullable=true)
  147.      */
  148.     protected $tinypng_api 'DyWNlDgmWrQ75K6CCMcF91sDvgthtJFM';
  149.     /**
  150.      * @var string
  151.      *
  152.      * @ORM\Column(name="company", type="string", length=150, nullable=true)
  153.      */
  154.     protected $company '';
  155.     /**
  156.      * @var string
  157.      *
  158.      * @ORM\Column(name="phone", type="string", length=30, nullable=true)
  159.      */
  160.     protected $phone '';
  161.     /**
  162.      * @var string
  163.      *
  164.      * @ORM\Column(name="address", type="string", length=255, nullable=true)
  165.      */
  166.     protected $address '';
  167.     /**
  168.      * @var string
  169.      *
  170.      * @ORM\Column(name="postalcode", type="string", length=100, nullable=true)
  171.      */
  172.     protected $postalcode '';
  173.     /**
  174.      * @var string
  175.      *
  176.      * @ORM\Column(name="place", type="string", length=150, nullable=true)
  177.      */
  178.     protected $place '';
  179.     /**
  180.      * @var string
  181.      *
  182.      * @ORM\Column(name="state", type="string", length=100, nullable=true)
  183.      */
  184.     protected $state '';
  185.     /**
  186.      * @var string
  187.      *
  188.      * @ORM\Column(name="country", type="string", length=30, nullable=true)
  189.      */
  190.     protected $country '';
  191.     /**
  192.      * @var integer
  193.      *
  194.      * @ORM\Column(name="kvk", type="integer", length=30, nullable=true)
  195.      */
  196.     protected $kvk null;
  197.     /**
  198.      * @var string
  199.      *
  200.      * @ORM\Column(name="kvk_loc", type="string", length=200, nullable=true)
  201.      */
  202.     protected $kvk_location null;
  203.     /**
  204.      * @var string
  205.      *
  206.      * @ORM\Column(name="tax_no", type="string", length=30, nullable=true)
  207.      */
  208.     protected $taxNo '';
  209.     /**
  210.      * @var string
  211.      *
  212.      * @ORM\Column(type="string", length=30, nullable=true)
  213.      */
  214.     protected $bic '';
  215.     /**
  216.      * @var string
  217.      *
  218.      * @ORM\Column(type="string", length=30, nullable=true)
  219.      */
  220.     protected $iban '';
  221.     /**
  222.      * @var integer
  223.      *
  224.      * @ORM\Column(name="inv_prd", type="integer", length=30, nullable=true)
  225.      */
  226.     protected $invoice_period 0;
  227.     /**
  228.      * @var string
  229.      *
  230.      * @ORM\Column(type="string", length=100, nullable=true)
  231.      */
  232.     private $twitter;
  233.      /**
  234.      * @var text
  235.      *
  236.      * @ORM\Column(type="string", length=255, nullable=true)
  237.      */
  238.     protected $api_postcode_token false;
  239.     /**
  240.      * @var string
  241.      *
  242.      * @ORM\Column(type="string", length=100, nullable=true)
  243.      */
  244.     private $facebook;
  245.     /**
  246.      * @var string
  247.      *
  248.      * @ORM\Column(type="string", length=100, nullable=true)
  249.      */
  250.     private $facebook_pixel;
  251.     /**
  252.      * @var string
  253.      *
  254.      * @ORM\Column(type="string", length=100, nullable=true)
  255.      */
  256.     private $instagram;
  257.     /**
  258.      * @var string
  259.      *
  260.      * @ORM\Column(type="string", length=100, nullable=true)
  261.      */
  262.     private $youtube;
  263.     /**
  264.      * @var string
  265.      *
  266.      * @ORM\Column(type="string", length=100, nullable=true)
  267.      */
  268.     private $linkedin;
  269.     /**
  270.      * @var string
  271.      *
  272.      * @ORM\Column(type="array", nullable=true)
  273.      */
  274.     private $layout_include_js;
  275.     /**
  276.      * @var string
  277.      *
  278.      * @ORM\Column(type="array", nullable=true)
  279.      */
  280.     private $layout_include_css;
  281.     /**
  282.      * @var string
  283.      *
  284.      * @ORM\Column(type="array", nullable=true)
  285.      */
  286.     private $layout_include_font;
  287.     /**
  288.      * @var string
  289.      *
  290.      * @ORM\Column(type="string", length=100, nullable=true)
  291.      */
  292.     private $default_template;
  293.     /**
  294.      * @var integer
  295.      *
  296.      * @ORM\Column(name="id", type="integer", nullable=true)
  297.      * @ORM\Id
  298.      * @ORM\GeneratedValue(strategy="AUTO")
  299.      */
  300.     private $id;
  301.     /**
  302.      * @var string
  303.      *
  304.      * @ORM\Column(type="text", nullable=true)
  305.      */
  306.     protected $restrict_access;
  307.     /**
  308.      * @var string
  309.      *
  310.      * @ORM\Column(type="text", nullable=true)
  311.      */
  312.     protected $restrict_access_deny;
  313.     /**
  314.      * @var string
  315.      *
  316.      * @ORM\Column(type="string", length=255, nullable=true)
  317.      */
  318.     private $restrict_access_type;
  319.     /**
  320.      * @var string
  321.      */
  322.     protected $mollie_api null;
  323.     /**
  324.      * @var string
  325.      *
  326.      * @ORM\Column(type="string", length=50, nullable=true)
  327.      */
  328.     protected $mollie_api_test '';
  329.     /**
  330.      * @var string
  331.      *
  332.      * @ORM\Column(type="string", length=50, nullable=true)
  333.      */
  334.     protected $mollie_api_live '';
  335.     /**
  336.      * @var boolean
  337.      *
  338.      * @ORM\Column(type="boolean", nullable=true)
  339.      */
  340.     protected $mollie_live false;
  341.     /**
  342.      * @var boolean
  343.      *
  344.      * @ORM\Column(type="boolean", nullable=true)
  345.      */
  346.     protected $mollie_enabled false;
  347.     /**
  348.      * @var boolean
  349.      *
  350.      * @ORM\Column(name="mollie_sub", type="boolean", nullable=true)
  351.      */
  352.     protected $mollie_subscription false;
  353.     /**
  354.      * @var boolean
  355.      *
  356.      * @ORM\Column(type="boolean", nullable=true)
  357.      */
  358.     protected $santander_loan_active false;
  359.     /**
  360.      * @var boolean
  361.      *
  362.      * @ORM\Column(type="boolean", nullable=true)
  363.      */
  364.     protected $santander_is_live false;
  365.     /**
  366.      * @var string
  367.      *
  368.      * @ORM\Column(type="string", length=100, nullable=true)
  369.      */
  370.     protected $santander_loan_api_test '';
  371.     /**
  372.      * @var string
  373.      *
  374.      * @ORM\Column(type="string", length=100, nullable=true)
  375.      */
  376.     protected $santander_loan_api_live '';
  377.     /**
  378.      * @var string
  379.      *
  380.      * @ORM\Column(type="string", length=100, nullable=true)
  381.      */
  382.     protected $buckaroo_website_key '';
  383.     /**
  384.      * @var string
  385.      *
  386.      * @ORM\Column(type="string", length=100, nullable=true)
  387.      */
  388.     protected $buckaroo_secret '';
  389.     /**
  390.      * @var boolean
  391.      *
  392.      * @ORM\Column(type="boolean", nullable=true)
  393.      */
  394.     protected $buckaroo_live false;
  395.     /**
  396.      * @var boolean
  397.      *
  398.      * @ORM\Column(type="boolean", nullable=true)
  399.      */
  400.     protected $buckaroo_enabled false;
  401.     /**
  402.      * @var string
  403.      *
  404.      * @ORM\Column(type="string", length=100, nullable=true)
  405.      */
  406.     protected $multisafepay_api '';
  407.     /**
  408.      * @var string
  409.      *
  410.      * @ORM\Column(type="string", length=100, nullable=true)
  411.      */
  412.     protected $multisafepay_api_test '';
  413.     /**
  414.      * @var boolean
  415.      *
  416.      * @ORM\Column(type="boolean", nullable=true)
  417.      */
  418.     protected $multisafepay_live false;
  419.     /**
  420.      * @var boolean
  421.      *
  422.      * @ORM\Column(type="boolean", nullable=true)
  423.      */
  424.     protected $multisafepay_enabled false;
  425.     /**
  426.      * @var boolean
  427.      *
  428.      * @ORM\Column(type="boolean", nullable=true)
  429.      */
  430.     protected $omnikassa_live false;
  431.     /**
  432.      * @var boolean
  433.      *
  434.      * @ORM\Column(type="boolean", nullable=true)
  435.      */
  436.     protected $omnikassa_enabled false;
  437.     /**
  438.      * @var string
  439.      *
  440.      * @ORM\Column(type="text", nullable=true)
  441.      */
  442.     protected $omnikassa_sign '';
  443.     /**
  444.      * @var string
  445.      *
  446.      * @ORM\Column(type="text", nullable=true)
  447.      */
  448.     protected $omnikassa_refresh '';
  449.     /**
  450.      * @var string
  451.      *
  452.      * @ORM\Column(type="text", nullable=true)
  453.      */
  454.     protected $omnikassa_sign_test '';
  455.     /**
  456.      * @var string
  457.      *
  458.      * @ORM\Column(type="text", nullable=true)
  459.      */
  460.     protected $omnikassa_refresh_test '';
  461.     /**
  462.      * @var string
  463.      */
  464.     protected $pay_api null;
  465.     /**
  466.      * @var string
  467.      *
  468.      * @ORM\Column(type="string", length=100, nullable=true)
  469.      */
  470.     protected $pay_service_id '';
  471.     /**
  472.      * @var string
  473.      *
  474.      * @ORM\Column(type="string", length=100, nullable=true)
  475.      */
  476.     protected $pay_api_test '';
  477.     /**
  478.      * @var string
  479.      *
  480.      * @ORM\Column(type="string", length=100, nullable=true)
  481.      */
  482.     protected $pay_api_live '';
  483.     /**
  484.      * @var boolean
  485.      *
  486.      * @ORM\Column(type="boolean", nullable=true)
  487.      */
  488.     protected $pay_live false;
  489.     /**
  490.      * @var boolean
  491.      *
  492.      * @ORM\Column(type="boolean", nullable=true)
  493.      */
  494.     protected $pay_enabled false;
  495.     /**
  496.      * @var string
  497.      *
  498.      * @ORM\Column(type="string", length=100, nullable=true)
  499.      */
  500.     protected $google_ua '';
  501.     /**
  502.      * @var string
  503.      *
  504.      * @ORM\Column(type="string", length=100, nullable=true)
  505.      */
  506.     protected $google_gtm '';
  507.     /**
  508.      * @var string
  509.      *
  510.      * @ORM\Column(type="string", length=100, nullable=true)
  511.      */
  512.     protected $google_g '';
  513.     /**
  514.      * @var string
  515.      *
  516.      * @ORM\Column(type="string", length=100, nullable=true)
  517.      */
  518.     protected $google_cc '';
  519.     /**
  520.      * @var integer
  521.      *
  522.      * @ORM\Column(name="captcha_treshold", type="integer", length=3, nullable=true)
  523.      */
  524.     protected $captcha_treshold 50;
  525.     /**
  526.      * @var string
  527.      *
  528.      * @ORM\Column(type="string", length=150, nullable=true)
  529.      */
  530.     protected $piwik_url '';
  531.     /**
  532.      * @var string
  533.      *
  534.      * @ORM\Column(type="string", length=50, nullable=true)
  535.      */
  536.     protected $piwik_api_hash '';
  537.     /**
  538.      * @var integer
  539.      *
  540.      * @ORM\Column(type="integer", length=5, nullable=true)
  541.      */
  542.     protected $piwik_site_id 1;
  543.     /**
  544.      * @var string
  545.      *
  546.      * @ORM\Column(type="string", length=250, nullable=true)
  547.      */
  548.     protected $piwik_container_hashs '';
  549.     /**
  550.      * @var boolean
  551.      *
  552.      * @ORM\Column(type="boolean", nullable=true)
  553.      */
  554.     protected $birthday_fields false;
  555.     /**
  556.      * @var boolean
  557.      *
  558.      * @ORM\Column(type="boolean", nullable=true)
  559.      */
  560.     protected $cache_invalidated false;
  561.     /**
  562.      * @var boolean
  563.      *
  564.      * @ORM\Column(type="boolean", nullable=true)
  565.      */
  566.     protected $custom_navigation false;
  567.     /**
  568.      * @var text
  569.      *
  570.      * @ORM\Column(type="text", nullable=true)
  571.      */
  572.     protected $footer_block_1 '';
  573.     /**
  574.      * @var text
  575.      *
  576.      * @ORM\Column(type="text", nullable=true)
  577.      */
  578.     protected $footer_block_2 '';
  579.     /**
  580.      * @var text
  581.      *
  582.      * @ORM\Column(type="text", nullable=true)
  583.      */
  584.     protected $footer_block_3 '';
  585.     /**
  586.      * @var text
  587.      *
  588.      * @ORM\Column(type="text", nullable=true)
  589.      */
  590.     protected $footer_block_4 '';
  591.     /**
  592.      * @var text
  593.      *
  594.      * @ORM\Column(type="text", nullable=true)
  595.      */
  596.     protected $footer_block_5 '';
  597.     /**
  598.      * @var boolean
  599.      *
  600.      * @ORM\Column(type="boolean", nullable=true)
  601.      */
  602.     protected $header_bar false;
  603.     /**
  604.      * @var text
  605.      *
  606.      * @ORM\Column(type="text", nullable=true)
  607.      */
  608.     protected $header_bar_left '';
  609.     /**
  610.      * @var text
  611.      *
  612.      * @ORM\Column(type="text", nullable=true)
  613.      */
  614.     protected $header_bar_right '';
  615.     /**
  616.      * @var boolean
  617.      *
  618.      * @ORM\Column(type="boolean", nullable=true)
  619.      */
  620.     protected $postnl_checker false;
  621.     /**
  622.      * @var text
  623.      *
  624.      * @ORM\Column(type="string", length=255, nullable=true)
  625.      */
  626.     protected $postnl_key false;
  627.     /**
  628.      * @var text
  629.      *
  630.      * @ORM\Column(type="string", length=255, nullable=true)
  631.      */
  632.     protected $postnl_secret_key false;
  633.     /**
  634.      * @var text
  635.      *
  636.      * @ORM\Column(type="text", nullable=true)
  637.      */
  638.     protected $uptime_robot_key '';
  639.     /**
  640.      * @ORM\ManyToOne(targetEntity="Language", inversedBy="settings")
  641.      * @ORM\JoinColumn(name="language_id", referencedColumnName="id", onDelete="CASCADE")
  642.      */
  643.     private $language;
  644.     /**
  645.      * @ORM\ManyToOne(targetEntity="Settings", inversedBy="linked")
  646.      * @ORM\JoinColumn(referencedColumnName="id", onDelete="CASCADE")
  647.      */
  648.     private $parent;
  649.     /**
  650.      * @ORM\OneToMany(targetEntity="Settings", mappedBy="parent")
  651.      */
  652.     protected $linked;
  653.     /**
  654.      * @var boolean
  655.      *
  656.      * @ORM\Column(type="boolean", nullable=true)
  657.      */
  658.     protected $snow false;
  659.     /**
  660.      * @var boolean
  661.      *
  662.      * @ORM\Column(type="boolean", nullable=true)
  663.      */
  664.     protected $force_https false;
  665.     /**
  666.      * @var boolean
  667.      *
  668.      * @ORM\Column(type="boolean", nullable=true)
  669.      */
  670.     protected $test false;
  671.     /**
  672.      * @var string
  673.      *
  674.      * @ORM\Column(type="string", nullable=true)
  675.      */
  676.     protected $max_media_size '2M';
  677.     /**
  678.      * @var array
  679.      *
  680.      * @ORM\Column(type="array", nullable=false)
  681.      */
  682.     private $media_dimensions = [
  683.         'full' => '1920',
  684.         'large' => '900',
  685.         'medium' => '600',
  686.         'small' => '350',
  687.         'thumb' => '150',
  688.     ];
  689.     /**
  690.      * @var boolean
  691.      *
  692.      * @ORM\Column(type="boolean", nullable=true)
  693.      */
  694.     protected $cookiebar false;
  695.     /**
  696.      * @var boolean
  697.      *
  698.      * @ORM\Column(type="boolean", nullable=true)
  699.      */
  700.     protected $cookiebar_button true;
  701.     /**
  702.      * @var string
  703.      *
  704.      * @ORM\Column(type="string", length=30, nullable=true)
  705.      */
  706.     protected $cookiebar_button_position 'bottom';
  707.     /**
  708.      * @var string
  709.      *
  710.      * @ORM\Column(type="integer", length=30, nullable=true)
  711.      */
  712.     protected $cookiebar_button_offset 20;
  713.     /**
  714.      * @var boolean
  715.      *
  716.      * @ORM\Column(type="boolean", nullable=true)
  717.      */
  718.     protected $cache_cdn false;
  719.     /**
  720.      * @var string
  721.      *
  722.      * @ORM\Column(type="string", length=30, nullable=true)
  723.      */
  724.     protected $robots '';
  725.     /**
  726.      * @var string
  727.      *
  728.      * @ORM\Column(type="string", length=100, nullable=true)
  729.      */
  730.     private $app_label '';
  731.     /**
  732.      * @var string
  733.      *
  734.      * @ORM\Column(type="string", length=100, nullable=true)
  735.      */
  736.     private $ios_app_id '';
  737.     /**
  738.      * @var string
  739.      *
  740.      * @ORM\Column(type="string", length=200, nullable=true)
  741.      */
  742.     private $android_app_id '';
  743.     /**
  744.      * @var \App\CmsBundle\Entity\Media
  745.      *
  746.      * @ORM\ManyToOne(targetEntity="App\CmsBundle\Entity\Media")
  747.      * @ORM\JoinColumns({
  748.      *   @ORM\JoinColumn(name="app_icon", referencedColumnName="id", onDelete="SET NULL")
  749.      * })
  750.      */
  751.     private $app_icon;
  752.     /**
  753.      * @var string
  754.      *
  755.      * @ORM\Column(type="string", length=255, nullable=true)
  756.      */
  757.     private $cc_auth_key '';
  758.     /**
  759.      * @var \DateTime
  760.      *
  761.      * @ORM\Column(type="datetime", nullable=true)
  762.      */
  763.     private $cc_expires;
  764.     /**
  765.      * @var boolean
  766.      *
  767.      * @ORM\Column(type="boolean", nullable=true)
  768.      */
  769.     private $cc_enabled false;
  770.     /**
  771.      * @var string
  772.      *
  773.      * @ORM\Column(type="string", length=50, nullable=true)
  774.      */
  775.     private $cc_notify_email '';
  776.     /**
  777.      * @var string
  778.      *
  779.      * @ORM\Column(type="string", length=100, nullable=true)
  780.      */
  781.     private $google_recaptcha_sitekey null;
  782.     /**
  783.      * @var string
  784.      *
  785.      * @ORM\Column(type="string", length=100, nullable=true)
  786.      */
  787.     private $google_recaptcha_secret null;
  788.     /**
  789.      * @var string
  790.      *
  791.      * @ORM\Column(type="string", length=100, nullable=true)
  792.      */
  793.     private $google_recaptcha_text '';
  794.     /**
  795.      * @var string
  796.      *
  797.      * @ORM\Column(type="string", length=50, nullable=true)
  798.      */
  799.     private $google_recaptcha_mode '2_checkbox';
  800.     /**
  801.      * @var string
  802.      *
  803.      * @ORM\Column(type="text", nullable=true)
  804.      */
  805.     private $mail_footer;
  806.     /**
  807.      * @var string
  808.      *
  809.      * @ORM\Column(type="text", nullable=true)
  810.      */
  811.     private $errorNotFound '';
  812.     /**
  813.      * @var string
  814.      *
  815.      * @ORM\Column(type="text", nullable=true)
  816.      */
  817.     private $errorNoAccess '';
  818.     /**
  819.      * @var string
  820.      *
  821.      * @ORM\Column(type="text", nullable=true)
  822.      */
  823.     private $errorSystem '';
  824.     /**
  825.      * @var string
  826.      *
  827.      * @ORM\Column(type="text", nullable=true)
  828.      */
  829.     private $avg_cookie '';
  830.     /**
  831.      * @var string
  832.      *
  833.      * @ORM\Column(type="text", nullable=true)
  834.      */
  835.     private $avg_disclaimer '';
  836.     /**
  837.      * @var string
  838.      *
  839.      * @ORM\Column(type="text", nullable=true)
  840.      */
  841.     private $avg_privacy '';
  842.     /**
  843.      * @var string
  844.      *
  845.      * @ORM\Column(type="string", length=100, nullable=true)
  846.      */
  847.     protected $sisow_merchant_id '';
  848.     /**
  849.      * @var string
  850.      *
  851.      * @ORM\Column(type="string", length=100, nullable=true)
  852.      */
  853.     protected $sisow_merchant_key '';
  854.     /**
  855.      * @var string
  856.      *
  857.      * @ORM\Column(type="string", length=50, nullable=true)
  858.      */
  859.     protected $sisow_shop_id '';
  860.     /**
  861.      * @var string
  862.      *
  863.      * @ORM\Column(type="json_array", length=255, nullable=true)
  864.      */
  865.     protected $sisow_options = [];
  866.     /**
  867.      * @var boolean
  868.      *
  869.      * @ORM\Column(type="boolean", nullable=true)
  870.      */
  871.     protected $sisow_live false;
  872.     /**
  873.      * @var boolean
  874.      *
  875.      * @ORM\Column(type="boolean", nullable=true)
  876.      */
  877.     protected $sisow_enabled false;
  878.     /**
  879.      * @var string
  880.      *
  881.      * @ORM\Column(type="string", length=50, nullable=true)
  882.      */
  883.     protected $paypro_key '';
  884.     /**
  885.      * @var boolean
  886.      *
  887.      * @ORM\Column(type="boolean", nullable=true)
  888.      */
  889.     protected $paypro_live false;
  890.     /**
  891.      * @var boolean
  892.      *
  893.      * @ORM\Column(type="boolean", nullable=true)
  894.      */
  895.     protected $paypro_enabled false;
  896.     /**
  897.      * @var boolean
  898.      *
  899.      * @ORM\Column(name="paypro_sub", type="boolean", nullable=true)
  900.      */
  901.     protected $paypro_subscription false;
  902.     /**
  903.      * @ORM\OneToMany(targetEntity="Mediadir", mappedBy="settings")
  904.      */
  905.     protected $mediadirs;
  906.     /**
  907.      * @ORM\OneToMany(targetEntity="Page", mappedBy="settings")
  908.      */
  909.     protected $pages;
  910.     /**
  911.      * @ORM\OneToMany(targetEntity="Navigation", mappedBy="settings")
  912.      */
  913.     protected $navigations;
  914.     /**
  915.      * @ORM\OneToMany(targetEntity="User", mappedBy="settings")
  916.      */
  917.     protected $users;
  918.     /**
  919.      * @var boolean
  920.      *
  921.      * @ORM\Column(type="boolean", nullable=true)
  922.      */
  923.     protected $calendar false;
  924.     /**
  925.      * @var string
  926.      *
  927.      * @ORM\Column(type="json_array", nullable=true)
  928.      */
  929.     private $visible_bundles = [];
  930.     /**
  931.      * @ORM\ManyToMany(targetEntity="User", mappedBy="sites")
  932.      */
  933.     protected $user_access;
  934.     /**
  935.      * @ORM\Column(type="boolean", nullable=true)
  936.      */
  937.     protected $ignore_cms_blocks false;
  938.     /**
  939.      * @var boolean
  940.      *
  941.      * @ORM\Column(name="enbl_reg", type="boolean", nullable=true)
  942.      */
  943.     protected $allow_registration true;
  944.     /**
  945.      * @var boolean
  946.      *
  947.      * @ORM\Column(name="mod_reg", type="boolean", nullable=true)
  948.      */
  949.     protected $moderate_registration false;
  950.     /**
  951.      * @ORM\OneToOne(targetEntity="Integrations", mappedBy="settings")
  952.      */
  953.     protected $integrations;
  954.     /**
  955.      * @var string
  956.      *
  957.      * @ORM\Column(type="string", length=150, nullable=true)
  958.      */
  959.     protected $favicon_location;
  960.     /**
  961.      * @var string
  962.      *
  963.      * @ORM\Column(type="string", length=150, nullable=true)
  964.      */
  965.     protected $author;
  966.     /**
  967.      * @var string
  968.      *
  969.      * @ORM\Column(type="string", length=150, nullable=true)
  970.      */
  971.     protected $apple_touch_icon;
  972.     /**
  973.      * @var string
  974.      *
  975.      * @ORM\Column(type="string", length=150, nullable=true)
  976.      */
  977.     protected $og_site_name;
  978.     /**
  979.      * @var string
  980.      *
  981.      * @ORM\Column(type="string", length=100, nullable=true)
  982.      */
  983.     protected $face_domain_key;
  984.     /**
  985.      * @ORM\Column(type="json", nullable=true)
  986.      */
  987.     private $color_swap = [];
  988.     /**
  989.      * @ORM\Column(type="string", length=255, nullable=true)
  990.      */
  991.     private $meta_pixel_id;
  992.     /**
  993.      * @ORM\Column(type="string", length=255, nullable=true)
  994.      */
  995.     private $meta_api_token;
  996.     /**
  997.      * @var \DateTime
  998.      *
  999.      * @ORM\Column(type="datetime", nullable=true)
  1000.      */
  1001.     private $ooo_start;
  1002.     /**
  1003.      * @var \DateTime
  1004.      *
  1005.      * @ORM\Column(type="datetime", nullable=true)
  1006.      */
  1007.     private $ooo_end;
  1008.     /**
  1009.      * @var string
  1010.      *
  1011.      * @ORM\Column(type="text", nullable=true)
  1012.      */
  1013.     private $ooo_msg '';
  1014.     /**
  1015.      * @var boolean
  1016.      *
  1017.      * @ORM\Column(type="boolean", nullable=true)
  1018.      */
  1019.     private $ooo_enbl false;
  1020.     /**
  1021.      * @var boolean
  1022.      *
  1023.      * @ORM\Column(name="lef_api_active", type="boolean", nullable=true)
  1024.      */
  1025.     protected $lef_api_active false;
  1026.     /**
  1027.      * @var boolean
  1028.      *
  1029.      * @ORM\Column(name="lef_api_live", type="boolean", nullable=true)
  1030.      */
  1031.     protected $lef_api_live false;
  1032.     
  1033.     /**
  1034.      * @var string
  1035.      *
  1036.      * @ORM\Column(name="lef_api_test_url", length="255", nullable=true)
  1037.      */
  1038.     protected $lef_api_test_url;
  1039.     
  1040.     /**
  1041.      * @var string
  1042.      *
  1043.      * @ORM\Column(name="lef_api_live_url", length="255", nullable=true)
  1044.      */
  1045.     protected $lef_api_live_url;
  1046.     /**
  1047.      * @var string
  1048.      *
  1049.      * @ORM\Column(name="lef_user_name", length="100", nullable=true)
  1050.      */
  1051.     protected $lef_user_name;
  1052.     /**
  1053.      * @var string
  1054.      *
  1055.      * @ORM\Column(name="lef_password", length="100", nullable=true)
  1056.      */
  1057.     protected $lef_password;
  1058.     /**
  1059.      * @var boolean
  1060.      *
  1061.      * @ORM\Column(name="lef_occasion_request", type="boolean", nullable=true)
  1062.      */
  1063.     protected $lef_occasion_request false;
  1064.     /**
  1065.      * @var boolean
  1066.      *
  1067.      * @ORM\Column(name="lef_finance_occassion_request", type="boolean", nullable=true)
  1068.      */
  1069.     protected $lef_finance_occassion_request false;
  1070.     /**
  1071.      * @var boolean
  1072.      *
  1073.      * @ORM\Column(name="lef_forms_request", type="boolean", nullable=true)
  1074.      */
  1075.     protected $lef_forms_request false;
  1076.     /**
  1077.      * @var boolean
  1078.      *
  1079.      * @ORM\Column(name="lef_privatelease_request", type="boolean", nullable=true)
  1080.      */
  1081.     protected $lef_privatelease_request false;
  1082.     /**
  1083.      * @var boolean
  1084.      *
  1085.      * @ORM\Column(name="lef_offer_request", type="boolean", nullable=true)
  1086.      */
  1087.     protected $lef_offer_request false;
  1088.     /**
  1089.      * @var boolean
  1090.      *
  1091.      * @ORM\Column(name="lef_testdrive_request", type="boolean", nullable=true)
  1092.      */
  1093.     protected $lef_testdrive_request false;
  1094.     /**
  1095.      * @var boolean
  1096.      *
  1097.      * @ORM\Column(name="Hummessenger_api_enababled", type="boolean", nullable=true)
  1098.      */
  1099.     protected $Hummessenger_api_enabled false;
  1100.     /**
  1101.      * @var string
  1102.      *
  1103.      * @ORM\Column(name="Hummessenger_api_url", length=100, nullable=true)
  1104.      */
  1105.     protected $Hummessenger_api_url "";
  1106.     /**
  1107.      * @var string
  1108.      *
  1109.      * @ORM\Column(name="Hummessenger_api_key", length=100, nullable=true)
  1110.      */
  1111.     protected $Hummessenger_api_key "";
  1112.     
  1113.     /**
  1114.      * @ORM\Column(type="boolean", nullable=true)
  1115.      */
  1116.     protected $is_catalog false;
  1117.     /**
  1118.      * @ORM\Column(type="string", length=255, nullable=true)
  1119.      */
  1120.     private $openai_key;
  1121.     /**
  1122.      * @ORM\Column(type="string", length=50, nullable=true)
  1123.      */
  1124.     private $openai_model;
  1125.     /**
  1126.      * @ORM\Column(type="float", nullable=true)
  1127.      */
  1128.     private $openai_temp;
  1129.     /**
  1130.      * @ORM\Column(type="string", length=255, nullable=true)
  1131.      */
  1132.     private $openai_startprompt;
  1133.     /**
  1134.      * Set label
  1135.      *
  1136.      * @param string $label
  1137.      * @return Settings
  1138.      */
  1139.     public function setLabel($label)
  1140.     {
  1141.         $this->label $label;
  1142.         return $this;
  1143.     }
  1144.     /**
  1145.      * Get label
  1146.      *
  1147.      * @return string
  1148.      */
  1149.     public function getLabel()
  1150.     {
  1151.         return $this->label;
  1152.     }
  1153.     /**
  1154.      * Get label (display)
  1155.      *
  1156.      * @return string
  1157.      */
  1158.     public function getLabelDisplay()
  1159.     {
  1160.         return $this->label ' | ' $this->language->getLabel();
  1161.     }
  1162.     /**
  1163.      * Set adminEmail
  1164.      *
  1165.      * @param string $adminEmail
  1166.      * @return Settings
  1167.      */
  1168.     public function setAdminEmail($adminEmail)
  1169.     {
  1170.         $this->adminEmail $adminEmail;
  1171.         return $this;
  1172.     }
  1173.     /**
  1174.      * Get adminEmail
  1175.      *
  1176.      * @return string
  1177.      */
  1178.     public function getAdminEmail()
  1179.     {
  1180.         return $this->adminEmail;
  1181.     }
  1182.     /**
  1183.      * Set adminEmailFrom
  1184.      *
  1185.      * @param string $adminEmailFrom
  1186.      * @return Settings
  1187.      */
  1188.     public function setAdminEmailFrom($adminEmailFrom)
  1189.     {
  1190.         $this->adminEmailFrom $adminEmailFrom;
  1191.         return $this;
  1192.     }
  1193.     /**
  1194.      * Get adminEmailFrom
  1195.      *
  1196.      * @return string
  1197.      */
  1198.     public function getAdminEmailFrom()
  1199.     {
  1200.         return $this->adminEmailFrom;
  1201.     }
  1202.     /**
  1203.      * Set systemEmail
  1204.      *
  1205.      * @param string $systemEmail
  1206.      * @return Settings
  1207.      */
  1208.     public function setSystemEmail($systemEmail)
  1209.     {
  1210.         $this->systemEmail $systemEmail;
  1211.         return $this;
  1212.     }
  1213.     /**
  1214.      * Get systemEmail
  1215.      *
  1216.      * @return string
  1217.      */
  1218.     public function getSystemEmail()
  1219.     {
  1220.         return $this->systemEmail;
  1221.     }
  1222.     /**
  1223.      * Set systemEmailFrom
  1224.      *
  1225.      * @param string $systemEmailFrom
  1226.      * @return Settings
  1227.      */
  1228.     public function setSystemEmailFrom($systemEmailFrom)
  1229.     {
  1230.         $this->systemEmailFrom $systemEmailFrom;
  1231.         return $this;
  1232.     }
  1233.     /**
  1234.      * Get systemEmailFrom
  1235.      *
  1236.      * @return string
  1237.      */
  1238.     public function getSystemEmailFrom()
  1239.     {
  1240.         return $this->systemEmailFrom;
  1241.     }
  1242.     /**
  1243.      * Set maintenance
  1244.      *
  1245.      * @param string $maintenance
  1246.      * @return Settings
  1247.      */
  1248.     public function setMaintenance($maintenance)
  1249.     {
  1250.         $this->maintenance $maintenance;
  1251.         return $this;
  1252.     }
  1253.     /**
  1254.      * Get maintenance
  1255.      *
  1256.      * @return string
  1257.      */
  1258.     public function getMaintenance()
  1259.     {
  1260.         return (bool)$this->maintenance;
  1261.     }
  1262.     /**
  1263.      * Set inlineEdit
  1264.      *
  1265.      * @param string $inlineEdit
  1266.      * @return Settings
  1267.      */
  1268.     public function setInlineEdit($inlineEdit)
  1269.     {
  1270.         $this->inlineEdit $inlineEdit;
  1271.         return $this;
  1272.     }
  1273.     /**
  1274.      * Get inlineEdit
  1275.      *
  1276.      * @return string
  1277.      */
  1278.     public function getInlineEdit()
  1279.     {
  1280.         return (bool)$this->inlineEdit;
  1281.     }
  1282.     /**
  1283.      * Set priceIncludeTax
  1284.      *
  1285.      * @param string $priceIncludeTax
  1286.      * @return Settings
  1287.      */
  1288.     public function setPriceIncludeTax($priceIncludeTax)
  1289.     {
  1290.         $this->priceIncludeTax $priceIncludeTax;
  1291.         return $this;
  1292.     }
  1293.     /**
  1294.      * Get priceIncludeTax
  1295.      *
  1296.      * @return string
  1297.      */
  1298.     public function getPriceIncludeTax()
  1299.     {
  1300.         return (bool)$this->priceIncludeTax;
  1301.     }
  1302.     /**
  1303.      * Set id
  1304.      *
  1305.      * @param integer $id
  1306.      * @return Settings
  1307.      */
  1308.     public function setId($id)
  1309.     {
  1310.         $this->id $id;
  1311.         return $this;
  1312.     }
  1313.     /**
  1314.      * Get id
  1315.      *
  1316.      * @return integer
  1317.      */
  1318.     public function getId()
  1319.     {
  1320.         return $this->id;
  1321.     }
  1322.     /**
  1323.      * Set logo
  1324.      *
  1325.      * @param \App\CmsBundle\Entity\Media $logo
  1326.      *
  1327.      * @return Settings
  1328.      */
  1329.     public function setLogo(\App\CmsBundle\Entity\Media $logo null)
  1330.     {
  1331.         $this->logo $logo;
  1332.         return $this;
  1333.     }
  1334.     /**
  1335.      * Get logo
  1336.      *
  1337.      * @return \App\CmsBundle\Entity\Media
  1338.      */
  1339.     public function getLogo($fallback true)
  1340.     {
  1341.         if($this->hasLogo()){
  1342.             return '/' $this->logo->getWebPath();
  1343.         }else{
  1344.             if($fallback){
  1345.                 return '/bundles/cms/images/logo.svg';
  1346.             }
  1347.         }
  1348.         return null;
  1349.     }
  1350.     /**
  1351.      * Get logo object
  1352.      *
  1353.      * @return \App\CmsBundle\Entity\Media
  1354.      */
  1355.     public function getLogoObject()
  1356.     {
  1357.         if($this->hasLogo()){
  1358.             return $this->logo;
  1359.         }
  1360.         return null;
  1361.     }
  1362.     /**
  1363.      * Has logo
  1364.      *
  1365.      * @return boolean
  1366.      */
  1367.     public function hasLogo()
  1368.     {
  1369.         return !empty($this->logo);
  1370.     }
  1371.     
  1372.     /**
  1373.      * Has Postcode NL Checker
  1374.      *
  1375.      * @return boolean
  1376.      */
  1377.     public function hasPostnlChecker()
  1378.     {
  1379.         return !empty($this->postnl_checker);
  1380.     }
  1381.     
  1382.     /**
  1383.      * Set postNlChecker
  1384.      *
  1385.      * @param boolean $postNlChecker
  1386.      *
  1387.      * @return boolean
  1388.      */
  1389.     public function setPostNlChecker($postNlChecker)
  1390.     {
  1391.         $this->postnl_checker $postNlChecker;
  1392.         return $this;
  1393.     }
  1394.     /**
  1395.      * Get postNlChecker
  1396.      *
  1397.      * @return boolean
  1398.      */
  1399.     public function getPostNlChecker()
  1400.     {
  1401.         return $this->postnl_checker;
  1402.     }
  1403.     
  1404.     /**
  1405.      * Has Postcode NL Key
  1406.      *
  1407.      * @return text
  1408.      */
  1409.     public function getPostnlKey()
  1410.     {
  1411.         return $this->postnl_key;
  1412.     }
  1413.     
  1414.     /**
  1415.      * Set postNlKey
  1416.      *
  1417.      * @param boolean $postNlKey
  1418.      *
  1419.      * @return text
  1420.      */
  1421.     public function setPostnlKey($postNlKey)
  1422.     {
  1423.         $this->postnl_key $postNlKey;
  1424.         return $this;
  1425.     }
  1426.     
  1427.     /**
  1428.      * Has Postcode NL Secret Key
  1429.      *
  1430.      * @return text
  1431.      */
  1432.     public function getPostnlSecretKey()
  1433.     {
  1434.         return $this->postnl_secret_key;
  1435.     }
  1436.     
  1437.     /**
  1438.      * Set postNlSecretKey
  1439.      *
  1440.      * @param boolean $postNlSecretKey
  1441.      *
  1442.      * @return text
  1443.      */
  1444.     public function setPostnlSecretKey($postNlSecretKey)
  1445.     {
  1446.         $this->postnl_secret_key $postNlSecretKey;
  1447.         return $this;
  1448.     }
  1449.     /**
  1450.      * Set background
  1451.      *
  1452.      * @param \App\CmsBundle\Entity\Media $background
  1453.      *
  1454.      * @return Settings
  1455.      */
  1456.     public function setBackground(\App\CmsBundle\Entity\Media $background null)
  1457.     {
  1458.         $this->background $background;
  1459.         return $this;
  1460.     }
  1461.     /**
  1462.      * Get background
  1463.      *
  1464.      * @return \App\CmsBundle\Entity\Media
  1465.      */
  1466.     public function getBackground()
  1467.     {
  1468.         if($this->hasBackground()){
  1469.             return '/' $this->background->getWebPath();
  1470.         }else{
  1471.             return '/bundles/cms/images/background.jpg';
  1472.         }
  1473.     }
  1474.     /**
  1475.      * Get background object
  1476.      *
  1477.      * @return \App\CmsBundle\Entity\Media
  1478.      */
  1479.     public function getBackgroundObject()
  1480.     {
  1481.         if($this->hasBackground()){
  1482.             return $this->background;
  1483.         }
  1484.         return null;
  1485.     }
  1486.     /**
  1487.      * Has background
  1488.      *
  1489.      * @return boolean
  1490.      */
  1491.     public function hasBackground()
  1492.     {
  1493.         return !empty($this->background);
  1494.     }
  1495.     /**
  1496.      * Set maintenanceMessage
  1497.      *
  1498.      * @param string $maintenanceMessage
  1499.      *
  1500.      * @return Settings
  1501.      */
  1502.     public function setMaintenanceMessage($maintenanceMessage)
  1503.     {
  1504.         $this->maintenance_message $maintenanceMessage;
  1505.         return $this;
  1506.     }
  1507.     /**
  1508.      * Get maintenanceMessage
  1509.      *
  1510.      * @return string
  1511.      */
  1512.     public function getMaintenanceMessage()
  1513.     {
  1514.         return $this->maintenance_message;
  1515.     }
  1516.     /**
  1517.      * Set twitter
  1518.      *
  1519.      * @param string $twitter
  1520.      *
  1521.      * @return Settings
  1522.      */
  1523.     public function setTwitter($twitter)
  1524.     {
  1525.         $this->twitter $twitter;
  1526.         return $this;
  1527.     }
  1528.     /**
  1529.      * Get twitter
  1530.      *
  1531.      * @return string
  1532.      */
  1533.     public function getTwitter()
  1534.     {
  1535.         return $this->twitter;
  1536.     }
  1537.     /**
  1538.      * Set facebook
  1539.      *
  1540.      * @param string $facebook
  1541.      *
  1542.      * @return Settings
  1543.      */
  1544.     public function setFacebook($facebook)
  1545.     {
  1546.         $this->facebook $facebook;
  1547.         return $this;
  1548.     }
  1549.     /**
  1550.      * Get facebook
  1551.      *
  1552.      * @return string
  1553.      */
  1554.     public function getFacebook()
  1555.     {
  1556.         return $this->facebook;
  1557.     }
  1558.     public function getMetaApiToken(): ?string
  1559.     {
  1560.         return $this->meta_api_token;
  1561.     }
  1562.     public function setMetaApiToken(?string $meta_api_token): self
  1563.     {
  1564.         $this->meta_api_token $meta_api_token;
  1565.         return $this;
  1566.     }
  1567.     /**
  1568.      * Set company
  1569.      *
  1570.      * @param string $company
  1571.      *
  1572.      * @return Settings
  1573.      */
  1574.     public function setCompany($company)
  1575.     {
  1576.         $this->company $company;
  1577.         return $this;
  1578.     }
  1579.     /**
  1580.      * Get company
  1581.      *
  1582.      * @return string
  1583.      */
  1584.     public function getCompany()
  1585.     {
  1586.         return $this->company;
  1587.     }
  1588.     /**
  1589.      * Set phone
  1590.      *
  1591.      * @param string $phone
  1592.      *
  1593.      * @return Settings
  1594.      */
  1595.     public function setPhone($phone)
  1596.     {
  1597.         $this->phone $phone;
  1598.         return $this;
  1599.     }
  1600.     /**
  1601.      * Get phone
  1602.      *
  1603.      * @return string
  1604.      */
  1605.     public function getPhone()
  1606.     {
  1607.         return $this->phone;
  1608.     }
  1609.     /**
  1610.      * Set address
  1611.      *
  1612.      * @param string $address
  1613.      *
  1614.      * @return Settings
  1615.      */
  1616.     public function setAddress($address)
  1617.     {
  1618.         $this->address $address;
  1619.         return $this;
  1620.     }
  1621.     /**
  1622.      * Get address
  1623.      *
  1624.      * @return string
  1625.      */
  1626.     public function getAddress()
  1627.     {
  1628.         return $this->address;
  1629.     }
  1630.     /**
  1631.      * Set postalcode
  1632.      *
  1633.      * @param string $postalcode
  1634.      *
  1635.      * @return Settings
  1636.      */
  1637.     public function setPostalcode($postalcode)
  1638.     {
  1639.         $this->postalcode $postalcode;
  1640.         return $this;
  1641.     }
  1642.     /**
  1643.      * Get postalcode
  1644.      *
  1645.      * @return string
  1646.      */
  1647.     public function getPostalcode()
  1648.     {
  1649.         return $this->postalcode;
  1650.     }
  1651.     /**
  1652.      * Set place
  1653.      *
  1654.      * @param string $place
  1655.      *
  1656.      * @return Settings
  1657.      */
  1658.     public function setPlace($place)
  1659.     {
  1660.         $this->place $place;
  1661.         return $this;
  1662.     }
  1663.     /**
  1664.      * Get place
  1665.      *
  1666.      * @return string
  1667.      */
  1668.     public function getPlace()
  1669.     {
  1670.         return $this->place;
  1671.     }
  1672.     /**
  1673.      * Set state
  1674.      *
  1675.      * @param string $state
  1676.      *
  1677.      * @return Settings
  1678.      */
  1679.     public function setState($state)
  1680.     {
  1681.         $this->state $state;
  1682.         return $this;
  1683.     }
  1684.     /**
  1685.      * Get state
  1686.      *
  1687.      * @return string
  1688.      */
  1689.     public function getState()
  1690.     {
  1691.         return $this->state;
  1692.     }
  1693.     /**
  1694.      * Set country
  1695.      *
  1696.      * @param string $country
  1697.      *
  1698.      * @return Settings
  1699.      */
  1700.     public function setCountry($country)
  1701.     {
  1702.         $this->country $country;
  1703.         return $this;
  1704.     }
  1705.     /**
  1706.      * Get country
  1707.      *
  1708.      * @return string
  1709.      */
  1710.     public function getCountry()
  1711.     {
  1712.         return $this->country;
  1713.     }
  1714.     /**
  1715.      * Set kvk
  1716.      *
  1717.      * @param integer $kvk
  1718.      *
  1719.      * @return Settings
  1720.      */
  1721.     public function setKvk($kvk)
  1722.     {
  1723.         $this->kvk $kvk;
  1724.         return $this;
  1725.     }
  1726.     /**
  1727.      * Get kvk
  1728.      *
  1729.      * @return integer
  1730.      */
  1731.     public function getKvk()
  1732.     {
  1733.         return $this->kvk;
  1734.     }
  1735.     /**
  1736.      * Set taxNo
  1737.      *
  1738.      * @param integer $taxNo
  1739.      *
  1740.      * @return Settings
  1741.      */
  1742.     public function setTaxNo($taxNo)
  1743.     {
  1744.         $this->taxNo $taxNo;
  1745.         return $this;
  1746.     }
  1747.     /**
  1748.      * Get taxNo
  1749.      *
  1750.      * @return integer
  1751.      */
  1752.     public function getTaxNo()
  1753.     {
  1754.         return $this->taxNo;
  1755.     }
  1756.     /**
  1757.      * Set tagline
  1758.      *
  1759.      * @param string $tagline
  1760.      *
  1761.      * @return Settings
  1762.      */
  1763.     public function setTagline($tagline)
  1764.     {
  1765.         $this->tagline $tagline;
  1766.         return $this;
  1767.     }
  1768.     /**
  1769.      * Get tagline
  1770.      *
  1771.      * @return string
  1772.      */
  1773.     public function getTagline()
  1774.     {
  1775.         return $this->tagline;
  1776.     }
  1777.     /**
  1778.      * Set layoutIncludeJs
  1779.      *
  1780.      * @param array $layoutIncludeJs
  1781.      *
  1782.      * @return Settings
  1783.      */
  1784.     public function setLayoutIncludeJs($layoutIncludeJs)
  1785.     {
  1786.         $this->layout_include_js $layoutIncludeJs;
  1787.         return $this;
  1788.     }
  1789.     /**
  1790.      * Get layoutIncludeJs
  1791.      *
  1792.      * @return array
  1793.      */
  1794.     public function getLayoutIncludeJs($allowCache false)
  1795.     {
  1796.         $cacheDir __DIR__ '/../../../public/static/';
  1797.         $cacheDirJs $cacheDir 'js/';
  1798.         if($this->cache_cdn && $allowCache){
  1799.             if(!file_exists($cacheDir)){ @mkdir($cacheDir); }
  1800.             if(!file_exists($cacheDirJs)){ @mkdir($cacheDirJs); }
  1801.             if(file_exists($cacheDirJs) && is_writable($cacheDirJs)){
  1802.                 $urls = [];
  1803.                 foreach($this->layout_include_js as $k => $f){
  1804.                     $v $this->guessVersion($ftrue);
  1805.                     $filename = (!empty($v) ? $v '_' '') . basename($f);
  1806.                     if(!file_exists($cacheDirJs $filename)){
  1807.                         $f_full $f;
  1808.                         if(substr($f_full02) == '//'$f_full 'http:' $f_full;
  1809.                         $data file_get_contents($f_full);
  1810.                         if(strlen($data) > 50){
  1811.                             // check if there are any external (.map) files
  1812.                             if (preg_match('/sourceMappingURL=(.+map)/'$data$matches)) {
  1813.                                 if (isset($matches[1]))
  1814.                                 {
  1815.                                     $mapUrl dirname($f_full) . '/' $matches[1];
  1816.                                     
  1817.                                     $sourceFilename = (!empty($v) ? $v '_' '') . basename($matches[1]);
  1818.                                     set_time_limit(0);
  1819.                                     $fp fopen ($cacheDirJs $sourceFilename'w+');
  1820.                                     $ch curl_init(str_replace(" ""%20"$mapUrl));
  1821.                                     curl_setopt($chCURLOPT_TIMEOUT50);
  1822.                                     curl_setopt($chCURLOPT_FILE$fp);
  1823.                                     curl_setopt($chCURLOPT_FOLLOWLOCATIONtrue);
  1824.                                     curl_exec($ch);
  1825.                                     
  1826.                                     $info curl_getinfo($ch);
  1827.                                     curl_close($ch);
  1828.                                     fclose($fp);
  1829.                                     if ($info['http_code'] == 200) {
  1830.                                         // update sourceMappingURL
  1831.                                         $data str_replace($matches[1], '/static/js/' $sourceFilename$data);
  1832.                                     } else {
  1833.                                         // we got a error downloading the map file, deleting file and reference to it.
  1834.                                         if (file_exists($cacheDirJs $sourceFilename)) {
  1835.                                             unlink($cacheDirJs $sourceFilename);
  1836.                                         }
  1837.                                         
  1838.                                         $data preg_replace('/sourceMappingURL=.+map/'''$data);
  1839.                                     }
  1840.                                 }
  1841.                             }
  1842.                             file_put_contents($cacheDirJs $filename$data);
  1843.                             $urls[] = '/static/js/' $filename;
  1844.                         }else{
  1845.                             $urls[] = $f;
  1846.                         }
  1847.                     }else{
  1848.                         $urls[] = '/static/js/' $filename;
  1849.                     }
  1850.                 }
  1851.                 return $urls;
  1852.             }
  1853.         }
  1854.         return $this->layout_include_js;
  1855.     }
  1856.     /**
  1857.      * Set layoutIncludeCss
  1858.      *
  1859.      * @param array $layoutIncludeCss
  1860.      *
  1861.      * @return Settings
  1862.      */
  1863.     public function setLayoutIncludeCss($layoutIncludeCss)
  1864.     {
  1865.         $this->layout_include_css $layoutIncludeCss;
  1866.         return $this;
  1867.     }
  1868.     function guessVersion($str$strip false) {
  1869.         preg_match("/(?:version|v)?\s*((?:[0-9]+\.?)+)/i"$str$matches);
  1870.         $v = (!empty($matches[1]) ? $matches[1] : '');
  1871.         if($strip){
  1872.             $v str_replace('.'''$v);
  1873.         }
  1874.         return $v;
  1875.     }
  1876.     /**
  1877.      * Get layoutIncludeCss
  1878.      *
  1879.      * @return array
  1880.      */
  1881.     public function getLayoutIncludeCss($allowCache false)
  1882.     {
  1883.         $patterns = ['/\(\s?\'(.*?)\'\s?\)/','/url\(\s?(.*?)\s?\)/'];
  1884.         $cacheDir __DIR__ '/../../../public/static/';
  1885.         $cacheDirCss $cacheDir 'css/';
  1886.         if($this->cache_cdn && $allowCache){
  1887.             if(!file_exists($cacheDir)){ @mkdir($cacheDir); }
  1888.             if(!file_exists($cacheDirCss)){ @mkdir($cacheDirCss); }
  1889.             if(file_exists($cacheDirCss) && is_writable($cacheDirCss)){
  1890.                 $urls = [];
  1891.                 foreach($this->layout_include_css as $k => $f){
  1892.                     $v $this->guessVersion($ftrue);
  1893.                     $filename = (!empty($v) ? $v '_' '') . basename($f);
  1894.                     if(!file_exists($cacheDirCss $filename)){
  1895.                         $f_full $f;
  1896.                         if(substr($f_full02) == '//'$f_full 'http:' $f_full;
  1897.                         $data file_get_contents($f_full);
  1898.                         if(strlen($data) > 50){
  1899.                             // Gather external assets
  1900.                             foreach($patterns as $pattern){
  1901.                                 if(preg_match_all($pattern$data$matches)){
  1902.                                     foreach($matches[1] as $k => $include){
  1903.                                         if (str_contains($include'data:image/svg')) {
  1904.                                             // embedded svg, skipping
  1905.                                             continue;
  1906.                                         }
  1907.                                         if(empty($include)){
  1908.                                             if(!empty($matches[2][$k])){
  1909.                                                 $include $matches[2][$k];
  1910.                                             }
  1911.                                         }
  1912.                                         if(strpos($include'.') !== false){
  1913.                                             $prev $include;
  1914.                                             $uri preg_replace('/\/[a-zA-Z0-9-_\.]+\.[a-z]+$/''/'$f_full);
  1915.                                             $file_url $uri $include;
  1916.                                             $include str_replace('../'''$include);
  1917.                                             $include str_replace('./'''$include);
  1918.                                             $include preg_replace('/\?.*?$/'''$include);
  1919.                                             $include preg_replace('/\#.*?$/'''$include);
  1920.                                             $new $include;
  1921.                                             $data str_replace($prev$new$data);
  1922.                                             $path explode('/'$include);
  1923.                                             $path_str $cacheDirCss;
  1924.                                             if(!file_exists($path_str)){
  1925.                                                 mkdir($path_str);
  1926.                                             }
  1927.                                             foreach($path as $index => $dir){
  1928.                                                 if($dir == '.') continue;
  1929.                                                 if($index < (count($path) - 1)){
  1930.                                                     if(!file_exists($path_str $dir)){
  1931.                                                         mkdir($path_str $dir);
  1932.                                                     }
  1933.                                                     $path_str $path_str $dir '/';
  1934.                                                 }
  1935.                                             }
  1936.                                             set_time_limit(0);
  1937.                                             $fp fopen ($cacheDirCss $include'w+');
  1938.                                             $ch curl_init(str_replace(" ","%20",$file_url));
  1939.                                             curl_setopt($chCURLOPT_TIMEOUT50);
  1940.                                             curl_setopt($chCURLOPT_FILE$fp);
  1941.                                             curl_setopt($chCURLOPT_FOLLOWLOCATIONtrue);
  1942.                                             curl_exec($ch);
  1943.                                             curl_close($ch);
  1944.                                             fclose($fp);
  1945.                                         }
  1946.                                     }
  1947.                                     // check if there are any external (.map) files
  1948.                                     if (preg_match('/sourceMappingURL=(.+map)/'$data$matches)) {
  1949.                                         if (isset($matches[1]))
  1950.                                         {
  1951.                                             $mapUrl dirname($f_full) . '/' $matches[1];
  1952.                                             $sourceFilename = (!empty($v) ? $v '_' '') . basename($matches[1]);
  1953.                                             set_time_limit(0);
  1954.                                             $fp fopen ($cacheDirCss $sourceFilename'w+');
  1955.                                             $ch curl_init(str_replace(" ""%20"$mapUrl));
  1956.                                             curl_setopt($chCURLOPT_TIMEOUT50);
  1957.                                             curl_setopt($chCURLOPT_FILE$fp);
  1958.                                             curl_setopt($chCURLOPT_FOLLOWLOCATIONtrue);
  1959.                                             curl_exec($ch);
  1960.                                             $info curl_getinfo($ch);
  1961.                                             curl_close($ch);
  1962.                                             fclose($fp);
  1963.                                             if ($info['http_code'] == 200) {
  1964.                                                 // update sourceMappingURL
  1965.                                                 $data str_replace($matches[1], '/static/css/' $sourceFilename$data);
  1966.                                             } else {
  1967.                                                 // we got a error downloading the map file, deleting file and reference to it.
  1968.                                                 if (file_exists($cacheDirCss $sourceFilename)) {
  1969.                                                     unlink($cacheDirCss $sourceFilename);
  1970.                                                 }
  1971.                                                 $data preg_replace('/sourceMappingURL=.+map/'''$data);
  1972.                                             }
  1973.                                         }
  1974.                                     }
  1975.                                     break;
  1976.                                 }
  1977.                             }
  1978.                             file_put_contents($cacheDirCss $filename$data);
  1979.                             $urls[] = '/static/css/' $filename;
  1980.                         }else{
  1981.                             $urls[] = $f;
  1982.                         }
  1983.                     }else{
  1984.                         $urls[] = '/static/css/' $filename;
  1985.                     }
  1986.                 }
  1987.                 return $urls;
  1988.             }
  1989.         }
  1990.         return $this->layout_include_css;
  1991.     }
  1992.     /**
  1993.      * Set restrictAccess
  1994.      *
  1995.      * @param string $restrictAccess
  1996.      *
  1997.      * @return Settings
  1998.      */
  1999.     public function setRestrictAccess($restrictAccess)
  2000.     {
  2001.         $this->restrict_access $restrictAccess;
  2002.         return $this;
  2003.     }
  2004.     /**
  2005.      * Get restrictAccess
  2006.      *
  2007.      * @return string
  2008.      */
  2009.     public function getRestrictAccess()
  2010.     {
  2011.         return $this->restrict_access;
  2012.     }
  2013.     /**
  2014.      * Get restrictAccess as array
  2015.      *
  2016.      * @return array
  2017.      */
  2018.     public function getRestrictAccessList()
  2019.     {
  2020.         $list explode("\n"$this->restrict_access);
  2021.         $return = array();
  2022.         foreach($list as $k => $v){
  2023.             $v trim($v);
  2024.             if(!empty($v)) $return[] = $v;
  2025.         }
  2026.         return $return;
  2027.     }
  2028.     /**
  2029.      * Set restrictAccess
  2030.      *
  2031.      * @param string $restrictAccess
  2032.      *
  2033.      * @return Settings
  2034.      */
  2035.     public function setRestrictAccessDeny($restrictAccessDeny)
  2036.     {
  2037.         $this->restrict_access_deny $restrictAccessDeny;
  2038.         return $this;
  2039.     }
  2040.     /**
  2041.      * Get restrictAccessDeny
  2042.      *
  2043.      * @return string
  2044.      */
  2045.     public function getRestrictAccessDeny()
  2046.     {
  2047.         return $this->restrict_access_deny;
  2048.     }
  2049.     /**
  2050.      * Get restrictAccessDeny as array
  2051.      *
  2052.      * @return array
  2053.      */
  2054.     public function getRestrictAccessDenyList()
  2055.     {
  2056.         $list explode("\n"$this->restrict_access_deny);
  2057.         $return = array();
  2058.         foreach($list as $k => $v){
  2059.             $v trim($v);
  2060.             if(!empty($v)) $return[] = $v;
  2061.         }
  2062.         return $return;
  2063.     }
  2064.     public function hasAccess(){
  2065.         $allowList $this->getRestrictAccessList();
  2066.         $denyList $this->getRestrictAccessDenyList();
  2067.         $access true;
  2068.         if(in_array($_SERVER['REMOTE_ADDR'], $denyList) || in_array('*.*.*.*'$denyList)){
  2069.             $access false;
  2070.         }
  2071.         if(in_array($_SERVER['REMOTE_ADDR'], $allowList)){
  2072.             $access true;
  2073.         }
  2074.         return $access;
  2075.     }
  2076.     public function getPayLabel($method null){
  2077.         if(empty($method)){
  2078.             if($this->mollie_enabled){
  2079.                 $method 'mollie';
  2080.             }else if($this->buckaroo_enabled){
  2081.                 $method 'buckaroo';
  2082.             }else if($this->omnikassa_enabled){
  2083.                 $method 'omnikassa';
  2084.             }else if($this->multisafepay_enabled){
  2085.                 $method 'multisafepay';
  2086.             }else if($this->pay_enabled){
  2087.                 $method 'pay';
  2088.             }else if($this->sisow_enabled){
  2089.                 $method 'sisow';
  2090.             }else if($this->paypro_enabled){
  2091.                 $method 'paypro';
  2092.             }
  2093.         }
  2094.         $trans = [
  2095.             'mollie'       => 'Mollie',
  2096.             'buckaroo'     => 'Buckaroo',
  2097.             'omnikassa'    => 'OmniKassa',
  2098.             'multisafepay' => 'MultiSafePay',
  2099.             'pay'          => 'Pay.nl',
  2100.             'sisow'        => 'Sisow',
  2101.         ];
  2102.         if(array_key_exists($method$trans)){
  2103.             return $trans[$method];
  2104.         }
  2105.         return 'unknown';
  2106.     }
  2107.     public function getPay($method null$test false){
  2108.         if(empty($method)){
  2109.             if($this->mollie_enabled){
  2110.                 $method 'mollie';
  2111.             }else if($this->buckaroo_enabled){
  2112.                 $method 'buckaroo';
  2113.             }else if($this->omnikassa_enabled){
  2114.                 $method 'omnikassa';
  2115.             }else if($this->multisafepay_enabled){
  2116.                 $method 'multisafepay';
  2117.             }else if($this->pay_enabled){
  2118.                 $method 'pay';
  2119.             }else if($this->sisow_enabled){
  2120.                 $method 'sisow';
  2121.             }else if($this->paypro_enabled){
  2122.                 $method 'paypro';
  2123.             }
  2124.         }
  2125.         if($this->getTest()){
  2126.             $test true;
  2127.         }
  2128.         if($method == 'mollie'){
  2129.             $Pay = new \App\CmsBundle\Classes\Pay('mollie', [
  2130.                 'locale' => $this->language->getLocale(),
  2131.                 'live_mode' => ($test false : (bool)$this->getMollieLive()),
  2132.                 'key_test'  => $this->getMollieApiTest(),
  2133.                 'key_live'  => $this->getMollieApiLive(),
  2134.                 'subscription' => $this->getMollieSubscription(),
  2135.             ]);
  2136.         }else if($method == 'paypro'){
  2137.             $Pay = new \App\CmsBundle\Classes\Pay('paypro', [
  2138.                 'locale'       => $this->language->getLocale(),
  2139.                 'live_mode'    => ($test false : (bool)$this->getPayproLive()),
  2140.                 'key'          => $this->getPayproKey(),
  2141.                 'subscription' => $this->getPayproSubscription(),
  2142.             ]);
  2143.         }else if($method == 'buckaroo'){
  2144.             $Pay = new \App\CmsBundle\Classes\Pay('buckaroo', [
  2145.                 'locale' => $this->language->getLocale(),
  2146.                 'live_mode' => ($test false : (bool)$this->getBuckarooLive()),
  2147.                 'key'       => $this->getBuckarooWebsiteKey(),
  2148.                 'secret'       => $this->getBuckarooSecret(),
  2149.                 'subscription' => false,
  2150.             ]);
  2151.         }else if($method == 'omnikassa'){
  2152.             $Pay = new \App\CmsBundle\Classes\Pay('omnikassa', [
  2153.                 'locale' => $this->language->getLocale(),
  2154.                 'live_mode' => ($test false : (bool)$this->getOmnikassaLive()),
  2155.                 'signing_live' => $this->getOmnikassaSign(),
  2156.                 'refresh_live' => $this->getOmnikassaRefresh(),
  2157.                 'signing_test' => $this->getOmnikassaSignTest(),
  2158.                 'refresh_test' => $this->getOmnikassaRefreshTest(),
  2159.                 'subscription' => false,
  2160.             ]);
  2161.         }else if($method == 'multisafepay'){
  2162.             $Pay = new \App\CmsBundle\Classes\Pay('multisafepay', [
  2163.                 'locale' => $this->language->getLocale(),
  2164.                 'live_mode' => ($test false : (bool)$this->getMultisafepayLive()),
  2165.                 'api_key_live'  => $this->getMultisafepayApi(),
  2166.                 'api_key_test'  => $this->getMultisafepayApiTest(),
  2167.                 'subscription' => false,
  2168.             ]);
  2169.         }else if($method == 'pay'){
  2170.             $Pay = new \App\CmsBundle\Classes\Pay('pay', [
  2171.                 'locale' => $this->language->getLocale(),
  2172.                 'live_mode' => ($test false : (bool)$this->getPayLive()),
  2173.                 'service_id'  => $this->getPayServiceId(),
  2174.                 'key_test'  => $this->getPayApiTest(),
  2175.                 'key_live'  => $this->getPayApiLive(),
  2176.                 'subscription' => false,
  2177.             ]);
  2178.         }else if($method == 'sisow'){
  2179.             $Pay = new \App\CmsBundle\Classes\Pay('sisow', [
  2180.                 'locale' => $this->language->getLocale(),
  2181.                 'live_mode' => ($test false : (bool)$this->getSisowLive()),
  2182.                 'merchant_id'  => $this->getSisowMerchantId(),
  2183.                 'merchant_key'  => $this->getSisowMerchantKey(),
  2184.                 'shop_id'  => $this->getSisowShopId(),
  2185.                 'subscription' => false,
  2186.                 'options'      => $this->getSisowOptions(),
  2187.             ]);
  2188.         }else{
  2189.             $Pay = new \App\CmsBundle\Classes\Pay();
  2190.         }
  2191.         if($this->getTest() || $test){
  2192.             $Pay->setTest(true);
  2193.         }
  2194.         return $Pay;
  2195.     }
  2196.     /**
  2197.      * Get Mollie object
  2198.      *
  2199.      * @return string
  2200.      */
  2201.     /*public function getMollie()
  2202.     {
  2203.         $key = $this->getMollieApiTest();
  2204.         if($this->getMollieLive()){
  2205.             $key = $this->getMollieApiLive();
  2206.         }
  2207.         if(!empty($key)){
  2208.             $mollie = new \Mollie_API_Client;
  2209.             $mollie->setApiKey($key);
  2210.             return $mollie;
  2211.         }
  2212.         return null;
  2213.     }*/
  2214.     /**
  2215.      * Set mollieApi
  2216.      *
  2217.      * @param string $mollieApi
  2218.      *
  2219.      * @return Settings
  2220.      */
  2221.     public function setMollieApi($mollieApi)
  2222.     {
  2223.         $this->mollie_api $mollieApi;
  2224.         return $this;
  2225.     }
  2226.     /**
  2227.      * Get mollieApi
  2228.      *
  2229.      * @return string
  2230.      */
  2231.     public function getMollieApi()
  2232.     {
  2233.         return $this->mollie_api;
  2234.     }
  2235.     /**
  2236.      * Set mollieApiTest
  2237.      *
  2238.      * @param string $mollieApiTest
  2239.      *
  2240.      * @return Settings
  2241.      */
  2242.     public function setMollieApiTest($mollieApiTest)
  2243.     {
  2244.         $this->mollie_api_test $mollieApiTest;
  2245.         return $this;
  2246.     }
  2247.     /**
  2248.      * Get mollieApiTest
  2249.      *
  2250.      * @return string
  2251.      */
  2252.     public function getMollieApiTest()
  2253.     {
  2254.         return $this->mollie_api_test;
  2255.     }
  2256.     /**
  2257.      * Set mollieApiLive
  2258.      *
  2259.      * @param string $mollieApiLive
  2260.      *
  2261.      * @return Settings
  2262.      */
  2263.     public function setMollieApiLive($mollieApiLive)
  2264.     {
  2265.         $this->mollie_api_live $mollieApiLive;
  2266.         return $this;
  2267.     }
  2268.     /**
  2269.      * Get mollieApiLive
  2270.      *
  2271.      * @return string
  2272.      */
  2273.     public function getMollieApiLive()
  2274.     {
  2275.         return $this->mollie_api_live;
  2276.     }
  2277.     /**
  2278.      * Set mollieLive
  2279.      *
  2280.      * @param boolean $mollieLive
  2281.      *
  2282.      * @return Settings
  2283.      */
  2284.     public function setMollieLive($mollieLive)
  2285.     {
  2286.         $this->mollie_live $mollieLive;
  2287.         return $this;
  2288.     }
  2289.     /**
  2290.      * Get mollieLive
  2291.      *
  2292.      * @return boolean
  2293.      */
  2294.     public function getMollieLive()
  2295.     {
  2296.         return $this->mollie_live;
  2297.     }
  2298.     
  2299.     
  2300.     
  2301.     /**
  2302.      * Set santander loan active
  2303.      *
  2304.      * @param string $santander_loan_active
  2305.      *
  2306.      * @return bool
  2307.      */
  2308.     public function setSantanderLoanActive($santanderLoanActive)
  2309.     {
  2310.         $this->santander_loan_active $santanderLoanActive;
  2311.         return $this;
  2312.     }
  2313.     /**
  2314.      * Get santander loan active
  2315.      *
  2316.      * @return bool
  2317.      */
  2318.     public function getSantanderLoanActive()
  2319.     {
  2320.         return $this->santander_loan_active;
  2321.     }
  2322.     
  2323.     /**
  2324.      * Set santander is live
  2325.      *
  2326.      * @param string $santander_is_live
  2327.      *
  2328.      * @return bool
  2329.      */
  2330.     public function setSantanderIsLive($santanderIsLive)
  2331.     {
  2332.         $this->santander_is_live $santanderIsLive;
  2333.         return $this;
  2334.     }
  2335.     /**
  2336.      * Get santander is live
  2337.      *
  2338.      * @return bool
  2339.      */
  2340.     public function getSantanderIsLive()
  2341.     {
  2342.         return $this->santander_is_live;
  2343.     }
  2344.     
  2345.     /**
  2346.      * Set santander loan api test
  2347.      *
  2348.      * @param string $santander_loan_api_test
  2349.      *
  2350.      * @return Settings
  2351.      */
  2352.     public function setSantanderLoanApiTest($santanderLoanApiTest)
  2353.     {
  2354.         $this->santander_loan_api_test $santanderLoanApiTest;
  2355.         return $this;
  2356.     }
  2357.     /**
  2358.      * Get santander loan api test
  2359.      *
  2360.      * @return string
  2361.      */
  2362.     public function getSantanderLoanApiTest()
  2363.     {
  2364.         return $this->santander_loan_api_test;
  2365.     }
  2366.     
  2367.     /**
  2368.      * Set santander loan api live
  2369.      *
  2370.      * @param string $santander_loan_api_live
  2371.      *
  2372.      * @return Settings
  2373.      */
  2374.     public function setSantanderLoanApiLive($santanderLoanApiLive)
  2375.     {
  2376.         $this->santander_loan_api_live $santanderLoanApiLive;
  2377.         return $this;
  2378.     }
  2379.     /**
  2380.      * Get santander loan api live
  2381.      *
  2382.      * @return string
  2383.      */
  2384.     public function getSantanderLoanApiLive()
  2385.     {
  2386.         return $this->santander_loan_api_live;
  2387.     }
  2388.     /**
  2389.      * Set piwikApiHash
  2390.      *
  2391.      * @param string $piwikApiHash
  2392.      *
  2393.      * @return Settings
  2394.      */
  2395.     public function setPiwikApiHash($piwikApiHash)
  2396.     {
  2397.         $this->piwik_api_hash $piwikApiHash;
  2398.         return $this;
  2399.     }
  2400.     /**
  2401.      * Get piwikApiHash
  2402.      *
  2403.      * @return string
  2404.      */
  2405.     public function getPiwikApiHash()
  2406.     {
  2407.         return $this->piwik_api_hash;
  2408.     }
  2409.     /**
  2410.      * Set piwikSiteId
  2411.      *
  2412.      * @param integer $piwikSiteId
  2413.      *
  2414.      * @return Settings
  2415.      */
  2416.     public function setPiwikSiteId($piwikSiteId)
  2417.     {
  2418.         $this->piwik_site_id $piwikSiteId;
  2419.         return $this;
  2420.     }
  2421.     /**
  2422.      * Get piwikSiteId
  2423.      *
  2424.      * @return integer
  2425.      */
  2426.     public function getPiwikSiteId()
  2427.     {
  2428.         return $this->piwik_site_id;
  2429.     }
  2430.     /**
  2431.      * Set cacheInvalidated
  2432.      *
  2433.      * @param boolean $cacheInvalidated
  2434.      *
  2435.      * @return Settings
  2436.      */
  2437.     public function setCacheInvalidated($cacheInvalidated)
  2438.     {
  2439.         $this->cache_invalidated $cacheInvalidated;
  2440.         return $this;
  2441.     }
  2442.     /**
  2443.      * Get cacheInvalidated
  2444.      *
  2445.      * @return boolean
  2446.      */
  2447.     public function getCacheInvalidated()
  2448.     {
  2449.         return $this->cache_invalidated;
  2450.     }
  2451.     /**
  2452.      * Set footerBlock1
  2453.      *
  2454.      * @param string $footerBlock1
  2455.      *
  2456.      * @return Settings
  2457.      */
  2458.     public function setFooterBlock1($footerBlock1)
  2459.     {
  2460.         $this->footer_block_1 $footerBlock1;
  2461.         return $this;
  2462.     }
  2463.     /**
  2464.      * Get footerBlock1
  2465.      *
  2466.      * @return string
  2467.      */
  2468.     public function getFooterBlock1()
  2469.     {
  2470.         return $this->footer_block_1;
  2471.     }
  2472.     /**
  2473.      * Set footerBlock2
  2474.      *
  2475.      * @param string $footerBlock2
  2476.      *
  2477.      * @return Settings
  2478.      */
  2479.     public function setFooterBlock2($footerBlock2)
  2480.     {
  2481.         $this->footer_block_2 $footerBlock2;
  2482.         return $this;
  2483.     }
  2484.     /**
  2485.      * Get footerBlock2
  2486.      *
  2487.      * @return string
  2488.      */
  2489.     public function getFooterBlock2()
  2490.     {
  2491.         return $this->footer_block_2;
  2492.     }
  2493.     /**
  2494.      * Set footerBlock3
  2495.      *
  2496.      * @param string $footerBlock3
  2497.      *
  2498.      * @return Settings
  2499.      */
  2500.     public function setFooterBlock3($footerBlock3)
  2501.     {
  2502.         $this->footer_block_3 $footerBlock3;
  2503.         return $this;
  2504.     }
  2505.     /**
  2506.      * Get footerBlock3
  2507.      *
  2508.      * @return string
  2509.      */
  2510.     public function getFooterBlock3()
  2511.     {
  2512.         return $this->footer_block_3;
  2513.     }
  2514.     /**
  2515.      * Set footerBlock4
  2516.      *
  2517.      * @param string $footerBlock4
  2518.      *
  2519.      * @return Settings
  2520.      */
  2521.     public function setFooterBlock4($footerBlock4)
  2522.     {
  2523.         $this->footer_block_4 $footerBlock4;
  2524.         return $this;
  2525.     }
  2526.     /**
  2527.      * Get footerBlock4
  2528.      *
  2529.      * @return string
  2530.      */
  2531.     public function getFooterBlock4()
  2532.     {
  2533.         return $this->footer_block_4;
  2534.     }
  2535.     /**
  2536.      * Set footerBlock5
  2537.      *
  2538.      * @param string $footerBlock5
  2539.      *
  2540.      * @return Settings
  2541.      */
  2542.     public function setFooterBlock5($footerBlock5)
  2543.     {
  2544.         $this->footer_block_5 $footerBlock5;
  2545.         return $this;
  2546.     }
  2547.     /**
  2548.      * Get footerBlock5
  2549.      *
  2550.      * @return string
  2551.      */
  2552.     public function getFooterBlock5()
  2553.     {
  2554.         return $this->footer_block_5;
  2555.     }
  2556.     /**
  2557.      * Set uptimeRobotKey
  2558.      *
  2559.      * @param string $uptimeRobotKey
  2560.      *
  2561.      * @return Settings
  2562.      */
  2563.     public function setUptimeRobotKey($uptimeRobotKey)
  2564.     {
  2565.         $this->uptime_robot_key $uptimeRobotKey;
  2566.         return $this;
  2567.     }
  2568.     /**
  2569.      * Get uptimeRobotKey
  2570.      *
  2571.      * @return string
  2572.      */
  2573.     public function getUptimeRobotKey()
  2574.     {
  2575.         return $this->uptime_robot_key;
  2576.     }
  2577.     /**
  2578.      * Set language
  2579.      *
  2580.      * @param \App\CmsBundle\Entity\Language $language
  2581.      *
  2582.      * @return Settings
  2583.      */
  2584.     public function setLanguage(\App\CmsBundle\Entity\Language $language null)
  2585.     {
  2586.         $this->language $language;
  2587.         return $this;
  2588.     }
  2589.     /**
  2590.      * Get language
  2591.      *
  2592.      * @return \App\CmsBundle\Entity\Language
  2593.      */
  2594.     public function getLanguage()
  2595.     {
  2596.         return $this->language;
  2597.     }
  2598.     /**
  2599.      * Set host
  2600.      *
  2601.      * @param string $host
  2602.      *
  2603.      * @return Settings
  2604.      */
  2605.     public function setHost($host)
  2606.     {
  2607.         $this->host $host;
  2608.         return $this;
  2609.     }
  2610.     /**
  2611.      * Get host
  2612.      *
  2613.      * @return string
  2614.      */
  2615.     public function getHost()
  2616.     {
  2617.         return $this->host;
  2618.     }
  2619.     /**
  2620.      * Set defaultTemplate
  2621.      *
  2622.      * @param string $defaultTemplate
  2623.      *
  2624.      * @return Settings
  2625.      */
  2626.     public function setDefaultTemplate($defaultTemplate)
  2627.     {
  2628.         $this->default_template $defaultTemplate;
  2629.         return $this;
  2630.     }
  2631.     /**
  2632.      * Get defaultTemplate
  2633.      *
  2634.      * @return string
  2635.      */
  2636.     public function getDefaultTemplate()
  2637.     {
  2638.         return $this->default_template;
  2639.     }
  2640.     /**
  2641.      * Set googleUa
  2642.      *
  2643.      * @param string $googleUa
  2644.      *
  2645.      * @return Settings
  2646.      */
  2647.     public function setGoogleUa($googleUa)
  2648.     {
  2649.         $this->google_ua $googleUa;
  2650.         return $this;
  2651.     }
  2652.     /**
  2653.      * Get googleUa
  2654.      *
  2655.      * @return string
  2656.      */
  2657.     public function getGoogleUa()
  2658.     {
  2659.         return $this->google_ua;
  2660.     }
  2661.     /**
  2662.      * Set snow
  2663.      *
  2664.      * @param boolean $snow
  2665.      *
  2666.      * @return Settings
  2667.      */
  2668.     public function setSnow($snow)
  2669.     {
  2670.         $this->snow $snow;
  2671.         return $this;
  2672.     }
  2673.     /**
  2674.      * Get snow
  2675.      *
  2676.      * @return boolean
  2677.      */
  2678.     public function getSnow()
  2679.     {
  2680.         return $this->snow;
  2681.     }
  2682.     /**
  2683.      * Set layoutIncludeFont
  2684.      *
  2685.      * @param array $layoutIncludeFont
  2686.      *
  2687.      * @return Settings
  2688.      */
  2689.     public function setLayoutIncludeFont($layoutIncludeFont)
  2690.     {
  2691.         $this->layout_include_font $layoutIncludeFont;
  2692.         return $this;
  2693.     }
  2694.     /**
  2695.      * Get layoutIncludeFont
  2696.      *
  2697.      * @return array
  2698.      */
  2699.     public function getLayoutIncludeFont($allowCache false)
  2700.     {
  2701.         $patterns = ['/\(\s?\'(.*?)\'\s?\)/','/url\(\s?(.*?)\s?\)/'];
  2702.         $cacheDir __DIR__ '/../../../public/static/';
  2703.         $cacheDirFont $cacheDir 'font/';
  2704.         if($this->cache_cdn && $allowCache){
  2705.             if(!file_exists($cacheDir)){ @mkdir($cacheDir); }
  2706.             if(!file_exists($cacheDirFont)){ @mkdir($cacheDirFont); }
  2707.             if(file_exists($cacheDirFont) && is_writable($cacheDirFont)){
  2708.                 $urls = [];
  2709.                 foreach($this->layout_include_font as $k => $f){
  2710.                     $v $this->guessVersion($ftrue);
  2711.                     $filename = (!empty($v) ? $v '_' '') . basename($f);
  2712.                     if(!file_exists($cacheDirFont $filename)){
  2713.                         $f_full $f;
  2714.                         if(substr($f_full02) == '//'$f_full 'http:' $f_full;
  2715.                         $data file_get_contents($f_full);
  2716.                         if(strlen($data) > 50){
  2717.                             // Gather external assets
  2718.                             foreach($patterns as $pattern){
  2719.                                 if(preg_match_all($pattern$data$matches)){
  2720.                                     foreach($matches[1] as $k => $include){
  2721.                                         if(empty($include)){
  2722.                                             if(!empty($matches[2][$k])){
  2723.                                                 $include $matches[2][$k];
  2724.                                             }
  2725.                                         }
  2726.                                         if(strpos($include'.') !== false){
  2727.                                             $prev $include;
  2728.                                             $uri preg_replace('/\/[a-zA-Z0-9-_\.]+\.[a-z]+$/''/'$f_full);
  2729.                                             $file_url $uri $include;
  2730.                                             $include str_replace('../'''$include);
  2731.                                             $include preg_replace('/\?.*?$/'''$include);
  2732.                                             $include preg_replace('/\#.*?$/'''$include);
  2733.                                             $new $include;
  2734.                                             $data str_replace($prev$new$data);
  2735.                                             $include str_replace('./'''$include);
  2736.                                             $path explode('/'$include);
  2737.                                             $path_str $cacheDir 'font/';
  2738.                                             if(!file_exists($path_str)){
  2739.                                                 mkdir($path_str);
  2740.                                             }
  2741.                                             foreach($path as $index => $dir){
  2742.                                                 if($index < (count($path) - 1)){
  2743.                                                     if(!file_exists($path_str $dir)){
  2744.                                                         mkdir($path_str $dir);
  2745.                                                     }
  2746.                                                     $path_str $path_str $dir '/';
  2747.                                                 }
  2748.                                             }
  2749.                                             set_time_limit(0);
  2750.                                             $fp fopen ($cacheDirFont $include'w+');
  2751.                                             $ch curl_init(str_replace(" ","%20",$file_url));
  2752.                                             curl_setopt($chCURLOPT_TIMEOUT50);
  2753.                                             curl_setopt($chCURLOPT_FILE$fp);
  2754.                                             curl_setopt($chCURLOPT_FOLLOWLOCATIONtrue);
  2755.                                             curl_exec($ch);
  2756.                                             curl_close($ch);
  2757.                                             fclose($fp);
  2758.                                         }
  2759.                                     }
  2760.                                     break;
  2761.                                 }
  2762.                             }
  2763.                             // check if there are any external (.map) files
  2764.                             if (preg_match('/sourceMappingURL=(.+map)/'$data$matches)) {
  2765.                                 if (isset($matches[1]))
  2766.                                 {
  2767.                                     $mapUrl dirname($f_full) . '/' $matches[1];
  2768.                                     
  2769.                                     $sourceFilename = (!empty($v) ? $v '_' '') . basename($matches[1]);
  2770.                                     set_time_limit(0);
  2771.                                     $fp fopen ($cacheDirFont $sourceFilename'w+');
  2772.                                     $ch curl_init(str_replace(" ""%20"$mapUrl));
  2773.                                     curl_setopt($chCURLOPT_TIMEOUT50);
  2774.                                     curl_setopt($chCURLOPT_FILE$fp);
  2775.                                     curl_setopt($chCURLOPT_FOLLOWLOCATIONtrue);
  2776.                                     curl_exec($ch);
  2777.                                     $info curl_getinfo($ch);
  2778.                                     curl_close($ch);
  2779.                                     fclose($fp);
  2780.                                     if ($info['http_code'] == 200) {
  2781.                                         // update sourceMappingURL
  2782.                                         $data str_replace($matches[1], '/static/font/' $sourceFilename$data);
  2783.                                     } else {
  2784.                                         // we got a error downloading the map file, deleting file and reference to it.
  2785.                                         if (file_exists($cacheDirFont $sourceFilename)) {
  2786.                                             unlink($cacheDirFont $sourceFilename);
  2787.                                         }
  2788.                                         $data preg_replace('/sourceMappingURL=.+map/'''$data);
  2789.                                     }
  2790.                                 }
  2791.                             }
  2792.                             file_put_contents($cacheDirFont $filename$data);
  2793.                             $urls[] = '/static/font/' $filename;
  2794.                         }else{
  2795.                             $urls[] = $f;
  2796.                         }
  2797.                     }else{
  2798.                         $urls[] = '/static/font/' $filename;
  2799.                     }
  2800.                 }
  2801.                 return $urls;
  2802.             }
  2803.         }
  2804.         return $this->layout_include_font;
  2805.     }
  2806.     // HTML Minifier
  2807.     private function minify_html($input) {
  2808.         if(trim($input) === "") return $input;
  2809.         // Remove extra white-space(s) between HTML attribute(s)
  2810.         $input preg_replace_callback('#<([^\/\s<>!]+)(?:\s+([^<>]*?)\s*|\s*)(\/?)>#s', function($matches) {
  2811.             return '<' $matches[1] . preg_replace('#([^\s=]+)(\=([\'"]?)(.*?)\3)?(\s+|$)#s'' $1$2'$matches[2]) . $matches[3] . '>';
  2812.         }, str_replace("\r"""$input));
  2813.         // Minify inline CSS declaration(s)
  2814.         if(strpos($input' style=') !== false) {
  2815.             $input preg_replace_callback('#<([^<]+?)\s+style=([\'"])(.*?)\2(?=[\/\s>])#s', function($matches) {
  2816.                 return '<' $matches[1] . ' style=' $matches[2] . minify_css($matches[3]) . $matches[2];
  2817.             }, $input);
  2818.         }
  2819.         if(strpos($input'</style>') !== false) {
  2820.           $input preg_replace_callback('#<style(.*?)>(.*?)</style>#is', function($matches) {
  2821.             return '<style' $matches[1] .'>'minify_css($matches[2]) . '</style>';
  2822.           }, $input);
  2823.         }
  2824.         if(strpos($input'</script>') !== false) {
  2825.           $input preg_replace_callback('#<script(.*?)>(.*?)</script>#is', function($matches) {
  2826.             return '<script' $matches[1] .'>'minify_js($matches[2]) . '</script>';
  2827.           }, $input);
  2828.         }
  2829.         return preg_replace(
  2830.             array(
  2831.                 // t = text
  2832.                 // o = tag open
  2833.                 // c = tag close
  2834.                 // Keep important white-space(s) after self-closing HTML tag(s)
  2835.                 '#<(img|input)(>| .*?>)#s',
  2836.                 // Remove a line break and two or more white-space(s) between tag(s)
  2837.                 '#(<!--.*?-->)|(>)(?:\n*|\s{2,})(<)|^\s*|\s*$#s',
  2838.                 '#(<!--.*?-->)|(?<!\>)\s+(<\/.*?>)|(<[^\/]*?>)\s+(?!\<)#s'// t+c || o+t
  2839.                 '#(<!--.*?-->)|(<[^\/]*?>)\s+(<[^\/]*?>)|(<\/.*?>)\s+(<\/.*?>)#s'// o+o || c+c
  2840.                 '#(<!--.*?-->)|(<\/.*?>)\s+(\s)(?!\<)|(?<!\>)\s+(\s)(<[^\/]*?\/?>)|(<[^\/]*?\/?>)\s+(\s)(?!\<)#s'// c+t || t+o || o+t -- separated by long white-space(s)
  2841.                 '#(<!--.*?-->)|(<[^\/]*?>)\s+(<\/.*?>)#s'// empty tag
  2842.                 '#<(img|input)(>| .*?>)<\/\1>#s'// reset previous fix
  2843.                 '#(&nbsp;)&nbsp;(?![<\s])#'// clean up ...
  2844.                 '#(?<=\>)(&nbsp;)(?=\<)#'// --ibid
  2845.                 // Remove HTML comment(s) except IE comment(s)
  2846.                 '#\s*<!--(?!\[if\s).*?-->\s*|(?<!\>)\n+(?=\<[^!])#s'
  2847.             ),
  2848.             array(
  2849.                 '<$1$2</$1>',
  2850.                 '$1$2$3',
  2851.                 '$1$2$3',
  2852.                 '$1$2$3$4$5',
  2853.                 '$1$2$3$4$5$6$7',
  2854.                 '$1$2$3',
  2855.                 '<$1$2',
  2856.                 '$1 ',
  2857.                 '$1',
  2858.                 ""
  2859.             ),
  2860.         $input);
  2861.     }
  2862.     // CSS Minifier => http://ideone.com/Q5USEF + improvement(s)
  2863.     private function minify_css($input) {
  2864.         if(trim($input) === "") return $input;
  2865.         return preg_replace(
  2866.             array(
  2867.                 // Remove comment(s)
  2868.                 '#("(?:[^"\\\]++|\\\.)*+"|\'(?:[^\'\\\\]++|\\\.)*+\')|\/\*(?!\!)(?>.*?\*\/)|^\s*|\s*$#s',
  2869.                 // Remove unused white-space(s)
  2870.                 '#("(?:[^"\\\]++|\\\.)*+"|\'(?:[^\'\\\\]++|\\\.)*+\'|\/\*(?>.*?\*\/))|\s*+;\s*+(})\s*+|\s*+([*$~^|]?+=|[{};,>~+]|\s*+-(?![0-9\.])|!important\b)\s*+|([[(:])\s++|\s++([])])|\s++(:)\s*+(?!(?>[^{}"\']++|"(?:[^"\\\]++|\\\.)*+"|\'(?:[^\'\\\\]++|\\\.)*+\')*+{)|^\s++|\s++\z|(\s)\s+#si',
  2871.                 // Replace `0(cm|em|ex|in|mm|pc|pt|px|vh|vw|%)` with `0`
  2872.                 '#(?<=[\s:])(0)(cm|em|ex|in|mm|pc|pt|px|vh|vw|%)#si',
  2873.                 // Replace `:0 0 0 0` with `:0`
  2874.                 '#:(0\s+0|0\s+0\s+0\s+0)(?=[;\}]|\!important)#i',
  2875.                 // Replace `background-position:0` with `background-position:0 0`
  2876.                 '#(background-position):0(?=[;\}])#si',
  2877.                 // Replace `0.6` with `.6`, but only when preceded by `:`, `,`, `-` or a white-space
  2878.                 '#(?<=[\s:,\-])0+\.(\d+)#s',
  2879.                 // Minify string value
  2880.                 '#(\/\*(?>.*?\*\/))|(?<!content\:)([\'"])([a-z_][a-z0-9\-_]*?)\2(?=[\s\{\}\];,])#si',
  2881.                 '#(\/\*(?>.*?\*\/))|(\burl\()([\'"])([^\s]+?)\3(\))#si',
  2882.                 // Minify HEX color code
  2883.                 '#(?<=[\s:,\-]\#)([a-f0-6]+)\1([a-f0-6]+)\2([a-f0-6]+)\3#i',
  2884.                 // Replace `(border|outline):none` with `(border|outline):0`
  2885.                 '#(?<=[\{;])(border|outline):none(?=[;\}\!])#',
  2886.                 // Remove empty selector(s)
  2887.                 '#(\/\*(?>.*?\*\/))|(^|[\{\}])(?:[^\s\{\}]+)\{\}#s'
  2888.             ),
  2889.             array(
  2890.                 '$1',
  2891.                 '$1$2$3$4$5$6$7',
  2892.                 '$1',
  2893.                 ':0',
  2894.                 '$1:0 0',
  2895.                 '.$1',
  2896.                 '$1$3',
  2897.                 '$1$2$4$5',
  2898.                 '$1$2$3',
  2899.                 '$1:0',
  2900.                 '$1$2'
  2901.             ),
  2902.         $input);
  2903.     }
  2904.     // JavaScript Minifier
  2905.     private function minify_js($input) {
  2906.         if(trim($input) === "") return $input;
  2907.         return preg_replace(
  2908.             array(
  2909.                 // Remove comment(s)
  2910.                 '#\s*("(?:[^"\\\]++|\\\.)*+"|\'(?:[^\'\\\\]++|\\\.)*+\')\s*|\s*\/\*(?!\!|@cc_on)(?>[\s\S]*?\*\/)\s*|\s*(?<![\:\=])\/\/.*(?=[\n\r]|$)|^\s*|\s*$#',
  2911.                 // Remove white-space(s) outside the string and regex
  2912.                 '#("(?:[^"\\\]++|\\\.)*+"|\'(?:[^\'\\\\]++|\\\.)*+\'|\/\*(?>.*?\*\/)|\/(?!\/)[^\n\r]*?\/(?=[\s.,;]|[gimuy]|$))|\s*([!%&*\(\)\-=+\[\]\{\}|;:,.<>?\/])\s*#s',
  2913.                 // Remove the last semicolon
  2914.                 '#;+\}#',
  2915.                 // Minify object attribute(s) except JSON attribute(s). From `{'foo':'bar'}` to `{foo:'bar'}`
  2916.                 '#([\{,])([\'])(\d+|[a-z_][a-z0-9_]*)\2(?=\:)#i',
  2917.                 // --ibid. From `foo['bar']` to `foo.bar`
  2918.                 '#([a-z0-9_\)\]])\[([\'"])([a-z_][a-z0-9_]*)\2\]#i'
  2919.             ),
  2920.             array(
  2921.                 '$1',
  2922.                 '$1$2',
  2923.                 '}',
  2924.                 '$1$3',
  2925.                 '$1.$3'
  2926.             ),
  2927.         $input);
  2928.     }
  2929.     /**
  2930.      * Set mediaDimensions
  2931.      *
  2932.      * @param array $mediaDimensions
  2933.      *
  2934.      * @return Settings
  2935.      */
  2936.     public function setMediaDimensions($mediaDimensions)
  2937.     {
  2938.         $this->media_dimensions $mediaDimensions;
  2939.         return $this;
  2940.     }
  2941.     /**
  2942.      * Get mediaDimensions
  2943.      *
  2944.      * @return array
  2945.      */
  2946.     public function getMediaDimensions()
  2947.     {
  2948.         $dimensions $this->media_dimensions;
  2949.         if(empty($dimensions)){
  2950.             return [
  2951.                 'full' => '1920',
  2952.                 'large' => '900',
  2953.                 'medium' => '600',
  2954.                 'small' => '350',
  2955.                 'thumb' => '150',
  2956.             ];
  2957.         }
  2958.         return $dimensions;
  2959.     }
  2960.     /**
  2961.      * Get mediaDimensions labels
  2962.      *
  2963.      * @return string
  2964.      */
  2965.     public function getDimensionLabel($key)
  2966.     {
  2967.         $trans = [
  2968.             'full' => 'Maximaal',
  2969.             'large' => 'Groot',
  2970.             'medium' => 'Middel',
  2971.             'small' => 'Klein',
  2972.             'thumb' => 'Thumbnail',
  2973.         ];
  2974.         return (!empty($trans[$key]) ? $trans[$key] : $key);
  2975.     }
  2976.     /**
  2977.      * Set cookiebar
  2978.      *
  2979.      * @param boolean $cookiebar
  2980.      *
  2981.      * @return Settings
  2982.      */
  2983.     public function setCookiebar($cookiebar)
  2984.     {
  2985.         $this->cookiebar $cookiebar;
  2986.         return $this;
  2987.     }
  2988.     /**
  2989.      * Get cookiebar
  2990.      *
  2991.      * @return boolean
  2992.      */
  2993.     public function getCookiebar()
  2994.     {
  2995.         return $this->cookiebar;
  2996.     }
  2997.     /**
  2998.      * Set cacheCdn
  2999.      *
  3000.      * @param boolean $cacheCdn
  3001.      *
  3002.      * @return Settings
  3003.      */
  3004.     public function setCacheCdn($cacheCdn)
  3005.     {
  3006.         $this->cache_cdn $cacheCdn;
  3007.         return $this;
  3008.     }
  3009.     /**
  3010.      * Get cacheCdn
  3011.      *
  3012.      * @return boolean
  3013.      */
  3014.     public function getCacheCdn()
  3015.     {
  3016.         return $this->cache_cdn;
  3017.     }
  3018.     /**
  3019.      * Set robots
  3020.      *
  3021.      * @param string $robots
  3022.      *
  3023.      * @return Settings
  3024.      */
  3025.     public function setRobots($robots)
  3026.     {
  3027.         $this->robots $robots;
  3028.         return $this;
  3029.     }
  3030.     /**
  3031.      * Get robots
  3032.      *
  3033.      * @return string
  3034.      */
  3035.     public function getRobots()
  3036.     {
  3037.         return $this->robots;
  3038.     }
  3039.     /**
  3040.      * Set headerBar
  3041.      *
  3042.      * @param boolean $headerBar
  3043.      *
  3044.      * @return Settings
  3045.      */
  3046.     public function setHeaderBar($headerBar)
  3047.     {
  3048.         $this->header_bar $headerBar;
  3049.         return $this;
  3050.     }
  3051.     /**
  3052.      * Get headerBar
  3053.      *
  3054.      * @return boolean
  3055.      */
  3056.     public function getHeaderBar()
  3057.     {
  3058.         return $this->header_bar;
  3059.     }
  3060.     /**
  3061.      * Set headerBarLeft
  3062.      *
  3063.      * @param string $headerBarLeft
  3064.      *
  3065.      * @return Settings
  3066.      */
  3067.     public function setHeaderBarLeft($headerBarLeft)
  3068.     {
  3069.         $this->header_bar_left $headerBarLeft;
  3070.         return $this;
  3071.     }
  3072.     /**
  3073.      * Get headerBarLeft
  3074.      *
  3075.      * @return string
  3076.      */
  3077.     public function getHeaderBarLeft()
  3078.     {
  3079.         return $this->header_bar_left;
  3080.     }
  3081.     /**
  3082.      * Set headerBarRight
  3083.      *
  3084.      * @param string $headerBarRight
  3085.      *
  3086.      * @return Settings
  3087.      */
  3088.     public function setHeaderBarRight($headerBarRight)
  3089.     {
  3090.         $this->header_bar_right $headerBarRight;
  3091.         return $this;
  3092.     }
  3093.     /**
  3094.      * Get headerBarRight
  3095.      *
  3096.      * @return string
  3097.      */
  3098.     public function getHeaderBarRight()
  3099.     {
  3100.         return $this->header_bar_right;
  3101.     }
  3102.     /**
  3103.      * Set logoAlt
  3104.      *
  3105.      * @param \App\CmsBundle\Entity\Media $logoAlt
  3106.      *
  3107.      * @return Settings
  3108.      */
  3109.     public function setLogoAlt(\App\CmsBundle\Entity\Media $logoAlt null)
  3110.     {
  3111.         $this->logo_alt $logoAlt;
  3112.         return $this;
  3113.     }
  3114.     /**
  3115.      * Get logoAlt
  3116.      *
  3117.      * @return \App\CmsBundle\Entity\Media
  3118.      */
  3119.     public function getLogoAlt($fallback true)
  3120.     {
  3121.         if($this->hasLogoAlt()){
  3122.             return '/' $this->logo_alt->getWebPath();
  3123.         }else{
  3124.             if($fallback){
  3125.                 return '/bundles/cms/images/logo.png';
  3126.             }
  3127.         }
  3128.         return null;
  3129.     }
  3130.     /**
  3131.      * Get logoAlt object
  3132.      *
  3133.      * @return \App\CmsBundle\Entity\Media
  3134.      */
  3135.     public function getLogoAltObject()
  3136.     {
  3137.         if($this->hasLogoAlt()){
  3138.             return $this->logo_alt;
  3139.         }
  3140.         return null;
  3141.     }
  3142.     /**
  3143.      * Has logoAlt
  3144.      *
  3145.      * @return boolean
  3146.      */
  3147.     public function hasLogoAlt()
  3148.     {
  3149.         return !empty($this->logo_alt);
  3150.     }
  3151.     /**
  3152.      * Set forceHttps
  3153.      *
  3154.      * @param boolean $forceHttps
  3155.      *
  3156.      * @return Settings
  3157.      */
  3158.     public function setForceHttps($forceHttps)
  3159.     {
  3160.         $this->force_https $forceHttps;
  3161.         return $this;
  3162.     }
  3163.     /**
  3164.      * Get forceHttps
  3165.      *
  3166.      * @return boolean
  3167.      */
  3168.     public function getForceHttps()
  3169.     {
  3170.         return $this->force_https;
  3171.     }
  3172.     /**
  3173.      * Set test.
  3174.      *
  3175.      * @param bool|null $test
  3176.      *
  3177.      * @return Settings
  3178.      */
  3179.     public function setTest($test null)
  3180.     {
  3181.         $this->test $test;
  3182.         return $this;
  3183.     }
  3184.     /**
  3185.      * Get test.
  3186.      *
  3187.      * @return bool|null
  3188.      */
  3189.     public function getTest()
  3190.     {
  3191.         return $this->test;
  3192.     }
  3193.     /**
  3194.      * Set restrictAccessType.
  3195.      *
  3196.      * @param string|null $restrictAccessType
  3197.      *
  3198.      * @return Settings
  3199.      */
  3200.     public function setRestrictAccessType($restrictAccessType null)
  3201.     {
  3202.         $this->restrict_access_type $restrictAccessType;
  3203.         return $this;
  3204.     }
  3205.     /**
  3206.      * Get restrictAccessType.
  3207.      *
  3208.      * @return string|null
  3209.      */
  3210.     public function getRestrictAccessType()
  3211.     {
  3212.         return $this->restrict_access_type;
  3213.     }
  3214.     /**
  3215.      * Set googleGtm.
  3216.      *
  3217.      * @param string|null $googleGtm
  3218.      *
  3219.      * @return Settings
  3220.      */
  3221.     public function setGoogleGtm($googleGtm null)
  3222.     {
  3223.         $this->google_gtm $googleGtm;
  3224.         return $this;
  3225.     }
  3226.     /**
  3227.      * Get googleGtm.
  3228.      *
  3229.      * @return string|null
  3230.      */
  3231.     public function getGoogleGtm()
  3232.     {
  3233.         return $this->google_gtm;
  3234.     }
  3235.     /**
  3236.      * Set googleCc.
  3237.      *
  3238.      * @param string|null $googleCc
  3239.      *
  3240.      * @return Settings
  3241.      */
  3242.     public function setGoogleCc($googleCc null)
  3243.     {
  3244.         $this->google_cc $googleCc;
  3245.         return $this;
  3246.     }
  3247.     /**
  3248.      * Get googleCc.
  3249.      *
  3250.      * @return string|null
  3251.      */
  3252.     public function getGoogleCc()
  3253.     {
  3254.         return $this->google_cc;
  3255.     }
  3256.     /**
  3257.      * Set iosAppId.
  3258.      *
  3259.      * @param string|null $iosAppId
  3260.      *
  3261.      * @return Settings
  3262.      */
  3263.     public function setIosAppId($iosAppId null)
  3264.     {
  3265.         $this->ios_app_id $iosAppId;
  3266.         return $this;
  3267.     }
  3268.     /**
  3269.      * Get iosAppId.
  3270.      *
  3271.      * @return string|null
  3272.      */
  3273.     public function getIosAppId()
  3274.     {
  3275.         return $this->ios_app_id;
  3276.     }
  3277.     /**
  3278.      * Set ccAuthKey.
  3279.      *
  3280.      * @param string|null $ccAuthKey
  3281.      *
  3282.      * @return Settings
  3283.      */
  3284.     public function setCcAuthKey($ccAuthKey null)
  3285.     {
  3286.         $this->cc_auth_key $ccAuthKey;
  3287.         return $this;
  3288.     }
  3289.     /**
  3290.      * Get ccAuthKey.
  3291.      *
  3292.      * @return string|null
  3293.      */
  3294.     public function getCcAuthKey()
  3295.     {
  3296.         return $this->cc_auth_key;
  3297.     }
  3298.     /**
  3299.      * Set ccEnabled.
  3300.      *
  3301.      * @param bool|null $ccEnabled
  3302.      *
  3303.      * @return Settings
  3304.      */
  3305.     public function setCcEnabled($ccEnabled null)
  3306.     {
  3307.         $this->cc_enabled $ccEnabled;
  3308.         return $this;
  3309.     }
  3310.     /**
  3311.      * Get ccEnabled.
  3312.      *
  3313.      * @return bool|null
  3314.      */
  3315.     public function getCcEnabled()
  3316.     {
  3317.         return $this->cc_enabled;
  3318.     }
  3319.     /**
  3320.      * Set ccNotifyEmail.
  3321.      *
  3322.      * @param string|null $ccNotifyEmail
  3323.      *
  3324.      * @return Settings
  3325.      */
  3326.     public function setCcNotifyEmail($ccNotifyEmail null)
  3327.     {
  3328.         $this->cc_notify_email $ccNotifyEmail;
  3329.         return $this;
  3330.     }
  3331.     /**
  3332.      * Get ccNotifyEmail.
  3333.      *
  3334.      * @return string|null
  3335.      */
  3336.     public function getCcNotifyEmail()
  3337.     {
  3338.         return $this->cc_notify_email;
  3339.     }
  3340.     /**
  3341.      * Set ccExpires.
  3342.      *
  3343.      * @param \DateTime|null $ccExpires
  3344.      *
  3345.      * @return Settings
  3346.      */
  3347.     public function setCcExpires($ccExpires null)
  3348.     {
  3349.         $this->cc_expires $ccExpires;
  3350.         return $this;
  3351.     }
  3352.     /**
  3353.      * Get ccExpires.
  3354.      *
  3355.      * @return \DateTime|null
  3356.      */
  3357.     public function getCcExpires()
  3358.     {
  3359.         return $this->cc_expires;
  3360.     }
  3361.     /**
  3362.      * Set androidAppId.
  3363.      *
  3364.      * @param string|null $androidAppId
  3365.      *
  3366.      * @return Settings
  3367.      */
  3368.     public function setAndroidAppId($androidAppId null)
  3369.     {
  3370.         $this->android_app_id $androidAppId;
  3371.         return $this;
  3372.     }
  3373.     /**
  3374.      * Get androidAppId.
  3375.      *
  3376.      * @return string|null
  3377.      */
  3378.     public function getAndroidAppId()
  3379.     {
  3380.         return $this->android_app_id;
  3381.     }
  3382.     /**
  3383.      * Set appLabel.
  3384.      *
  3385.      * @param string|null $appLabel
  3386.      *
  3387.      * @return Settings
  3388.      */
  3389.     public function setAppLabel($appLabel null)
  3390.     {
  3391.         $this->app_label $appLabel;
  3392.         return $this;
  3393.     }
  3394.     /**
  3395.      * Get appLabel.
  3396.      *
  3397.      * @return string|null
  3398.      */
  3399.     public function getAppLabel()
  3400.     {
  3401.         return $this->app_label;
  3402.     }
  3403.     /**
  3404.      * Set app_icon
  3405.      *
  3406.      * @param \App\CmsBundle\Entity\Media $app_icon
  3407.      *
  3408.      * @return Settings
  3409.      */
  3410.     public function setAppIcon(\App\CmsBundle\Entity\Media $app_icon null)
  3411.     {
  3412.         $this->app_icon $app_icon;
  3413.         return $this;
  3414.     }
  3415.     /**
  3416.      * Get app_icon
  3417.      *
  3418.      * @return \App\CmsBundle\Entity\Media
  3419.      */
  3420.     public function getAppIcon()
  3421.     {
  3422.         if($this->hasAppIcon()){
  3423.             return '/' $this->app_icon->getWebPath();
  3424.         }
  3425.         return null;
  3426.     }
  3427.     /**
  3428.      * Get app_icon object
  3429.      *
  3430.      * @return \App\CmsBundle\Entity\Media
  3431.      */
  3432.     public function getAppIconObject()
  3433.     {
  3434.         if($this->hasAppIcon()){
  3435.             return $this->app_icon;
  3436.         }
  3437.         return null;
  3438.     }
  3439.     /**
  3440.      * Has app_icon
  3441.      *
  3442.      * @return boolean
  3443.      */
  3444.     public function hasAppIcon()
  3445.     {
  3446.         return !empty($this->app_icon);
  3447.     }
  3448.     /**
  3449.      * Set cookiebarButton.
  3450.      *
  3451.      * @param bool|null $cookiebarButton
  3452.      *
  3453.      * @return Settings
  3454.      */
  3455.     public function setCookiebarButton($cookiebarButton null)
  3456.     {
  3457.         $this->cookiebar_button $cookiebarButton;
  3458.         return $this;
  3459.     }
  3460.     /**
  3461.      * Get cookiebarButton.
  3462.      *
  3463.      * @return bool|null
  3464.      */
  3465.     public function getCookiebarButton()
  3466.     {
  3467.         return $this->cookiebar_button;
  3468.     }
  3469.     /**
  3470.      * Set cookiebarButtonPosition.
  3471.      *
  3472.      * @param string|null $cookiebarButtonPosition
  3473.      *
  3474.      * @return Settings
  3475.      */
  3476.     public function setCookiebarButtonPosition($cookiebarButtonPosition null)
  3477.     {
  3478.         $this->cookiebar_button_position $cookiebarButtonPosition;
  3479.         return $this;
  3480.     }
  3481.     /**
  3482.      * Get cookiebarButtonPosition.
  3483.      *
  3484.      * @return string|null
  3485.      */
  3486.     public function getCookiebarButtonPosition()
  3487.     {
  3488.         return $this->cookiebar_button_position;
  3489.     }
  3490.     /**
  3491.      * Set cookiebarButtonOffset.
  3492.      *
  3493.      * @param int|null $cookiebarButtonOffset
  3494.      *
  3495.      * @return Settings
  3496.      */
  3497.     public function setCookiebarButtonOffset($cookiebarButtonOffset null)
  3498.     {
  3499.         $this->cookiebar_button_offset $cookiebarButtonOffset;
  3500.         return $this;
  3501.     }
  3502.     /**
  3503.      * Get cookiebarButtonOffset.
  3504.      *
  3505.      * @return int|null
  3506.      */
  3507.     public function getCookiebarButtonOffset()
  3508.     {
  3509.         return (int)$this->cookiebar_button_offset;
  3510.     }
  3511.     /**
  3512.      * Set maxMediaSize.
  3513.      *
  3514.      * @param string|null $maxMediaSize
  3515.      *
  3516.      * @return Settings
  3517.      */
  3518.     public function setMaxMediaSize($maxMediaSize null)
  3519.     {
  3520.         $this->max_media_size $maxMediaSize;
  3521.         return $this;
  3522.     }
  3523.     /**
  3524.      * Get maxMediaSize.
  3525.      *
  3526.      * @return string|null
  3527.      */
  3528.     public function getMaxMediaSize()
  3529.     {
  3530.         return $this->max_media_size;
  3531.     }
  3532.     /**
  3533.      * Get maxMediaSize.
  3534.      *
  3535.      * @return string|null
  3536.      */
  3537.     public function getMaxMediaSizeInKB()
  3538.     {
  3539.         if(preg_match('/^(\d+)([MK]{1})$/'strtoupper($this->max_media_size), $m))
  3540.         {
  3541.             $num $m[1];
  3542.             $str $m[2];
  3543.             switch ($str)
  3544.             {
  3545.                case 'M': return ($num 1000); break;
  3546.                case 'K': return ($num); break;
  3547.             }
  3548.         }
  3549.         return '2000'// 2M
  3550.     }
  3551.     /**
  3552.      * Set googleRecaptchaSitekey.
  3553.      *
  3554.      * @param string|null $googleRecaptchaSitekey
  3555.      *
  3556.      * @return Settings
  3557.      */
  3558.     public function hasGoogleRecaptcha()
  3559.     {
  3560.         if(!empty($this->google_recaptcha_sitekey) && !empty($this->google_recaptcha_secret)){
  3561.             return true;
  3562.         }
  3563.         return false;
  3564.     }
  3565.     /**
  3566.      * Set googleRecaptchaSitekey.
  3567.      *
  3568.      * @param string|null $googleRecaptchaSitekey
  3569.      *
  3570.      * @return Settings
  3571.      */
  3572.     public function setGoogleRecaptchaSitekey($googleRecaptchaSitekey null)
  3573.     {
  3574.         $this->google_recaptcha_sitekey $googleRecaptchaSitekey;
  3575.         return $this;
  3576.     }
  3577.     /**
  3578.      * Get googleRecaptchaSitekey.
  3579.      *
  3580.      * @return string|null
  3581.      */
  3582.     public function getGoogleRecaptchaSitekey()
  3583.     {
  3584.         return $this->google_recaptcha_sitekey;
  3585.     }
  3586.     /**
  3587.      * Set googleRecaptchaSecret.
  3588.      *
  3589.      * @param string|null $googleRecaptchaSecret
  3590.      *
  3591.      * @return Settings
  3592.      */
  3593.     public function setGoogleRecaptchaSecret($googleRecaptchaSecret null)
  3594.     {
  3595.         $this->google_recaptcha_secret $googleRecaptchaSecret;
  3596.         return $this;
  3597.     }
  3598.     /**
  3599.      * Get googleRecaptchaSecret.
  3600.      *
  3601.      * @return string|null
  3602.      */
  3603.     public function getGoogleRecaptchaSecret()
  3604.     {
  3605.         return $this->google_recaptcha_secret;
  3606.     }
  3607.     /**
  3608.      * Return Recaptcha widget if Recaptcha is enabled.
  3609.      *
  3610.      * @param type $optionalText Optional text under the widget
  3611.      * @return string
  3612.      */
  3613.     public function getGoogleRecaptchaWidget($optionalText null)
  3614.     {
  3615.         $text '<div class="recaptcha-wrapper">';
  3616.         if ($this->hasGoogleRecaptcha())
  3617.         {
  3618.             if($this->getGoogleRecaptchaMode() == '2_checkbox'){
  3619.                 $text .= '<div class="g-recaptcha" data-sitekey="' $this->getGoogleRecaptchaSitekey() . '"></div>';
  3620.                 if ($optionalText || !empty($this->google_recaptcha_text))
  3621.                 {
  3622.                     if (empty($optionalText))
  3623.                         $optionalText $this->google_recaptcha_text;
  3624.                     $text .= '<div class="recaptcha-text">' $optionalText .'</div>';
  3625.                 }
  3626.             }else if($this->getGoogleRecaptchaMode() == '2_invisible'){
  3627.                 $text .= '<script>
  3628.                 function validateCaptcha(token) {
  3629.                     console.log( token );
  3630.                     $(\'[name="g-recaptcha-response"]\').val(token);
  3631.                 }
  3632.                 setTimeout(function(){ grecaptcha.execute(); }, 2000);
  3633.                 </script>';
  3634.                 $text .= '<div class="g-recaptcha" data-sitekey="' $this->getGoogleRecaptchaSitekey() . '" data-callback="validateCaptcha" data-size="invisible"></div>';
  3635.             }else{
  3636.                 $text .= '<input type="hidden" name="g-recaptcha-response" id="g-recaptcha-response-alt" value="" />
  3637.                 <input type="text" style="display: none;" name="register-check" id="valid-check" value="" />
  3638.                 <script>
  3639.                     var recaptchaSiteKey = \'' $this->getGoogleRecaptchaSitekey() . '\';
  3640.                 </script>';
  3641.             }
  3642.         }
  3643.         return $text '</div>';
  3644.     }
  3645.     /**
  3646.      * Check if the response we got from recapta in valid
  3647.      *
  3648.      * @param string $recaptchaReponse
  3649.      * @return boolean
  3650.      */
  3651.     public function validateGoogleRecaptcha($recaptchaReponse)
  3652.     {
  3653.         $status true;
  3654.         if ($this->hasGoogleRecaptcha())
  3655.         {
  3656.             $status false;
  3657.             $data = [
  3658.                 'secret' => $this->getGoogleRecaptchaSecret(),
  3659.                 'response' => $recaptchaReponse,
  3660.                 'remoteip' => $_SERVER['REMOTE_ADDR'],
  3661.             ];
  3662.             // dump($data);
  3663.             // dump(http_build_query($data));
  3664.             $verify curl_init();
  3665.             curl_setopt($verifyCURLOPT_URL"https://www.google.com/recaptcha/api/siteverify");
  3666.             curl_setopt($verifyCURLOPT_POSTtrue);
  3667.             curl_setopt($verifyCURLOPT_POSTFIELDShttp_build_query($data));
  3668.             curl_setopt($verifyCURLOPT_SSL_VERIFYPEERfalse);
  3669.             curl_setopt($verifyCURLOPT_RETURNTRANSFERtrue);
  3670.             $curl_dump curl_exec($verify);
  3671.             $response json_decode($curl_dumptrue);
  3672.             // dump($response); die();
  3673.             if($response["success"] === true){
  3674.                 if(isset($response["score"])){
  3675.                     if($response["score"] >= ($this->getCaptchaTreshold() / 100)){
  3676.                         $status true;
  3677.                     }
  3678.                 } else {
  3679.                     $status true;
  3680.                 }
  3681.             }
  3682.         }
  3683.         return $status;
  3684.     }
  3685.     /**
  3686.      * Set googleRecaptchaText.
  3687.      *
  3688.      * @param string|null $googleRecaptchaText
  3689.      *
  3690.      * @return Settings
  3691.      */
  3692.     public function setGoogleRecaptchaText($googleRecaptchaText null)
  3693.     {
  3694.         $this->google_recaptcha_text $googleRecaptchaText;
  3695.         return $this;
  3696.     }
  3697.     /**
  3698.      * Get googleRecaptchaText.
  3699.      *
  3700.      * @return string|null
  3701.      */
  3702.     public function getGoogleRecaptchaText()
  3703.     {
  3704.         return $this->google_recaptcha_text;
  3705.     }
  3706.     /**
  3707.      * Set buckarooWebsiteKey.
  3708.      *
  3709.      * @param string|null $buckarooWebsiteKey
  3710.      *
  3711.      * @return Settings
  3712.      */
  3713.     public function setBuckarooWebsiteKey($buckarooWebsiteKey null)
  3714.     {
  3715.         $this->buckaroo_website_key $buckarooWebsiteKey;
  3716.         return $this;
  3717.     }
  3718.     /**
  3719.      * Get buckarooWebsiteKey.
  3720.      *
  3721.      * @return string|null
  3722.      */
  3723.     public function getBuckarooWebsiteKey()
  3724.     {
  3725.         return $this->buckaroo_website_key;
  3726.     }
  3727.     /**
  3728.      * Set buckarooLive.
  3729.      *
  3730.      * @param bool|null $buckarooLive
  3731.      *
  3732.      * @return Settings
  3733.      */
  3734.     public function setBuckarooLive($buckarooLive null)
  3735.     {
  3736.         $this->buckaroo_live $buckarooLive;
  3737.         return $this;
  3738.     }
  3739.     /**
  3740.      * Get buckarooLive.
  3741.      *
  3742.      * @return bool|null
  3743.      */
  3744.     public function getBuckarooLive()
  3745.     {
  3746.         return $this->buckaroo_live;
  3747.     }
  3748.     /**
  3749.      * Set mollieEnabled.
  3750.      *
  3751.      * @param bool|null $mollieEnabled
  3752.      *
  3753.      * @return Settings
  3754.      */
  3755.     public function setMollieEnabled($mollieEnabled null)
  3756.     {
  3757.         $this->mollie_enabled $mollieEnabled;
  3758.         return $this;
  3759.     }
  3760.     /**
  3761.      * Get mollieEnabled.
  3762.      *
  3763.      * @return bool|null
  3764.      */
  3765.     public function getMollieEnabled()
  3766.     {
  3767.         return $this->mollie_enabled;
  3768.     }
  3769.     /**
  3770.      * Set buckarooEnabled.
  3771.      *
  3772.      * @param bool|null $buckarooEnabled
  3773.      *
  3774.      * @return Settings
  3775.      */
  3776.     public function setBuckarooEnabled($buckarooEnabled null)
  3777.     {
  3778.         $this->buckaroo_enabled $buckarooEnabled;
  3779.         return $this;
  3780.     }
  3781.     /**
  3782.      * Get buckarooEnabled.
  3783.      *
  3784.      * @return bool|null
  3785.      */
  3786.     public function getBuckarooEnabled()
  3787.     {
  3788.         return $this->buckaroo_enabled;
  3789.     }
  3790.     /**
  3791.      * Set omnikassaLive.
  3792.      *
  3793.      * @param bool|null $omnikassaLive
  3794.      *
  3795.      * @return Settings
  3796.      */
  3797.     public function setOmnikassaLive($omnikassaLive null)
  3798.     {
  3799.         $this->omnikassa_live $omnikassaLive;
  3800.         return $this;
  3801.     }
  3802.     /**
  3803.      * Get omnikassaLive.
  3804.      *
  3805.      * @return bool|null
  3806.      */
  3807.     public function getOmnikassaLive()
  3808.     {
  3809.         return $this->omnikassa_live;
  3810.     }
  3811.     /**
  3812.      * Set omnikassaEnabled.
  3813.      *
  3814.      * @param bool|null $omnikassaEnabled
  3815.      *
  3816.      * @return Settings
  3817.      */
  3818.     public function setOmnikassaEnabled($omnikassaEnabled null)
  3819.     {
  3820.         $this->omnikassa_enabled $omnikassaEnabled;
  3821.         return $this;
  3822.     }
  3823.     /**
  3824.      * Get omnikassaEnabled.
  3825.      *
  3826.      * @return bool|null
  3827.      */
  3828.     public function getOmnikassaEnabled()
  3829.     {
  3830.         return $this->omnikassa_enabled;
  3831.     }
  3832.     /**
  3833.      * Set mail_header
  3834.      *
  3835.      * @param \App\CmsBundle\Entity\Media $mail_header
  3836.      *
  3837.      * @return Settings
  3838.      */
  3839.     public function setMailHeader(\App\CmsBundle\Entity\Media $mail_header null)
  3840.     {
  3841.         $this->mail_header $mail_header;
  3842.         return $this;
  3843.     }
  3844.     /**
  3845.      * Get mail_header
  3846.      *
  3847.      * @return \App\CmsBundle\Entity\Media
  3848.      */
  3849.     public function getMailHeader()
  3850.     {
  3851.         if($this->hasMailHeader()){
  3852.             return '/' $this->mail_header->getWebPath();
  3853.         }else{
  3854.             return '/bundles/cms/images/mail_header.jpg';
  3855.         }
  3856.     }
  3857.     /**
  3858.      * Get mail_header object
  3859.      *
  3860.      * @return \App\CmsBundle\Entity\Media
  3861.      */
  3862.     public function getMailHeaderObject()
  3863.     {
  3864.         if($this->hasMailHeader()){
  3865.             return $this->mail_header;
  3866.         }
  3867.         return null;
  3868.     }
  3869.     /**
  3870.      * Has mail_header
  3871.      *
  3872.      * @return boolean
  3873.      */
  3874.     public function hasMailHeader()
  3875.     {
  3876.         return !empty($this->mail_header);
  3877.     }
  3878.     /**
  3879.      * Set mailFooter.
  3880.      *
  3881.      * @param string|null $mailFooter
  3882.      *
  3883.      * @return Settings
  3884.      */
  3885.     public function setMailFooter($mailFooter null)
  3886.     {
  3887.         $this->mail_footer $mailFooter;
  3888.         return $this;
  3889.     }
  3890.     /**
  3891.      * Get mailFooter.
  3892.      *
  3893.      * @return string|null
  3894.      */
  3895.     public function getMailFooter()
  3896.     {
  3897.         return $this->mail_footer;
  3898.     }
  3899.     /**
  3900.      * Set buckarooSecret.
  3901.      *
  3902.      * @param string|null $buckarooSecret
  3903.      *
  3904.      * @return Settings
  3905.      */
  3906.     public function setBuckarooSecret($buckarooSecret null)
  3907.     {
  3908.         $this->buckaroo_secret $buckarooSecret;
  3909.         return $this;
  3910.     }
  3911.     /**
  3912.      * Get buckarooSecret.
  3913.      *
  3914.      * @return string|null
  3915.      */
  3916.     public function getBuckarooSecret()
  3917.     {
  3918.         return $this->buckaroo_secret;
  3919.     }
  3920.     /**
  3921.      * Set multisafepayApi.
  3922.      *
  3923.      * @param string|null $multisafepayApi
  3924.      *
  3925.      * @return Settings
  3926.      */
  3927.     public function setMultisafepayApi($multisafepayApi null)
  3928.     {
  3929.         $this->multisafepay_api $multisafepayApi;
  3930.         return $this;
  3931.     }
  3932.     /**
  3933.      * Get multisafepayApi.
  3934.      *
  3935.      * @return string|null
  3936.      */
  3937.     public function getMultisafepayApi()
  3938.     {
  3939.         return $this->multisafepay_api;
  3940.     }
  3941.     /**
  3942.      * Set multisafepayLive.
  3943.      *
  3944.      * @param bool|null $multisafepayLive
  3945.      *
  3946.      * @return Settings
  3947.      */
  3948.     public function setMultisafepayLive($multisafepayLive null)
  3949.     {
  3950.         $this->multisafepay_live $multisafepayLive;
  3951.         return $this;
  3952.     }
  3953.     /**
  3954.      * Get multisafepayLive.
  3955.      *
  3956.      * @return bool|null
  3957.      */
  3958.     public function getMultisafepayLive()
  3959.     {
  3960.         return $this->multisafepay_live;
  3961.     }
  3962.     /**
  3963.      * Set multisafepayEnabled.
  3964.      *
  3965.      * @param bool|null $multisafepayEnabled
  3966.      *
  3967.      * @return Settings
  3968.      */
  3969.     public function setMultisafepayEnabled($multisafepayEnabled null)
  3970.     {
  3971.         $this->multisafepay_enabled $multisafepayEnabled;
  3972.         return $this;
  3973.     }
  3974.     /**
  3975.      * Get multisafepayEnabled.
  3976.      *
  3977.      * @return bool|null
  3978.      */
  3979.     public function getMultisafepayEnabled()
  3980.     {
  3981.         return $this->multisafepay_enabled;
  3982.     }
  3983.     /**
  3984.      * Set multisafepayApiTest.
  3985.      *
  3986.      * @param string|null $multisafepayApiTest
  3987.      *
  3988.      * @return Settings
  3989.      */
  3990.     public function setMultisafepayApiTest($multisafepayApiTest null)
  3991.     {
  3992.         $this->multisafepay_api_test $multisafepayApiTest;
  3993.         return $this;
  3994.     }
  3995.     /**
  3996.      * Get multisafepayApiTest.
  3997.      *
  3998.      * @return string|null
  3999.      */
  4000.     public function getMultisafepayApiTest()
  4001.     {
  4002.         return $this->multisafepay_api_test;
  4003.     }
  4004.     /**
  4005.      * Set baseUri.
  4006.      *
  4007.      * @param string|null $baseUri
  4008.      *
  4009.      * @return Settings
  4010.      */
  4011.     public function setBaseUri($baseUri null)
  4012.     {
  4013.         $this->base_uri $baseUri;
  4014.         return $this;
  4015.     }
  4016.     /**
  4017.      * Get baseUri.
  4018.      *
  4019.      * @return string|null
  4020.      */
  4021.     public function getBaseUri()
  4022.     {
  4023.         return $this->base_uri;
  4024.     }
  4025.     /**
  4026.      * Set errorNotFound.
  4027.      *
  4028.      * @param string|null $errorNotFound
  4029.      *
  4030.      * @return Settings
  4031.      */
  4032.     public function setErrorNotFound($errorNotFound null)
  4033.     {
  4034.         $this->errorNotFound $errorNotFound;
  4035.         return $this;
  4036.     }
  4037.     /**
  4038.      * Get errorNotFound.
  4039.      *
  4040.      * @return string|null
  4041.      */
  4042.     public function getErrorNotFound()
  4043.     {
  4044.         return $this->errorNotFound;
  4045.     }
  4046.     /**
  4047.      * Set errorNoAccess.
  4048.      *
  4049.      * @param string|null $errorNoAccess
  4050.      *
  4051.      * @return Settings
  4052.      */
  4053.     public function setErrorNoAccess($errorNoAccess null)
  4054.     {
  4055.         $this->errorNoAccess $errorNoAccess;
  4056.         return $this;
  4057.     }
  4058.     /**
  4059.      * Get errorNoAccess.
  4060.      *
  4061.      * @return string|null
  4062.      */
  4063.     public function getErrorNoAccess()
  4064.     {
  4065.         return $this->errorNoAccess;
  4066.     }
  4067.     /**
  4068.      * Set errorSystem.
  4069.      *
  4070.      * @param string|null $errorSystem
  4071.      *
  4072.      * @return Settings
  4073.      */
  4074.     public function setErrorSystem($errorSystem null)
  4075.     {
  4076.         $this->errorSystem $errorSystem;
  4077.         return $this;
  4078.     }
  4079.     /**
  4080.      * Get errorSystem.
  4081.      *
  4082.      * @return string|null
  4083.      */
  4084.     public function getErrorSystem()
  4085.     {
  4086.         return $this->errorSystem;
  4087.     }
  4088.     /**
  4089.      * Set customNavigation.
  4090.      *
  4091.      * @param bool|null $customNavigation
  4092.      *
  4093.      * @return Settings
  4094.      */
  4095.     public function setCustomNavigation($customNavigation null)
  4096.     {
  4097.         $this->custom_navigation $customNavigation;
  4098.         return $this;
  4099.     }
  4100.     /**
  4101.      * Get customNavigation.
  4102.      *
  4103.      * @return bool|null
  4104.      */
  4105.     public function getCustomNavigation()
  4106.     {
  4107.         return $this->custom_navigation;
  4108.     }
  4109.     /**
  4110.      * Set serviceBackground.
  4111.      *
  4112.      * @param \App\CmsBundle\Entity\Media|null $serviceBackground
  4113.      *
  4114.      * @return Settings
  4115.      */
  4116.     public function setServiceBackground(\App\CmsBundle\Entity\Media $serviceBackground null)
  4117.     {
  4118.         $this->service_background $serviceBackground;
  4119.         return $this;
  4120.     }
  4121.     /**
  4122.      * Get serviceBackground
  4123.      *
  4124.      * @return \App\CmsBundle\Entity\Media
  4125.      */
  4126.     public function getServiceBackground()
  4127.     {
  4128.         if($this->hasServiceBackground()){
  4129.             return '/' $this->service_background->getWebPath();
  4130.         }else{
  4131.             return '/bundles/cms/images/background.jpg';
  4132.         }
  4133.     }
  4134.     /**
  4135.      * Get serviceBackground object
  4136.      *
  4137.      * @return \App\CmsBundle\Entity\Media
  4138.      */
  4139.     public function getServiceBackgroundObject()
  4140.     {
  4141.         if($this->hasServiceBackground()){
  4142.             return $this->service_background;
  4143.         }
  4144.         return null;
  4145.     }
  4146.     /**
  4147.      * Has serviceBackground
  4148.      *
  4149.      * @return boolean
  4150.      */
  4151.     public function hasServiceBackground()
  4152.     {
  4153.         return !empty($this->service_background);
  4154.     }
  4155.     /**
  4156.      * Set piwikUrl.
  4157.      *
  4158.      * @param string|null $piwikUrl
  4159.      *
  4160.      * @return Settings
  4161.      */
  4162.     public function setPiwikUrl($piwikUrl null)
  4163.     {
  4164.         $this->piwik_url $piwikUrl;
  4165.         return $this;
  4166.     }
  4167.     /**
  4168.      * Get piwikUrl.
  4169.      *
  4170.      * @return string|null
  4171.      */
  4172.     public function getPiwikUrl()
  4173.     {
  4174.         return $this->piwik_url;
  4175.     }
  4176.     /**
  4177.      * Set payApiTest.
  4178.      *
  4179.      * @param string|null $payApiTest
  4180.      *
  4181.      * @return Settings
  4182.      */
  4183.     public function setPayApiTest($payApiTest null)
  4184.     {
  4185.         $this->pay_api_test $payApiTest;
  4186.         return $this;
  4187.     }
  4188.     /**
  4189.      * Get payApiTest.
  4190.      *
  4191.      * @return string|null
  4192.      */
  4193.     public function getPayApiTest()
  4194.     {
  4195.         return $this->pay_api_test;
  4196.     }
  4197.     /**
  4198.      * Set payApiLive.
  4199.      *
  4200.      * @param string|null $payApiLive
  4201.      *
  4202.      * @return Settings
  4203.      */
  4204.     public function setPayApiLive($payApiLive null)
  4205.     {
  4206.         $this->pay_api_live $payApiLive;
  4207.         return $this;
  4208.     }
  4209.     /**
  4210.      * Get payApiLive.
  4211.      *
  4212.      * @return string|null
  4213.      */
  4214.     public function getPayApiLive()
  4215.     {
  4216.         return $this->pay_api_live;
  4217.     }
  4218.     /**
  4219.      * Set payLive.
  4220.      *
  4221.      * @param bool|null $payLive
  4222.      *
  4223.      * @return Settings
  4224.      */
  4225.     public function setPayLive($payLive null)
  4226.     {
  4227.         $this->pay_live $payLive;
  4228.         return $this;
  4229.     }
  4230.     /**
  4231.      * Get payLive.
  4232.      *
  4233.      * @return bool|null
  4234.      */
  4235.     public function getPayLive()
  4236.     {
  4237.         return $this->pay_live;
  4238.     }
  4239.     /**
  4240.      * Set payEnabled.
  4241.      *
  4242.      * @param bool|null $payEnabled
  4243.      *
  4244.      * @return Settings
  4245.      */
  4246.     public function setPayEnabled($payEnabled null)
  4247.     {
  4248.         $this->pay_enabled $payEnabled;
  4249.         return $this;
  4250.     }
  4251.     /**
  4252.      * Get payEnabled.
  4253.      *
  4254.      * @return bool|null
  4255.      */
  4256.     public function getPayEnabled()
  4257.     {
  4258.         return $this->pay_enabled;
  4259.     }
  4260.     /**
  4261.      * Set payServiceId.
  4262.      *
  4263.      * @param string|null $payServiceId
  4264.      *
  4265.      * @return Settings
  4266.      */
  4267.     public function setPayServiceId($payServiceId null)
  4268.     {
  4269.         $this->pay_service_id $payServiceId;
  4270.         return $this;
  4271.     }
  4272.     /**
  4273.      * Get payServiceId.
  4274.      *
  4275.      * @return string|null
  4276.      */
  4277.     public function getPayServiceId()
  4278.     {
  4279.         return $this->pay_service_id;
  4280.     }
  4281.     /**
  4282.      * Set googleRecaptchaMode.
  4283.      *
  4284.      * @param string|null $googleRecaptchaMode
  4285.      *
  4286.      * @return Settings
  4287.      */
  4288.     public function setGoogleRecaptchaMode($googleRecaptchaMode null)
  4289.     {
  4290.         $this->google_recaptcha_mode $googleRecaptchaMode;
  4291.         return $this;
  4292.     }
  4293.     /**
  4294.      * Get googleRecaptchaMode.
  4295.      *
  4296.      * @return string|null
  4297.      */
  4298.     public function getGoogleRecaptchaMode()
  4299.     {
  4300.         if(empty($this->google_recaptcha_mode)){
  4301.             return '2_checkbox';
  4302.         }
  4303.         return $this->google_recaptcha_mode;
  4304.     }
  4305.     /**
  4306.      * Set avgCookie.
  4307.      *
  4308.      * @param string|null $avgCookie
  4309.      *
  4310.      * @return Settings
  4311.      */
  4312.     public function setAvgCookie($avgCookie null)
  4313.     {
  4314.         $this->avg_cookie $avgCookie;
  4315.         return $this;
  4316.     }
  4317.     /**
  4318.      * Get avgCookie.
  4319.      *
  4320.      * @return string|null
  4321.      */
  4322.     public function getAvgCookie()
  4323.     {
  4324.         return $this->avg_cookie;
  4325.     }
  4326.     /**
  4327.      * Set avgDisclaimer.
  4328.      *
  4329.      * @param string|null $avgDisclaimer
  4330.      *
  4331.      * @return Settings
  4332.      */
  4333.     public function setAvgDisclaimer($avgDisclaimer null)
  4334.     {
  4335.         $this->avg_disclaimer $avgDisclaimer;
  4336.         return $this;
  4337.     }
  4338.     /**
  4339.      * Get avgDisclaimer.
  4340.      *
  4341.      * @return string|null
  4342.      */
  4343.     public function getAvgDisclaimer()
  4344.     {
  4345.         return $this->avg_disclaimer;
  4346.     }
  4347.     /**
  4348.      * Set avgPrivacy.
  4349.      *
  4350.      * @param string|null $avgPrivacy
  4351.      *
  4352.      * @return Settings
  4353.      */
  4354.     public function setAvgPrivacy($avgPrivacy null)
  4355.     {
  4356.         $this->avg_privacy $avgPrivacy;
  4357.         return $this;
  4358.     }
  4359.     /**
  4360.      * Get avgPrivacy.
  4361.      *
  4362.      * @return string|null
  4363.      */
  4364.     public function getAvgPrivacy()
  4365.     {
  4366.         return $this->avg_privacy;
  4367.     }
  4368.     /**
  4369.      * Set instagram.
  4370.      *
  4371.      * @param string|null $instagram
  4372.      *
  4373.      * @return Settings
  4374.      */
  4375.     public function setInstagram($instagram null)
  4376.     {
  4377.         $this->instagram $instagram;
  4378.         return $this;
  4379.     }
  4380.     /**
  4381.      * Get instagram.
  4382.      *
  4383.      * @return string|null
  4384.      */
  4385.     public function getInstagram()
  4386.     {
  4387.         return $this->instagram;
  4388.     }
  4389.     /**
  4390.      * Set youtube.
  4391.      *
  4392.      * @param string|null $youtube
  4393.      *
  4394.      * @return Settings
  4395.      */
  4396.     public function setYoutube($youtube null)
  4397.     {
  4398.         $this->youtube $youtube;
  4399.         return $this;
  4400.     }
  4401.     /**
  4402.      * Get youtube.
  4403.      *
  4404.      * @return string|null
  4405.      */
  4406.     public function getYoutube()
  4407.     {
  4408.         return $this->youtube;
  4409.     }
  4410.     /**
  4411.      * Set sisowMerchantId.
  4412.      *
  4413.      * @param string|null $sisowMerchantId
  4414.      *
  4415.      * @return Settings
  4416.      */
  4417.     public function setSisowMerchantId($sisowMerchantId null)
  4418.     {
  4419.         $this->sisow_merchant_id $sisowMerchantId;
  4420.         return $this;
  4421.     }
  4422.     /**
  4423.      * Get sisowMerchantId.
  4424.      *
  4425.      * @return string|null
  4426.      */
  4427.     public function getSisowMerchantId()
  4428.     {
  4429.         return $this->sisow_merchant_id;
  4430.     }
  4431.     /**
  4432.      * Set sisowMerchantKey.
  4433.      *
  4434.      * @param string|null $sisowMerchantKey
  4435.      *
  4436.      * @return Settings
  4437.      */
  4438.     public function setSisowMerchantKey($sisowMerchantKey null)
  4439.     {
  4440.         $this->sisow_merchant_key $sisowMerchantKey;
  4441.         return $this;
  4442.     }
  4443.     /**
  4444.      * Get sisowMerchantKey.
  4445.      *
  4446.      * @return string|null
  4447.      */
  4448.     public function getSisowMerchantKey()
  4449.     {
  4450.         return $this->sisow_merchant_key;
  4451.     }
  4452.     /**
  4453.      * Set sisowShopId.
  4454.      *
  4455.      * @param string|null $sisowShopId
  4456.      *
  4457.      * @return Settings
  4458.      */
  4459.     public function setSisowShopId($sisowShopId null)
  4460.     {
  4461.         $this->sisow_shop_id $sisowShopId;
  4462.         return $this;
  4463.     }
  4464.     /**
  4465.      * Get sisowShopId.
  4466.      *
  4467.      * @return string|null
  4468.      */
  4469.     public function getSisowShopId()
  4470.     {
  4471.         return $this->sisow_shop_id;
  4472.     }
  4473.     /**
  4474.      * Set sisowLive.
  4475.      *
  4476.      * @param bool|null $sisowLive
  4477.      *
  4478.      * @return Settings
  4479.      */
  4480.     public function setSisowLive($sisowLive null)
  4481.     {
  4482.         $this->sisow_live $sisowLive;
  4483.         return $this;
  4484.     }
  4485.     /**
  4486.      * Get sisowLive.
  4487.      *
  4488.      * @return bool|null
  4489.      */
  4490.     public function getSisowLive()
  4491.     {
  4492.         return $this->sisow_live;
  4493.     }
  4494.     /**
  4495.      * Set sisowEnabled.
  4496.      *
  4497.      * @param bool|null $sisowEnabled
  4498.      *
  4499.      * @return Settings
  4500.      */
  4501.     public function setSisowEnabled($sisowEnabled null)
  4502.     {
  4503.         $this->sisow_enabled $sisowEnabled;
  4504.         return $this;
  4505.     }
  4506.     /**
  4507.      * Get sisowEnabled.
  4508.      *
  4509.      * @return bool|null
  4510.      */
  4511.     public function getSisowEnabled()
  4512.     {
  4513.         return $this->sisow_enabled;
  4514.     }
  4515.     /**
  4516.      * Constructor
  4517.      */
  4518.     public function __construct()
  4519.     {
  4520.         $this->pages = new \Doctrine\Common\Collections\ArrayCollection();
  4521.         $this->linked = new ArrayCollection();
  4522.         $this->mediadirs = new ArrayCollection();
  4523.         $this->navigations = new ArrayCollection();
  4524.         $this->users = new ArrayCollection();
  4525.         $this->user_access = new ArrayCollection();
  4526.     }
  4527.     /**
  4528.      * Add page.
  4529.      *
  4530.      * @param \App\CmsBundle\Entity\Page $page
  4531.      *
  4532.      * @return Settings
  4533.      */
  4534.     public function addPage(\App\CmsBundle\Entity\Page $page)
  4535.     {
  4536.         $this->pages[] = $page;
  4537.         return $this;
  4538.     }
  4539.     /**
  4540.      * Remove page.
  4541.      *
  4542.      * @param \App\CmsBundle\Entity\Page $page
  4543.      *
  4544.      * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
  4545.      */
  4546.     public function removePage(\App\CmsBundle\Entity\Page $page)
  4547.     {
  4548.         return $this->pages->removeElement($page);
  4549.     }
  4550.     /**
  4551.      * Get pages.
  4552.      *
  4553.      * @return \Doctrine\Common\Collections\Collection
  4554.      */
  4555.     public function getPages()
  4556.     {
  4557.         return $this->pages;
  4558.     }
  4559.     /**
  4560.      * Get top-level pages.
  4561.      *
  4562.      * @return array
  4563.      */
  4564.     public function getTopLevelPages()
  4565.     {
  4566.         $list = [];
  4567.         foreach($this->pages as $Page){
  4568.             if($Page->getPage() == null){
  4569.                 $list[] = $Page;
  4570.             }
  4571.         }
  4572.         return $list;
  4573.     }
  4574.     /**
  4575.      * Add user.
  4576.      *
  4577.      * @param \App\CmsBundle\Entity\User $user
  4578.      *
  4579.      * @return Settings
  4580.      */
  4581.     public function addUser(\App\CmsBundle\Entity\User $user)
  4582.     {
  4583.         $this->users[] = $user;
  4584.         return $this;
  4585.     }
  4586.     /**
  4587.      * Remove user.
  4588.      *
  4589.      * @param \App\CmsBundle\Entity\User $user
  4590.      *
  4591.      * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
  4592.      */
  4593.     public function removeUser(\App\CmsBundle\Entity\User $user)
  4594.     {
  4595.         return $this->users->removeElement($user);
  4596.     }
  4597.     /**
  4598.      * Get users.
  4599.      *
  4600.      * @return \Doctrine\Common\Collections\Collection
  4601.      */
  4602.     public function getUsers()
  4603.     {
  4604.         return $this->users;
  4605.     }
  4606.     /**
  4607.      * Set calendar.
  4608.      *
  4609.      * @param bool|null $calendar
  4610.      *
  4611.      * @return Settings
  4612.      */
  4613.     public function setCalendar($calendar null)
  4614.     {
  4615.         $this->calendar $calendar;
  4616.         return $this;
  4617.     }
  4618.     /**
  4619.      * Get calendar.
  4620.      *
  4621.      * @return bool|null
  4622.      */
  4623.     public function getCalendar()
  4624.     {
  4625.         return $this->calendar;
  4626.     }
  4627.     /**
  4628.      * Add mediadir.
  4629.      *
  4630.      * @param \App\CmsBundle\Entity\Mediadir $mediadir
  4631.      *
  4632.      * @return Settings
  4633.      */
  4634.     public function addMediadir(\App\CmsBundle\Entity\Mediadir $mediadir)
  4635.     {
  4636.         $this->mediadirs[] = $mediadir;
  4637.         return $this;
  4638.     }
  4639.     /**
  4640.      * Remove mediadir.
  4641.      *
  4642.      * @param \App\CmsBundle\Entity\Mediadir $mediadir
  4643.      *
  4644.      * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
  4645.      */
  4646.     public function removeMediadir(\App\CmsBundle\Entity\Mediadir $mediadir)
  4647.     {
  4648.         return $this->mediadirs->removeElement($mediadir);
  4649.     }
  4650.     /**
  4651.      * Get mediadirs.
  4652.      *
  4653.      * @return \Doctrine\Common\Collections\Collection
  4654.      */
  4655.     public function getMediadirs()
  4656.     {
  4657.         return $this->mediadirs;
  4658.     }
  4659.     /**
  4660.      * Set parent.
  4661.      *
  4662.      * @param \App\CmsBundle\Entity\Settings|null $parent
  4663.      *
  4664.      * @return Settings
  4665.      */
  4666.     public function setParent(\App\CmsBundle\Entity\Settings $parent null)
  4667.     {
  4668.         $this->parent $parent;
  4669.         return $this;
  4670.     }
  4671.     /**
  4672.      * Get parent.
  4673.      *
  4674.      * @return \App\CmsBundle\Entity\Settings|null
  4675.      */
  4676.     public function getParent()
  4677.     {
  4678.         return $this->parent;
  4679.     }
  4680.     /**
  4681.      * Add linked.
  4682.      *
  4683.      * @param \App\CmsBundle\Entity\Settings $linked
  4684.      *
  4685.      * @return Settings
  4686.      */
  4687.     public function addLinked(\App\CmsBundle\Entity\Settings $linked)
  4688.     {
  4689.         $this->linked[] = $linked;
  4690.         return $this;
  4691.     }
  4692.     /**
  4693.      * Remove linked.
  4694.      *
  4695.      * @param \App\CmsBundle\Entity\Settings $linked
  4696.      *
  4697.      * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
  4698.      */
  4699.     public function removeLinked(\App\CmsBundle\Entity\Settings $linked)
  4700.     {
  4701.         return $this->linked->removeElement($linked);
  4702.     }
  4703.     /**
  4704.      * Get linked.
  4705.      *
  4706.      * @return \Doctrine\Common\Collections\Collection
  4707.      */
  4708.     public function getLinked()
  4709.     {
  4710.         return $this->linked;
  4711.     }
  4712.     public function __clone(){
  4713.         // Cleanup
  4714.         $this->linked    = new ArrayCollection();
  4715.         $this->mediadirs = new ArrayCollection();
  4716.         $this->users     = new ArrayCollection();
  4717.         $this->pages     = new ArrayCollection();
  4718.         $this->base_uri  '';
  4719.         $this->id        null;
  4720.     }
  4721.     /**
  4722.      * Set visibleBundles.
  4723.      *
  4724.      * @param array|null $visibleBundles
  4725.      *
  4726.      * @return Settings
  4727.      */
  4728.     public function setVisibleBundles($visibleBundles null)
  4729.     {
  4730.         $this->visible_bundles $visibleBundles;
  4731.         return $this;
  4732.     }
  4733.     /**
  4734.      * Get visibleBundles.
  4735.      *
  4736.      * @return array|null
  4737.      */
  4738.     public function getVisibleBundles()
  4739.     {
  4740.         if(empty($this->visible_bundles)){
  4741.             return ['TrinityBlogBundle''TrinitySliderBundle''TrinityFormsBundle'];
  4742.         }
  4743.         return $this->visible_bundles;
  4744.     }
  4745.     /**
  4746.      * Set linkedin.
  4747.      *
  4748.      * @param string|null $linkedin
  4749.      *
  4750.      * @return Settings
  4751.      */
  4752.     public function setLinkedin($linkedin null)
  4753.     {
  4754.         $this->linkedin $linkedin;
  4755.         return $this;
  4756.     }
  4757.     /**
  4758.      * Get linkedin.
  4759.      *
  4760.      * @return string|null
  4761.      */
  4762.     public function getLinkedin()
  4763.     {
  4764.         return $this->linkedin;
  4765.     }
  4766.     /**
  4767.      * Get prepared Tiniry object.
  4768.      *
  4769.      * @return Tinify
  4770.      */
  4771.     public function getTinifyObject(){
  4772.         $Tinify null;
  4773.         if(!empty($this->tinypng_api)){
  4774.             $Tinify = new \App\CmsBundle\Classes\Tinify($this);
  4775.         }
  4776.         return $Tinify;
  4777.     }
  4778.     /**
  4779.      * Set tinypngApi.
  4780.      *
  4781.      * @param string|null $tinypngApi
  4782.      *
  4783.      * @return Settings
  4784.      */
  4785.     public function setTinypngApi($tinypngApi null)
  4786.     {
  4787.         $this->tinypng_api $tinypngApi;
  4788.         return $this;
  4789.     }
  4790.     /**
  4791.      * Get tinypngApi.
  4792.      *
  4793.      * @return string|null
  4794.      */
  4795.     public function getTinypngApi()
  4796.     {
  4797.         return $this->tinypng_api;
  4798.     }
  4799.     /**
  4800.      * Set bic.
  4801.      *
  4802.      * @param string|null $bic
  4803.      *
  4804.      * @return Settings
  4805.      */
  4806.     public function setBic($bic null)
  4807.     {
  4808.         $this->bic $bic;
  4809.         return $this;
  4810.     }
  4811.     /**
  4812.      * Get bic.
  4813.      *
  4814.      * @return string|null
  4815.      */
  4816.     public function getBic()
  4817.     {
  4818.         return $this->bic;
  4819.     }
  4820.     /**
  4821.      * Set invoicePeriod.
  4822.      *
  4823.      * @param string|null $invoicePeriod
  4824.      *
  4825.      * @return Settings
  4826.      */
  4827.     public function setInvoicePeriod($invoicePeriod null)
  4828.     {
  4829.         $this->invoice_period $invoicePeriod;
  4830.         return $this;
  4831.     }
  4832.     /**
  4833.      * Get invoicePeriod.
  4834.      *
  4835.      * @return string|null
  4836.      */
  4837.     public function getInvoicePeriod()
  4838.     {
  4839.         return $this->invoice_period;
  4840.     }
  4841.     /**
  4842.      * Set iban.
  4843.      *
  4844.      * @param string|null $iban
  4845.      *
  4846.      * @return Settings
  4847.      */
  4848.     public function setIban($iban null)
  4849.     {
  4850.         $this->iban $iban;
  4851.         return $this;
  4852.     }
  4853.     /**
  4854.      * Get iban.
  4855.      *
  4856.      * @return string|null
  4857.      */
  4858.     public function getIban()
  4859.     {
  4860.         return $this->iban;
  4861.     }
  4862.     /**
  4863.      * Set kvkLocation.
  4864.      *
  4865.      * @param string|null $kvkLocation
  4866.      *
  4867.      * @return Settings
  4868.      */
  4869.     public function setKvkLocation($kvkLocation null)
  4870.     {
  4871.         $this->kvk_location $kvkLocation;
  4872.         return $this;
  4873.     }
  4874.     /**
  4875.      * Get kvkLocation.
  4876.      *
  4877.      * @return string|null
  4878.      */
  4879.     public function getKvkLocation()
  4880.     {
  4881.         return $this->kvk_location;
  4882.     }
  4883.     /**
  4884.      * Add userAccess.
  4885.      *
  4886.      * @param \App\CmsBundle\Entity\User $userAccess
  4887.      *
  4888.      * @return Settings
  4889.      */
  4890.     public function addUserAccess(\App\CmsBundle\Entity\User $userAccess)
  4891.     {
  4892.         $this->user_access[] = $userAccess;
  4893.         return $this;
  4894.     }
  4895.     /**
  4896.      * Remove userAccess.
  4897.      *
  4898.      * @param \App\CmsBundle\Entity\User $userAccess
  4899.      *
  4900.      * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
  4901.      */
  4902.     public function removeUserAccess(\App\CmsBundle\Entity\User $userAccess)
  4903.     {
  4904.         return $this->user_access->removeElement($userAccess);
  4905.     }
  4906.     /**
  4907.      * Get userAccess.
  4908.      *
  4909.      * @return \Doctrine\Common\Collections\Collection
  4910.      */
  4911.     public function getUserAccess()
  4912.     {
  4913.         return $this->user_access;
  4914.     }
  4915.     /**
  4916.      * Set ignoreCmsBlocks.
  4917.      *
  4918.      * @param bool|null $ignoreCmsBlocks
  4919.      *
  4920.      * @return Settings
  4921.      */
  4922.     public function setIgnoreCmsBlocks($ignoreCmsBlocks null)
  4923.     {
  4924.         $this->ignore_cms_blocks $ignoreCmsBlocks;
  4925.         return $this;
  4926.     }
  4927.     /**
  4928.      * Get ignoreCmsBlocks.
  4929.      *
  4930.      * @return bool|null
  4931.      */
  4932.     public function getIgnoreCmsBlocks()
  4933.     {
  4934.         return $this->ignore_cms_blocks;
  4935.     }
  4936.     /**
  4937.      * Set omnikassaSign.
  4938.      *
  4939.      * @param string|null $omnikassaSign
  4940.      *
  4941.      * @return Settings
  4942.      */
  4943.     public function setOmnikassaSign($omnikassaSign null)
  4944.     {
  4945.         $this->omnikassa_sign $omnikassaSign;
  4946.         return $this;
  4947.     }
  4948.     /**
  4949.      * Get omnikassaSign.
  4950.      *
  4951.      * @return string|null
  4952.      */
  4953.     public function getOmnikassaSign()
  4954.     {
  4955.         return $this->omnikassa_sign;
  4956.     }
  4957.     /**
  4958.      * Set omnikassaRefresh.
  4959.      *
  4960.      * @param string|null $omnikassaRefresh
  4961.      *
  4962.      * @return Settings
  4963.      */
  4964.     public function setOmnikassaRefresh($omnikassaRefresh null)
  4965.     {
  4966.         $this->omnikassa_refresh $omnikassaRefresh;
  4967.         return $this;
  4968.     }
  4969.     /**
  4970.      * Get omnikassaRefresh.
  4971.      *
  4972.      * @return string|null
  4973.      */
  4974.     public function getOmnikassaRefresh()
  4975.     {
  4976.         return $this->omnikassa_refresh;
  4977.     }
  4978.     /**
  4979.      * Set omnikassaSignTest.
  4980.      *
  4981.      * @param string|null $omnikassaSignTest
  4982.      *
  4983.      * @return Settings
  4984.      */
  4985.     public function setOmnikassaSignTest($omnikassaSignTest null)
  4986.     {
  4987.         $this->omnikassa_sign_test $omnikassaSignTest;
  4988.         return $this;
  4989.     }
  4990.     /**
  4991.      * Get omnikassaSignTest.
  4992.      *
  4993.      * @return string|null
  4994.      */
  4995.     public function getOmnikassaSignTest()
  4996.     {
  4997.         return $this->omnikassa_sign_test;
  4998.     }
  4999.     /**
  5000.      * Set omnikassaRefreshTest.
  5001.      *
  5002.      * @param string|null $omnikassaRefreshTest
  5003.      *
  5004.      * @return Settings
  5005.      */
  5006.     public function setOmnikassaRefreshTest($omnikassaRefreshTest null)
  5007.     {
  5008.         $this->omnikassa_refresh_test $omnikassaRefreshTest;
  5009.         return $this;
  5010.     }
  5011.     /**
  5012.      * Get omnikassaRefreshTest.
  5013.      *
  5014.      * @return string|null
  5015.      */
  5016.     public function getOmnikassaRefreshTest()
  5017.     {
  5018.         return $this->omnikassa_refresh_test;
  5019.     }
  5020.     /**
  5021.      * Set siteKey.
  5022.      *
  5023.      * @param string|null $siteKey
  5024.      *
  5025.      * @return Settings
  5026.      */
  5027.     public function setSiteKey($siteKey null)
  5028.     {
  5029.         $this->site_key $siteKey;
  5030.         return $this;
  5031.     }
  5032.     /**
  5033.      * Get siteKey.
  5034.      *
  5035.      * @return string|null
  5036.      */
  5037.     public function getSiteKey()
  5038.     {
  5039.         return $this->site_key;
  5040.     }
  5041.     /**
  5042.      * Set payproKey.
  5043.      *
  5044.      * @param string|null $payproKey
  5045.      *
  5046.      * @return Settings
  5047.      */
  5048.     public function setPayproKey($payproKey null)
  5049.     {
  5050.         $this->paypro_key $payproKey;
  5051.         return $this;
  5052.     }
  5053.     /**
  5054.      * Get payproKey.
  5055.      *
  5056.      * @return string|null
  5057.      */
  5058.     public function getPayproKey()
  5059.     {
  5060.         return $this->paypro_key;
  5061.     }
  5062.     /**
  5063.      * Set payproLive.
  5064.      *
  5065.      * @param bool|null $payproLive
  5066.      *
  5067.      * @return Settings
  5068.      */
  5069.     public function setPayproLive($payproLive null)
  5070.     {
  5071.         $this->paypro_live $payproLive;
  5072.         return $this;
  5073.     }
  5074.     /**
  5075.      * Get payproLive.
  5076.      *
  5077.      * @return bool|null
  5078.      */
  5079.     public function getPayproLive()
  5080.     {
  5081.         return $this->paypro_live;
  5082.     }
  5083.     /**
  5084.      * Set payproEnabled.
  5085.      *
  5086.      * @param bool|null $payproEnabled
  5087.      *
  5088.      * @return Settings
  5089.      */
  5090.     public function setPayproEnabled($payproEnabled null)
  5091.     {
  5092.         $this->paypro_enabled $payproEnabled;
  5093.         return $this;
  5094.     }
  5095.     /**
  5096.      * Get payproEnabled.
  5097.      *
  5098.      * @return bool|null
  5099.      */
  5100.     public function getPayproEnabled()
  5101.     {
  5102.         return $this->paypro_enabled;
  5103.     }
  5104.     /**
  5105.      * Set mollieSubscription.
  5106.      *
  5107.      * @param bool|null $mollieSubscription
  5108.      *
  5109.      * @return Settings
  5110.      */
  5111.     public function setMollieSubscription($mollieSubscription null)
  5112.     {
  5113.         $this->mollie_subscription $mollieSubscription;
  5114.         return $this;
  5115.     }
  5116.     /**
  5117.      * Get mollieSubscription.
  5118.      *
  5119.      * @return bool|null
  5120.      */
  5121.     public function getMollieSubscription()
  5122.     {
  5123.         return $this->mollie_subscription;
  5124.     }
  5125.     /**
  5126.      * Set payproSubscription.
  5127.      *
  5128.      * @param bool|null $payproSubscription
  5129.      *
  5130.      * @return Settings
  5131.      */
  5132.     public function setPayproSubscription($payproSubscription null)
  5133.     {
  5134.         $this->paypro_subscription $payproSubscription;
  5135.         return $this;
  5136.     }
  5137.     /**
  5138.      * Get payproSubscription.
  5139.      *
  5140.      * @return bool|null
  5141.      */
  5142.     public function getPayproSubscription()
  5143.     {
  5144.         return $this->paypro_subscription;
  5145.     }
  5146.     /**
  5147.      * Set allowRegistration.
  5148.      *
  5149.      * @param bool|null $allowRegistration
  5150.      *
  5151.      * @return Settings
  5152.      */
  5153.     public function setAllowRegistration($allowRegistration null)
  5154.     {
  5155.         $this->allow_registration $allowRegistration;
  5156.         return $this;
  5157.     }
  5158.     /**
  5159.      * Get allowRegistration.
  5160.      *
  5161.      * @return bool|null
  5162.      */
  5163.     public function getAllowRegistration()
  5164.     {
  5165.         if($this->allow_registration === null){
  5166.             // Nothing set, default to true
  5167.             return true;
  5168.         }
  5169.         return $this->allow_registration;
  5170.     }
  5171.     /**
  5172.      * Set moderateRegistration.
  5173.      *
  5174.      * @param bool|null $moderateRegistration
  5175.      *
  5176.      * @return Settings
  5177.      */
  5178.     public function setModerateRegistration($moderateRegistration null)
  5179.     {
  5180.         $this->moderate_registration $moderateRegistration;
  5181.         return $this;
  5182.     }
  5183.     /**
  5184.      * Get moderateRegistration.
  5185.      *
  5186.      * @return bool|null
  5187.      */
  5188.     public function getModerateRegistration()
  5189.     {
  5190.         if($this->moderate_registration === null){
  5191.             // Nothing set, default to false
  5192.             return false;
  5193.         }
  5194.         return $this->moderate_registration;
  5195.     }
  5196.     /**
  5197.      * Set integrations.
  5198.      *
  5199.      * @param \App\CmsBundle\Entity\Integrations|null $integrations
  5200.      *
  5201.      * @return Settings
  5202.      */
  5203.     public function setIntegrations(\App\CmsBundle\Entity\Integrations $integrations null)
  5204.     {
  5205.         $this->integrations $integrations;
  5206.         return $this;
  5207.     }
  5208.     /**
  5209.      * Get integrations.
  5210.      *
  5211.      * @return \App\CmsBundle\Entity\Integrations|null
  5212.      */
  5213.     public function getIntegrations()
  5214.     {
  5215.         return $this->integrations;
  5216.     }
  5217.     /**
  5218.      * Set birthdayFields.
  5219.      *
  5220.      * @param bool|null $birthdayFields
  5221.      *
  5222.      * @return Settings
  5223.      */
  5224.     public function setBirthdayFields($birthdayFields null)
  5225.     {
  5226.         $this->birthday_fields $birthdayFields;
  5227.         return $this;
  5228.     }
  5229.     /**
  5230.      * Get birthdayFields.
  5231.      *
  5232.      * @return bool|null
  5233.      */
  5234.     public function getBirthdayFields()
  5235.     {
  5236.         return $this->birthday_fields;
  5237.     }
  5238.     /**
  5239.      * Set overrideKey.
  5240.      *
  5241.      * @param string|null $overrideKey
  5242.      *
  5243.      * @return Settings
  5244.      */
  5245.     public function setOverrideKey($overrideKey null)
  5246.     {
  5247.         $this->override_key $overrideKey;
  5248.         return $this;
  5249.     }
  5250.     /**
  5251.      * Get overrideKey.
  5252.      *
  5253.      * @return string|null
  5254.      */
  5255.     public function getOverrideKey()
  5256.     {
  5257.         return $this->override_key;
  5258.     }
  5259.     /**
  5260.      * Set googleG.
  5261.      *
  5262.      * @param string|null $googleG
  5263.      *
  5264.      * @return Settings
  5265.      */
  5266.     public function setGoogleG($googleG null)
  5267.     {
  5268.         $this->google_g $googleG;
  5269.         return $this;
  5270.     }
  5271.     /**
  5272.      * Get googleG.
  5273.      *
  5274.      * @return string|null
  5275.      */
  5276.     public function getGoogleG()
  5277.     {
  5278.         return $this->google_g;
  5279.     }
  5280.     /**
  5281.      * Set sisowOptions.
  5282.      *
  5283.      * @param array|null $sisowOptions
  5284.      *
  5285.      * @return Settings
  5286.      */
  5287.     public function setSisowOptions($sisowOptions null)
  5288.     {
  5289.         $this->sisow_options $sisowOptions;
  5290.         return $this;
  5291.     }
  5292.     /**
  5293.      * Get sisowOptions.
  5294.      *
  5295.      * @return array|null
  5296.      */
  5297.     public function getSisowOptions()
  5298.     {
  5299.         return $this->sisow_options;
  5300.     }
  5301.     /**
  5302.      * Add navigation.
  5303.      *
  5304.      * @param \App\CmsBundle\Entity\Navigation $navigation
  5305.      *
  5306.      * @return Settings
  5307.      */
  5308.     public function addNavigation(\App\CmsBundle\Entity\Navigation $navigation)
  5309.     {
  5310.         $this->navigations[] = $navigation;
  5311.         return $this;
  5312.     }
  5313.     /**
  5314.      * Remove navigation.
  5315.      *
  5316.      * @param \App\CmsBundle\Entity\Navigation $navigation
  5317.      *
  5318.      * @return boolean TRUE if this collection contained the specified element, FALSE otherwise.
  5319.      */
  5320.     public function removeNavigation(\App\CmsBundle\Entity\Navigation $navigation)
  5321.     {
  5322.         return $this->navigations->removeElement($navigation);
  5323.     }
  5324.     /**
  5325.      * Get navigations.
  5326.      *
  5327.      * @return \Doctrine\Common\Collections\Collection
  5328.      */
  5329.     public function getNavigations()
  5330.     {
  5331.         return $this->navigations;
  5332.     }
  5333.     /**
  5334.      * Set piwikContainerHashs.
  5335.      *
  5336.      * @param string|null $piwikContainerHashs
  5337.      *
  5338.      * @return Settings
  5339.      */
  5340.     public function setPiwikContainerHashs($piwikContainerHashs null)
  5341.     {
  5342.         $this->piwik_container_hashs $piwikContainerHashs;
  5343.         return $this;
  5344.     }
  5345.     /**
  5346.      * Get piwikContainerHashs.
  5347.      *
  5348.      * @return string|null
  5349.      */
  5350.     public function getPiwikContainerHashs()
  5351.     {
  5352.         return $this->piwik_container_hashs;
  5353.     }
  5354.     /**
  5355.      * Set faviconLocation.
  5356.      *
  5357.      * @param string|null $faviconLocation
  5358.      *
  5359.      * @return Settings
  5360.      */
  5361.     public function setFaviconLocation($faviconLocation null)
  5362.     {
  5363.         $this->favicon_location $faviconLocation;
  5364.         return $this;
  5365.     }
  5366.     /**
  5367.      * Get faviconLocation.
  5368.      *
  5369.      * @return string|null
  5370.      */
  5371.     public function getFaviconLocation()
  5372.     {
  5373.         if (is_null($this->favicon_location)) {
  5374.             return '';
  5375.         }
  5376.         return $this->favicon_location;
  5377.     }
  5378.     /**
  5379.      * Set author.
  5380.      *
  5381.      * @param string|null $author
  5382.      *
  5383.      * @return Settings
  5384.      */
  5385.     public function setAuthor($author null)
  5386.     {
  5387.         $this->author $author;
  5388.         return $this;
  5389.     }
  5390.     /**
  5391.      * Get author.
  5392.      *
  5393.      * @return string|null
  5394.      */
  5395.     public function getAuthor()
  5396.     {
  5397.         return $this->author;
  5398.     }
  5399.     /**
  5400.      * Set appleTouchIcon.
  5401.      *
  5402.      * @param string|null $appleTouchIcon
  5403.      *
  5404.      * @return Settings
  5405.      */
  5406.     public function setAppleTouchIcon($appleTouchIcon null)
  5407.     {
  5408.         $this->apple_touch_icon $appleTouchIcon;
  5409.         return $this;
  5410.     }
  5411.     /**
  5412.      * Get appleTouchIcon.
  5413.      *
  5414.      * @return string|null
  5415.      */
  5416.     public function getAppleTouchIcon()
  5417.     {
  5418.         return $this->apple_touch_icon;
  5419.     }
  5420.     /**
  5421.      * Set ogSiteName.
  5422.      *
  5423.      * @param string|null $ogSiteName
  5424.      *
  5425.      * @return Settings
  5426.      */
  5427.     public function setOgSiteName($ogSiteName null)
  5428.     {
  5429.         $this->og_site_name $ogSiteName;
  5430.         return $this;
  5431.     }
  5432.     /**
  5433.      * Get ogSiteName.
  5434.      *
  5435.      * @return string|null
  5436.      */
  5437.     public function getOgSiteName()
  5438.     {
  5439.         return $this->og_site_name;
  5440.     }
  5441.     /**
  5442.      * Set faceDomainKey.
  5443.      *
  5444.      * @param string|null $faceDomainKey
  5445.      *
  5446.      * @return Settings
  5447.      */
  5448.     public function setFaceDomainKey($faceDomainKey null)
  5449.     {
  5450.         $this->face_domain_key $faceDomainKey;
  5451.         return $this;
  5452.     }
  5453.     /**
  5454.      * Get faceDomainKey.
  5455.      *
  5456.      * @return string|null
  5457.      */
  5458.     public function getFaceDomainKey()
  5459.     {
  5460.         return $this->face_domain_key;
  5461.     }
  5462.     /**
  5463.      * Set captchaTreshold.
  5464.      *
  5465.      * @param int|null $captchaTreshold
  5466.      *
  5467.      * @return Settings
  5468.      */
  5469.     public function setCaptchaTreshold($captchaTreshold null)
  5470.     {
  5471.         $this->captcha_treshold $captchaTreshold;
  5472.         return $this;
  5473.     }
  5474.     /**
  5475.      * Get captchaTreshold.
  5476.      *
  5477.      * @return int|null
  5478.      */
  5479.     public function getCaptchaTreshold()
  5480.     {
  5481.         if (is_null($this->captcha_treshold)) {
  5482.             return 50;
  5483.         } else {
  5484.             return $this->captcha_treshold;
  5485.         }
  5486.     }
  5487.     public function getColorSwap(): ?array
  5488.     {
  5489.         return (empty($this->color_swap) ? [] : (array)$this->color_swap);
  5490.     }
  5491.     public function setColorSwap(?array $color_swap): self
  5492.     {
  5493.         $this->color_swap $color_swap;
  5494.         return $this;
  5495.     }
  5496.     public function getFacebookPixel(): ?string
  5497.     {
  5498.         return $this->facebook_pixel;
  5499.     }
  5500.     public function setFacebookPixel(?string $facebook_pixel): self
  5501.     {
  5502.         $this->facebook_pixel $facebook_pixel;
  5503.         return $this;
  5504.     }
  5505.     public function getMetaPixelId(): ?string
  5506.     {
  5507.         return $this->meta_pixel_id;
  5508.     }
  5509.     public function setMetaPixelId(?string $meta_pixel_id): self
  5510.     {
  5511.         $this->meta_pixel_id $meta_pixel_id;
  5512.         return $this;
  5513.     }
  5514.     /**
  5515.      * Set api_postcode_token
  5516.      *
  5517.      * @param string $api_postcode_token
  5518.      *
  5519.      * @return string
  5520.      */
  5521.     public function setApiPostcodeToken($api_postcode_token)
  5522.     {
  5523.         $this->api_postcode_token $api_postcode_token;
  5524.         return $this;
  5525.     }
  5526.     /**
  5527.      * Get api_postcode_token
  5528.      *
  5529.      * @return string
  5530.      */
  5531.     public function getApiPostcodeToken()
  5532.     {
  5533.         return $this->api_postcode_token;
  5534.     }
  5535.     /**
  5536.      * Set outOfOfficeStart.
  5537.      *
  5538.      * @param \DateTime|null $outOfOfficeStart
  5539.      *
  5540.      * @return Settings
  5541.      */
  5542.     public function setOutOfOfficeStart($outOfOfficeStart null)
  5543.     {
  5544.         $this->ooo_start $outOfOfficeStart;
  5545.         return $this;
  5546.     }
  5547.     /**
  5548.      * Get outOfOfficeStart.
  5549.      *
  5550.      * @return \DateTime|null
  5551.      */
  5552.     public function getOutOfOfficeStart()
  5553.     {
  5554.         return $this->ooo_start;
  5555.     }
  5556.     /**
  5557.      * Set outOfOfficeEnd.
  5558.      *
  5559.      * @param \DateTime|null $outOfOfficeEnd
  5560.      *
  5561.      * @return Settings
  5562.      */
  5563.     public function setOutOfOfficeEnd($outOfOfficeEnd null)
  5564.     {
  5565.         $this->ooo_end $outOfOfficeEnd;
  5566.         return $this;
  5567.     }
  5568.     /**
  5569.      * Get outOfOfficeEnd.
  5570.      *
  5571.      * @return \DateTime|null
  5572.      */
  5573.     public function getOutOfOfficeEnd()
  5574.     {
  5575.         return $this->ooo_end;
  5576.     }
  5577.     /**
  5578.     * Set outOfOfficeMessage
  5579.     *
  5580.     * @param string $outOfOfficeMessage
  5581.     *
  5582.     * @return Settings
  5583.     */
  5584.     public function setOutOfOfficeMessage($outOfOfficeMessage)
  5585.     {
  5586.         $this->ooo_msg $outOfOfficeMessage;
  5587.         return $this;
  5588.     }
  5589.     /**
  5590.     * Get outOfOfficeMessage
  5591.     *
  5592.     * @return string
  5593.     */
  5594.     public function getOutOfOfficeMessage()
  5595.     {
  5596.         return $this->ooo_msg;
  5597.     }
  5598.     public function isOutOfOffice(){
  5599.         if($this->getOutOfOfficeEnabled()){
  5600.             if(!empty($this->getOutOfOfficeStart()) || !empty($this->getOutOfOfficeEnd())){
  5601.                 if(
  5602.                     (empty($this->getOutOfOfficeStart()) || $this->getOutOfOfficeStart()->format('Ymd') <= date('Ymd')) &&
  5603.                     (empty($this->getOutOfOfficeEnd()) || $this->getOutOfOfficeEnd()->format('Ymd') >= date('Ymd'))
  5604.                 ){
  5605.                     // Active
  5606.                     return true;
  5607.                 }
  5608.             }
  5609.         }
  5610.         return false;
  5611.     }
  5612.     /**
  5613.      * Set ooo_enbl
  5614.      *
  5615.      * @param boolean $ooo_enbl
  5616.      *
  5617.      * @return Page
  5618.      */
  5619.     public function setOutOfOfficeEnabled($ooo_enbl)
  5620.     {
  5621.         $this->ooo_enbl $ooo_enbl;
  5622.         return $this;
  5623.     }
  5624.     /**
  5625.      * Get ooo_enbl
  5626.      *
  5627.      * @return boolean
  5628.      */
  5629.     public function getOutOfOfficeEnabled()
  5630.     {
  5631.         return $this->ooo_enbl;
  5632.     }
  5633.     
  5634.     /**
  5635.      * Set lef api active
  5636.      *
  5637.      * @param string $lefApiActive
  5638.      * @return Settings
  5639.      */
  5640.     public function setLefApiActive($lefApiActive)
  5641.     {
  5642.         $this->lef_api_active $lefApiActive;
  5643.         return $this;
  5644.     }
  5645.     /**
  5646.      * Get lef api active
  5647.      *
  5648.      * @return string
  5649.      */
  5650.     public function getLefApiActive()
  5651.     {
  5652.         return $this->lef_api_active;
  5653.     }
  5654.     /**
  5655.      * Set lef api live
  5656.      *
  5657.      * @param string $lefApiActive
  5658.      * @return Settings
  5659.      */
  5660.     public function setLefApiLive($lefApiLive)
  5661.     {
  5662.         $this->lef_api_live $lefApiLive;
  5663.         return $this;
  5664.     }
  5665.     /**
  5666.      * Get lef api live
  5667.      *
  5668.      * @return string
  5669.      */
  5670.     public function getLefApiLive()
  5671.     {
  5672.         return $this->lef_api_live;
  5673.     }
  5674.     /**
  5675.      * Set lef test url
  5676.      *
  5677.      * @param string $lefApiTestUrl
  5678.      * @return Settings
  5679.      */
  5680.     public function setLefApiTestUrl($lefApiTestUrl)
  5681.     {
  5682.         $this->lef_api_test_url$lefApiTestUrl;
  5683.         return $this;
  5684.     }
  5685.     /**
  5686.      * Get lef test url
  5687.      *
  5688.      * @return string
  5689.      */
  5690.     public function getLefApiTestUrl()
  5691.     {
  5692.         return $this->lef_api_test_url;
  5693.     }
  5694.     /**
  5695.      * Set lef live url
  5696.      *
  5697.      * @param string $lefApiLiveUrl
  5698.      * @return Settings
  5699.      */
  5700.     public function setLefApiLiveUrl($lefApiLiveUrl)
  5701.     {
  5702.         $this->lef_api_live_url $lefApiLiveUrl;
  5703.         return $this;
  5704.     }
  5705.     /**
  5706.      * Get lef live url
  5707.      *
  5708.      * @return string
  5709.      */
  5710.     public function getLefApiLiveUrl()
  5711.     {
  5712.         return $this->lef_api_live_url;
  5713.     }
  5714.     /**
  5715.      * Set lef username
  5716.      *
  5717.      * @param string $lefUserName
  5718.      * @return Settings
  5719.      */
  5720.     public function setLefUserName($lefUserName)
  5721.     {
  5722.         $this->lef_user_name $lefUserName;
  5723.         return $this;
  5724.     }
  5725.     /**
  5726.      * Get lef username
  5727.      *
  5728.      * @return string
  5729.      */
  5730.     public function getLefUserName()
  5731.     {
  5732.         return $this->lef_user_name;
  5733.     }
  5734.     /**
  5735.      * Set lef password
  5736.      *
  5737.      * @param string $lefPassword
  5738.      * @return Settings
  5739.      */
  5740.     public function setLefPassword($lefPassword)
  5741.     {
  5742.         $this->lef_password $lefPassword;
  5743.         return $this;
  5744.     }
  5745.     /**
  5746.      * Get lef password
  5747.      *
  5748.      * @return string
  5749.      */
  5750.     public function getLefPassword()
  5751.     {
  5752.         return $this->lef_password;
  5753.     }    
  5754.     /**
  5755.      * Set lef occasion active
  5756.      *
  5757.      * @param string $lefOccasionRequest
  5758.      * @return Settings
  5759.      */
  5760.     public function setLefOccasionRequest($lefOccasionRequest)
  5761.     {
  5762.         $this->lef_occasion_request $lefOccasionRequest;
  5763.         return $this;
  5764.     }
  5765.     /**
  5766.      * Get lef finance occasion active
  5767.      *
  5768.      * @return string
  5769.      */
  5770.     public function getLefFinanceOccasionRequest()
  5771.     {
  5772.         return $this->lef_finance_occassion_request;
  5773.     }    
  5774.     /**
  5775.      * Set lef occasion active
  5776.      *
  5777.      * @param string $lefFinanceOccasionRequest
  5778.      * @return Settings
  5779.      */
  5780.     public function setLefFinanceOccasionRequest($lefFinanceOccasionRequest)
  5781.     {
  5782.         $this->lef_finance_occassion_request $lefFinanceOccasionRequest;
  5783.         return $this;
  5784.     }
  5785.     /**
  5786.      * Get lef occasion active
  5787.      *
  5788.      * @return string
  5789.      */
  5790.     public function getLefOccasionRequest()
  5791.     {
  5792.         return $this->lef_occasion_request;
  5793.     }
  5794.     /**
  5795.      * Set lef forms active
  5796.      *
  5797.      * @param string $lefFormsRequest
  5798.      * @return Settings
  5799.      */
  5800.     public function setLefFormsRequest($lefFormsRequest)
  5801.     {
  5802.         $this->lef_forms_request $lefFormsRequest;
  5803.         return $this;
  5804.     }
  5805.     /**
  5806.      * Get lef private lease active
  5807.      *
  5808.      * @return string
  5809.      */
  5810.     public function getLefPrivateleaseRequest()
  5811.     {
  5812.         return $this->lef_privatelease_request;
  5813.     }
  5814.     
  5815.     /**
  5816.      * Set lef private lease active
  5817.      *
  5818.      * @param string $lefPrivateleaseRequest
  5819.      * @return Settings
  5820.      */
  5821.     public function setLefPrivateleaseRequest($lefPrivateleaseRequest)
  5822.     {
  5823.         $this->lef_privatelease_request $lefPrivateleaseRequest;
  5824.         return $this;
  5825.     }
  5826.     /**
  5827.      * Get lef forms active
  5828.      *
  5829.      * @return string
  5830.      */
  5831.     public function getLefFormsRequest()
  5832.     {
  5833.         return $this->lef_forms_request;
  5834.     }
  5835.     
  5836.     /**
  5837.      * Set lef offers active
  5838.      *
  5839.      * @param string $lefFormsRequest
  5840.      * @return Settings
  5841.      */
  5842.     public function setLefOfferRequest($lefOfferRequest)
  5843.     {
  5844.         $this->lef_offer_request $lefOfferRequest;
  5845.         return $this;
  5846.     }
  5847.     /**
  5848.      * Get lef offers active
  5849.      *
  5850.      * @return string
  5851.      */
  5852.     public function getLefOfferRequest()
  5853.     {
  5854.         return $this->lef_offer_request;
  5855.     }
  5856.     
  5857.     /**
  5858.      * Set lef testdrive active
  5859.      *
  5860.      * @param string $lefTestdriveRequest
  5861.      * @return Settings
  5862.      */
  5863.     public function setLefTestdriveRequest($lefTestdriveRequest)
  5864.     {
  5865.         $this->lef_testdrive_request $lefTestdriveRequest;
  5866.         return $this;
  5867.     }
  5868.     /**
  5869.      * Get lef testdrive active
  5870.      *
  5871.      * @return string
  5872.      */
  5873.     public function getLefTestdriveRequest()
  5874.     {
  5875.         return $this->lef_testdrive_request;
  5876.     }
  5877.     /**
  5878.      * @return bool|null
  5879.      */
  5880.     public function isHummessengerApiEnabled()
  5881.     {
  5882.         return $this->Hummessenger_api_enabled;
  5883.     }
  5884.     /**
  5885.      * @param bool $Hummessenger_api_enabled
  5886.      */
  5887.     public function setHummessengerApiEnabled(bool $Hummessenger_api_enabled): void
  5888.     {
  5889.         $this->Hummessenger_api_enabled $Hummessenger_api_enabled;
  5890.     }
  5891.     /**
  5892.      * @return string|null
  5893.      */
  5894.     public function getHummessengerApiUrl()
  5895.     {
  5896.         return $this->Hummessenger_api_url;
  5897.     }
  5898.     /**
  5899.      * @param string $Hummessenger_api_url
  5900.      */
  5901.     public function setHummessengerApiUrl(string $Hummessenger_api_url): void
  5902.     {
  5903.         $this->Hummessenger_api_url $Hummessenger_api_url;
  5904.     }
  5905.     /**
  5906.      * @return string|null
  5907.      */
  5908.     public function getHummessengerApiKey()
  5909.     {
  5910.         return $this->Hummessenger_api_key;
  5911.     }
  5912.     /**
  5913.      * @param string $Hummessenger_api_key
  5914.      */
  5915.     public function setHummessengerApiKey(string $Hummessenger_api_key): void
  5916.     {
  5917.         $this->Hummessenger_api_key $Hummessenger_api_key;
  5918.     }
  5919.     
  5920.     /**
  5921.      * set webshop is catalog.
  5922.      *
  5923.      * @return settings
  5924.      */
  5925.     public function setIsCatalog(bool $isCatalog): self{
  5926.                                             $this->is_catalog $isCatalog;
  5927.                                     
  5928.                                             return $this;
  5929.                                         }
  5930.     
  5931.     /**
  5932.      * Get webshop is catalog
  5933.      *
  5934.      * @return bool
  5935.      */
  5936.     public function getIsCatalog(): bool{
  5937.                                             return (empty($this->is_catalog) ? false$this->is_catalog);
  5938.                                         }
  5939.     public function getOpenaiKey(): ?string
  5940.     {
  5941.         return $this->openai_key;
  5942.     }
  5943.     public function setOpenaiKey(?string $openai_key): self
  5944.     {
  5945.         $this->openai_key $openai_key;
  5946.         return $this;
  5947.     }
  5948.     public function getOpenaiModel(): ?string
  5949.     {
  5950.         return $this->openai_model;
  5951.     }
  5952.     public function setOpenaiModel(?string $openai_model): self
  5953.     {
  5954.         $this->openai_model $openai_model;
  5955.         return $this;
  5956.     }
  5957.     public function getOpenaiTemp(): ?float
  5958.     {
  5959.         return $this->openai_temp;
  5960.     }
  5961.     public function setOpenaiTemp(?float $openai_temp): self
  5962.     {
  5963.         $this->openai_temp $openai_temp;
  5964.         return $this;
  5965.     }
  5966.     public function getOpenaiStartprompt(): ?string
  5967.     {
  5968.         return $this->openai_startprompt;
  5969.     }
  5970.     public function setOpenaiStartprompt(?string $openai_startprompt): self
  5971.     {
  5972.         $this->openai_startprompt $openai_startprompt;
  5973.         return $this;
  5974.     }
  5975. }