|
@@ -55,6 +55,11 @@ class DeviceServer
|
|
|
*/
|
|
|
private $deviceTypes;
|
|
|
|
|
|
+ /**
|
|
|
+ * @ORM\OneToMany(targetEntity="Device", mappedBy="deviceServer", fetch="EXTRA_LAZY")
|
|
|
+ */
|
|
|
+ protected $devices;
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* @return string
|
|
@@ -132,4 +137,34 @@ class DeviceServer
|
|
|
return $this;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @param Device $device
|
|
|
+ * @return DeviceServer
|
|
|
+ */
|
|
|
+ public function addDevice(Device $device)
|
|
|
+ {
|
|
|
+ $this->devices[] = $device;
|
|
|
+
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param Device $device
|
|
|
+ * @return DeviceServer
|
|
|
+ */
|
|
|
+ public function removeDevice(Device $device)
|
|
|
+ {
|
|
|
+ $this->devices->removeElement($device);
|
|
|
+
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return Doctrine\Common\Collections\Collection
|
|
|
+ */
|
|
|
+ public function getDevices()
|
|
|
+ {
|
|
|
+ return $this->devices;
|
|
|
+ }
|
|
|
+
|
|
|
}
|