1 | <?php |
||
27 | class Setting extends BasicEntity |
||
28 | { |
||
29 | /** |
||
30 | * Name of the setting. |
||
31 | * |
||
32 | * @ORM\Column(type="string", length=25, nullable=false) |
||
33 | * @Assert\NotNull |
||
34 | * @Assert\NotBlank |
||
35 | */ |
||
36 | private $name; |
||
37 | |||
38 | /** |
||
39 | * Key of the setting. |
||
40 | * |
||
41 | * @ORM\Column(name="key1", type="string", length=64, nullable=false) |
||
42 | * @Assert\NotNull |
||
43 | * @Assert\NotBlank |
||
44 | */ |
||
45 | private $key; |
||
46 | |||
47 | /** |
||
48 | * Value of the setting. |
||
49 | * |
||
50 | * @ORM\Column(type="string", length=60, nullable=false) |
||
51 | * @Assert\NotNull |
||
52 | * @Assert\NotBlank |
||
53 | */ |
||
54 | private $value; |
||
55 | |||
56 | /** |
||
57 | * Section of the setting. |
||
58 | * |
||
59 | * @ORM\Column(type="string", length=60, nullable=false) |
||
60 | * @Assert\NotNull |
||
61 | * @Assert\NotBlank |
||
62 | */ |
||
63 | private $section; |
||
64 | |||
65 | 6 | /** |
|
66 | * @ORM\ManyToOne(targetEntity="User", inversedBy="settings") |
||
67 | 6 | * @ApiProperty(readable=false) |
|
68 | */ |
||
69 | protected $user; |
||
70 | |||
71 | |||
72 | /** |
||
73 | * Get name. |
||
74 | * |
||
75 | * @inheritDoc |
||
76 | */ |
||
77 | 49 | public function getName() |
|
81 | 49 | ||
82 | /** |
||
83 | * Sets the name of setting. |
||
84 | * |
||
85 | * @param mixed $name the name |
||
86 | * |
||
87 | * @return self |
||
88 | */ |
||
89 | 5 | public function setName($name) |
|
95 | |||
96 | /** |
||
97 | * Get key. |
||
98 | * |
||
99 | * @inheritDoc |
||
100 | */ |
||
101 | 49 | public function getKey() |
|
105 | 49 | ||
106 | /** |
||
107 | * Sets the key of setting. |
||
108 | * |
||
109 | * @param mixed $key the key |
||
110 | * |
||
111 | * @return self |
||
112 | */ |
||
113 | public function setKey($key) |
||
119 | |||
120 | |||
121 | /** |
||
122 | * Get value. |
||
123 | * |
||
124 | * @inheritDoc |
||
125 | */ |
||
126 | 49 | public function getValue() |
|
130 | 49 | ||
131 | /** |
||
132 | * Sets the value of setting. |
||
133 | * |
||
134 | * @param mixed $value the value |
||
135 | * |
||
136 | * @return self |
||
137 | */ |
||
138 | 5 | public function setValue($value) |
|
144 | |||
145 | /** |
||
146 | * Get section. |
||
147 | * |
||
148 | * @inheritDoc |
||
149 | */ |
||
150 | 49 | public function getSection() |
|
154 | 49 | ||
155 | /** |
||
156 | * Sets the value of section. |
||
157 | * |
||
158 | * @param mixed $section the section |
||
159 | * |
||
160 | * @return self |
||
161 | */ |
||
162 | public function setSection($section) |
||
168 | |||
169 | /** |
||
170 | * Gets the value of user. |
||
171 | * |
||
172 | * @return mixed |
||
173 | */ |
||
174 | 49 | public function getUser() |
|
178 | 49 | ||
179 | /** |
||
180 | * Sets the value of user. |
||
181 | * |
||
182 | * @param mixed $user the user |
||
183 | * |
||
184 | * @return self |
||
185 | */ |
||
186 | public function setUser($user) |
||
192 | } |
||
193 |