1 | <?php |
||
16 | class SurveyTypeSection |
||
17 | { |
||
18 | use ORMBehaviors\Timestampable\Timestampable; |
||
19 | |||
20 | /** |
||
21 | * @var int |
||
22 | * |
||
23 | * @ORM\Column(type="integer") |
||
24 | * @ORM\Id |
||
25 | * @ORM\GeneratedValue(strategy="AUTO") |
||
26 | * @Groups({"group2"}) |
||
27 | */ |
||
28 | private $id; |
||
29 | |||
30 | /** |
||
31 | * @var string |
||
32 | * @Assert\NotBlank() |
||
33 | * @Assert\Type("string") |
||
34 | * @Assert\Length( |
||
35 | * min = 2, |
||
36 | * max = 190 |
||
37 | * ) |
||
38 | * @ORM\Column(type="string", length=190, nullable=true) |
||
39 | * @Groups({"group2"}) |
||
40 | */ |
||
41 | private $name; |
||
42 | |||
43 | /** |
||
44 | * @var string |
||
45 | * @Assert\NotBlank() |
||
46 | * @Assert\Type("string") |
||
47 | * @Assert\Length( |
||
48 | * min = 2, |
||
49 | * max = 500 |
||
50 | * ) |
||
51 | * @ORM\Column(type="string", length=500, nullable=true) |
||
52 | * @Groups({"group2"}) |
||
53 | */ |
||
54 | private $description; |
||
55 | |||
56 | /** |
||
57 | * @var int |
||
58 | * @Assert\NotBlank() |
||
59 | * @Assert\Type("integer") |
||
60 | * @ORM\Column(type="integer") |
||
61 | * @Groups({"group2"}) |
||
62 | */ |
||
63 | private $orderNumber; |
||
64 | |||
65 | /** |
||
66 | * @var SurveyType |
||
67 | * @Assert\Type("object") |
||
68 | * @Assert\Valid |
||
69 | * @ORM\ManyToOne(targetEntity="SurveyType", inversedBy="sections") |
||
70 | */ |
||
71 | private $surveyType; |
||
72 | |||
73 | /** |
||
74 | * @var ArrayCollection[SurveyQuestion] |
||
75 | * @ORM\OneToMany(targetEntity="SurveyQuestion", mappedBy="surveyTypeSection", cascade={"persist", "remove"}) |
||
76 | * @Groups({"group2"}) |
||
77 | */ |
||
78 | private $questions; |
||
79 | |||
80 | public function __construct() |
||
84 | |||
85 | /** |
||
86 | * Get id. |
||
87 | * |
||
88 | * @return int |
||
89 | */ |
||
90 | public function getId() |
||
94 | |||
95 | /** |
||
96 | * Set name. |
||
97 | * |
||
98 | * @param string $name |
||
99 | * |
||
100 | * @return SurveyTypeSection |
||
101 | */ |
||
102 | public function setName($name) |
||
108 | |||
109 | /** |
||
110 | * Get name. |
||
111 | * |
||
112 | * @return string |
||
113 | */ |
||
114 | 3 | public function getName() |
|
118 | |||
119 | /** |
||
120 | * Set description. |
||
121 | * |
||
122 | * @param string $description |
||
123 | * |
||
124 | * @return SurveyTypeSection |
||
125 | */ |
||
126 | public function setDescription($description) |
||
132 | |||
133 | /** |
||
134 | * Get description. |
||
135 | * |
||
136 | * @return string |
||
137 | */ |
||
138 | 3 | public function getDescription() |
|
142 | |||
143 | /** |
||
144 | * Set order number. |
||
145 | * |
||
146 | * @param int $number |
||
147 | * |
||
148 | * @return SurveyTypeSection |
||
149 | */ |
||
150 | public function setOrderNumber($number) |
||
156 | |||
157 | /** |
||
158 | * Get order number. |
||
159 | * |
||
160 | * @return int |
||
161 | */ |
||
162 | public function getOrderNumber() |
||
166 | |||
167 | /** |
||
168 | * Set survey type. |
||
169 | * |
||
170 | * @param SurveyType $type |
||
171 | * |
||
172 | * @return SurveyTypeSection |
||
173 | */ |
||
174 | public function setSurveyType(SurveyType $type) |
||
180 | |||
181 | /** |
||
182 | * Get type. |
||
183 | * |
||
184 | * @return SurveyType |
||
185 | */ |
||
186 | public function getSurveyType() |
||
190 | |||
191 | /** |
||
192 | * Get Questions. |
||
193 | * |
||
194 | * @return ArrayCollection |
||
195 | */ |
||
196 | 4 | public function getQuestions() |
|
200 | } |
||
201 |