1 | <?php |
||
26 | class Dummy |
||
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 \DateTime A dummy date. |
||
39 | * |
||
40 | * @ORM\Column(type="datetime", nullable=true) |
||
41 | * @Assert\DateTime |
||
42 | */ |
||
43 | public $dummyDate; |
||
44 | |||
45 | /** |
||
46 | * @var bool |
||
47 | * |
||
48 | * @ORM\Column(type="boolean", nullable=true) |
||
49 | */ |
||
50 | public $enabled; |
||
51 | |||
52 | /** |
||
53 | * @var string The dummy name. |
||
54 | * |
||
55 | * @ORM\Column(nullable=true) |
||
56 | * @Iri("http://schema.org/name") |
||
57 | */ |
||
58 | private $name; |
||
59 | |||
60 | /** |
||
61 | * @var float The dummy price. |
||
62 | * |
||
63 | * @ORM\Column(type="float", nullable=true) |
||
64 | */ |
||
65 | private $price; |
||
66 | |||
67 | /** |
||
68 | * @var RelatedDummy A related dummy. |
||
69 | * |
||
70 | * @ORM\ManyToOne(targetEntity="RelatedDummy") |
||
71 | */ |
||
72 | public $relatedDummy; |
||
73 | |||
74 | /** |
||
75 | * @var ArrayCollection Several dummies. |
||
76 | * |
||
77 | * @ORM\ManyToMany(targetEntity="RelatedDummy") |
||
78 | */ |
||
79 | public $relatedDummies; |
||
80 | |||
81 | /** |
||
82 | * Constructor. |
||
83 | */ |
||
84 | public function __construct() |
||
88 | |||
89 | /** |
||
90 | * @return int |
||
91 | */ |
||
92 | public function getId() |
||
96 | |||
97 | /** |
||
98 | * @param $name |
||
99 | */ |
||
100 | public function setName($name) |
||
104 | |||
105 | /** |
||
106 | * @return string |
||
107 | */ |
||
108 | public function getName() |
||
112 | |||
113 | /** |
||
114 | * @param \DateTime $dummyDate |
||
115 | */ |
||
116 | public function setDummyDate(\DateTime $dummyDate) |
||
120 | |||
121 | /** |
||
122 | * @return \DateTime |
||
123 | */ |
||
124 | public function getDummyDate() |
||
128 | |||
129 | /** |
||
130 | * Disables entity. |
||
131 | * |
||
132 | * @return $this |
||
133 | */ |
||
134 | public function disable() |
||
135 | { |
||
136 | $this->enabled = false; |
||
137 | |||
138 | return $this; |
||
139 | } |
||
140 | |||
141 | /** |
||
142 | * Enables entity. |
||
143 | * |
||
144 | * @return $this |
||
145 | */ |
||
146 | public function enable() |
||
147 | { |
||
148 | $this->enabled = true; |
||
149 | |||
150 | return $this; |
||
151 | } |
||
152 | |||
153 | /** |
||
154 | * Gets IsEnabled. |
||
155 | * |
||
156 | * @return string|null |
||
157 | */ |
||
158 | public function isEnabled() |
||
162 | |||
163 | /** |
||
164 | * Sets Price. |
||
165 | * |
||
166 | * @param float $price |
||
167 | * |
||
168 | * @return $this |
||
169 | */ |
||
170 | public function setPrice($price) |
||
171 | { |
||
172 | $this->price = $price; |
||
173 | |||
174 | return $this; |
||
175 | } |
||
176 | |||
177 | /** |
||
178 | * Gets Price. |
||
179 | * |
||
180 | * @return float|null |
||
181 | */ |
||
182 | public function getPrice() |
||
186 | } |
||
187 |