1 | <?php |
||
16 | class SiteSetting |
||
17 | { |
||
18 | const SETTING_LAYOUT_LOGO = 'layout.logo'; |
||
19 | const SETTING_OPENING_DAYS = 'opening_days'; |
||
20 | const SETTING_OPENING_HOURS = 'opening_hours'; |
||
21 | const SETTING_EMAIL = 'email'; |
||
22 | const SETTING_PHONE = 'phone'; |
||
23 | |||
24 | const SETTING_TRANSLATION_PREFIX = 'site_setting.settings.'; |
||
25 | |||
26 | /** |
||
27 | * @var int |
||
28 | * |
||
29 | * @ORM\Id |
||
30 | * @ORM\Column(name="id", type="integer") |
||
31 | * @ORM\GeneratedValue(strategy="AUTO") |
||
32 | */ |
||
33 | protected $id; |
||
34 | |||
35 | /** |
||
36 | * @var int |
||
37 | * |
||
38 | * @Assert\NotBlank() |
||
39 | * @Assert\GreaterThan(0) |
||
40 | * |
||
41 | * @ORM\Column(name="site_id", type="integer") |
||
42 | */ |
||
43 | protected $siteId; |
||
44 | |||
45 | /** |
||
46 | * @var string |
||
47 | * |
||
48 | * @Assert\NotBlank() |
||
49 | * @Assert\Length(max="191") |
||
50 | * |
||
51 | * @ORM\Column(name="setting", type="string", length=191) |
||
52 | */ |
||
53 | protected $setting; |
||
54 | |||
55 | /** |
||
56 | * @var string |
||
57 | * |
||
58 | * @Assert\NotBlank() |
||
59 | * |
||
60 | * @ORM\Column(type="text") |
||
61 | */ |
||
62 | protected $val; |
||
63 | |||
64 | public function __toString() |
||
68 | |||
69 | public static function getSettings(): array |
||
79 | |||
80 | /** |
||
81 | * @return int |
||
82 | */ |
||
83 | public function getId(): ?int |
||
87 | |||
88 | /** |
||
89 | * @param int $id |
||
90 | * |
||
91 | * @return SiteSetting |
||
92 | */ |
||
93 | public function setId(int $id): self |
||
99 | |||
100 | /** |
||
101 | * @return int |
||
102 | */ |
||
103 | public function getSiteId(): ?int |
||
107 | |||
108 | /** |
||
109 | * @param int $siteId |
||
110 | * |
||
111 | * @return SiteSetting |
||
112 | */ |
||
113 | public function setSiteId(int $siteId): self |
||
119 | |||
120 | /** |
||
121 | * @return string |
||
122 | */ |
||
123 | public function getSetting(): ?string |
||
127 | |||
128 | /** |
||
129 | * @param string $setting |
||
130 | * |
||
131 | * @return SiteSetting |
||
132 | */ |
||
133 | public function setSetting(string $setting): self |
||
139 | |||
140 | /** |
||
141 | * @return string |
||
142 | */ |
||
143 | public function getVal(): ?string |
||
147 | |||
148 | /** |
||
149 | * @param string $val |
||
150 | * |
||
151 | * @return SiteSetting |
||
152 | */ |
||
153 | public function setVal(string $val): self |
||
159 | } |
||
160 |