src/CmsBundle/Entity/Settings.php line 2336

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