1 | <?php |
||
26 | class AnotherDummy |
||
27 | { |
||
28 | /** |
||
29 | * @var int The id. |
||
30 | * |
||
31 | * @ORM\Column(type="integer") |
||
32 | * @ORM\Id |
||
33 | * @ORM\GeneratedValue(strategy="AUTO") |
||
34 | */ |
||
35 | private $id; |
||
36 | |||
37 | /** |
||
38 | * @var string The dummy name alias. |
||
39 | * |
||
40 | * @ORM\Column(nullable=true) |
||
41 | * @Iri("https://schema.org/alternateName") |
||
42 | */ |
||
43 | private $alias; |
||
44 | |||
45 | /** |
||
46 | * @var \DateTime A dummy date. |
||
47 | * |
||
48 | * @ORM\Column(type="datetime", nullable=true) |
||
49 | * @Assert\DateTime |
||
50 | */ |
||
51 | public $dummyDate; |
||
52 | |||
53 | /** |
||
54 | * @var bool |
||
55 | * |
||
56 | * @ORM\Column(nullable=true) |
||
57 | */ |
||
58 | public $isEnabled; |
||
59 | |||
60 | /** |
||
61 | * @var string The dummy name. |
||
62 | * |
||
63 | * @ORM\Column |
||
64 | * @Assert\NotBlank |
||
65 | * @Iri("http://schema.org/name") |
||
66 | */ |
||
67 | private $name; |
||
68 | |||
69 | /** |
||
70 | * @var float The dummy price. |
||
71 | * |
||
72 | * @ORM\Column(type="float", nullable=true) |
||
73 | */ |
||
74 | private $price; |
||
75 | |||
76 | /** |
||
77 | * @var RelatedDummy A related dummy. |
||
78 | * |
||
79 | * @ORM\ManyToOne(targetEntity="RelatedDummy") |
||
80 | */ |
||
81 | public $relatedDummy; |
||
82 | |||
83 | /** |
||
84 | * @var ArrayCollection Several dummies. |
||
85 | * |
||
86 | * @ORM\ManyToMany(targetEntity="RelatedDummy") |
||
87 | */ |
||
88 | public $relatedDummies; |
||
89 | |||
90 | /** |
||
91 | * Constructor. |
||
92 | */ |
||
93 | public function __construct() |
||
97 | |||
98 | /** |
||
99 | * @return int |
||
100 | */ |
||
101 | public function getId() |
||
105 | |||
106 | /** |
||
107 | * @param $name |
||
108 | */ |
||
109 | public function setName($name) |
||
113 | |||
114 | /** |
||
115 | * @return string |
||
116 | */ |
||
117 | public function getName() |
||
121 | |||
122 | /** |
||
123 | * @param $alias |
||
124 | */ |
||
125 | public function setAlias($alias) |
||
129 | |||
130 | /** |
||
131 | * @return string |
||
132 | */ |
||
133 | public function getAlias() |
||
137 | |||
138 | /** |
||
139 | * @param \DateTime $dummyDate |
||
140 | */ |
||
141 | public function setDummyDate(\DateTime $dummyDate) |
||
145 | |||
146 | /** |
||
147 | * @return \DateTime |
||
148 | */ |
||
149 | public function getDummyDate() |
||
153 | |||
154 | /** |
||
155 | * Disables entity. |
||
156 | * |
||
157 | * @return $this |
||
158 | */ |
||
159 | public function disable() |
||
160 | { |
||
161 | $this->isEnabled = false; |
||
162 | |||
163 | return $this; |
||
164 | } |
||
165 | |||
166 | /** |
||
167 | * Enables entity. |
||
168 | * |
||
169 | * @return $this |
||
170 | */ |
||
171 | public function enable() |
||
172 | { |
||
173 | $this->isEnabled = true; |
||
174 | |||
175 | return $this; |
||
176 | } |
||
177 | |||
178 | /** |
||
179 | * Gets IsEnabled. |
||
180 | * |
||
181 | * @return string|null |
||
182 | */ |
||
183 | public function isEnabled() |
||
187 | |||
188 | /** |
||
189 | * Sets Price. |
||
190 | * |
||
191 | * @param float $price |
||
192 | * |
||
193 | * @return $this |
||
194 | */ |
||
195 | public function setPrice($price) |
||
196 | { |
||
197 | $this->price = $price; |
||
198 | |||
199 | return $this; |
||
200 | } |
||
201 | |||
202 | /** |
||
203 | * Gets Price. |
||
204 | * |
||
205 | * @return float|null |
||
206 | */ |
||
207 | public function getPrice() |
||
211 | } |
||
212 |